PageRenderTime 12ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeRegistries.java

http://github.com/sk89q/worldedit
Java | 75 lines | 38 code | 11 blank | 26 comment | 0 complexity | 90526830538dfb611b79ec552bd4b674 MD5 | raw file
 1/*
 2 * WorldEdit, a Minecraft world manipulation toolkit
 3 * Copyright (C) sk89q <http://www.sk89q.com>
 4 * Copyright (C) WorldEdit team and contributors
 5 *
 6 * This program is free software: you can redistribute it and/or modify it
 7 * under the terms of the GNU Lesser General Public License as published by the
 8 * Free Software Foundation, either version 3 of the License, or
 9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
14 * for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20package com.sk89q.worldedit.forge;
21
22import com.sk89q.worldedit.world.registry.BiomeRegistry;
23import com.sk89q.worldedit.world.registry.BlockCategoryRegistry;
24import com.sk89q.worldedit.world.registry.BlockRegistry;
25import com.sk89q.worldedit.world.registry.BundledRegistries;
26import com.sk89q.worldedit.world.registry.ItemCategoryRegistry;
27import com.sk89q.worldedit.world.registry.ItemRegistry;
28
29/**
30 * World data for the Forge platform.
31 */
32class ForgeRegistries extends BundledRegistries {
33
34    private static final ForgeRegistries INSTANCE = new ForgeRegistries();
35    private final BlockRegistry blockRegistry = new ForgeBlockRegistry();
36    private final BiomeRegistry biomeRegistry = new ForgeBiomeRegistry();
37    private final ItemRegistry itemRegistry = new ForgeItemRegistry();
38    private final BlockCategoryRegistry blockCategoryRegistry = new ForgeBlockCategoryRegistry();
39    private final ItemCategoryRegistry itemCategoryRegistry = new ForgeItemCategoryRegistry();
40
41    @Override
42    public BlockRegistry getBlockRegistry() {
43        return blockRegistry;
44    }
45
46    @Override
47    public BiomeRegistry getBiomeRegistry() {
48        return biomeRegistry;
49    }
50
51    @Override
52    public ItemRegistry getItemRegistry() {
53        return itemRegistry;
54    }
55
56    @Override
57    public BlockCategoryRegistry getBlockCategoryRegistry() {
58        return blockCategoryRegistry;
59    }
60
61    @Override
62    public ItemCategoryRegistry getItemCategoryRegistry() {
63        return itemCategoryRegistry;
64    }
65
66    /**
67     * Get a static instance.
68     *
69     * @return an instance
70     */
71    public static ForgeRegistries getInstance() {
72        return INSTANCE;
73    }
74
75}