PageRenderTime 58422ms queryFilters 0ms Sphinxql 59ms app.CodeModel.GetByIds 132ms findMatchingLines 8ms GetByIds 140ms meta 0ms repositoryFilters 8ms languageFilters 0ms sourceFilters 0ms

46 results for 'ForgeRegistries' (58422 ms)

Source

Language

Repository

ForgeAdapter.java git://github.com/sk89q/worldedit.git | Java | 243 lines
55import net.minecraft.world.biome.Biome;
56import net.minecraftforge.registries.ForgeRegistries;
57
74    public static Biome adapt(BiomeType biomeType) {
75        return ForgeRegistries.BIOMES.getValue(new ResourceLocation(biomeType.getId()));
76    }
192    public static Block adapt(BlockType blockType) {
193        return ForgeRegistries.BLOCKS.getValue(new ResourceLocation(blockType.getId()));
194    }
196    public static BlockType adapt(Block block) {
197        return BlockTypes.get(ForgeRegistries.BLOCKS.getKey(block).toString());
198    }
200    public static Item adapt(ItemType itemType) {
201        return ForgeRegistries.ITEMS.getValue(new ResourceLocation(itemType.getId()));
202    }
ForgeWorldEdit.java git://github.com/sk89q/worldedit.git | Java | 353 lines
65import net.minecraftforge.fml.loading.FMLPaths;
66import net.minecraftforge.registries.ForgeRegistries;
67import org.apache.logging.log4j.LogManager;
145        // Blocks
146        for (ResourceLocation name : ForgeRegistries.BLOCKS.getKeys()) {
147            if (BlockType.REGISTRY.get(name.toString()) == null) {
152        // Items
153        for (ResourceLocation name : ForgeRegistries.ITEMS.getKeys()) {
154            if (ItemType.REGISTRY.get(name.toString()) == null) {
158        // Entities
159        for (ResourceLocation name : ForgeRegistries.ENTITIES.getKeys()) {
160            if (EntityType.REGISTRY.get(name.toString()) == null) {
164        // Biomes
165        for (ResourceLocation name : ForgeRegistries.BIOMES.getKeys()) {
166            if (BiomeType.REGISTRY.get(name.toString()) == null) {
BCTransportRecipes.java https://github.com/2xsaiko/BuildCraft.git | Java | 348 lines
29import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
30import net.minecraftforge.fml.common.registry.ForgeRegistries;
31import net.minecraftforge.fml.common.registry.GameRegistry;
155
156                    ForgeRegistries.RECIPES.register(new ShapedOreRecipe(resultOr.getItem().getRegistryName(), resultAnd, "i", 'i', new IngredientNBTBC(resultOr)).setRegistryName(resultOr.getItem().getRegistryName() + "_" + modifier + "_" + material + "_or"));
157                    ForgeRegistries.RECIPES.register(new ShapedOreRecipe(resultAnd.getItem().getRegistryName(), resultOr, "i", 'i', new IngredientNBTBC(resultAnd)).setRegistryName(resultAnd.getItem().getRegistryName() + "_" + modifier + "_" + material + "_and"));
214            AssemblyRecipeRegistry.register(FacadeAssemblyRecipes.INSTANCE);
215            ForgeRegistries.RECIPES.register(FacadeSwapRecipe.INSTANCE);
216        }
302        recipe.setRegistryName(new ResourceLocation(pipe.getRegistryName() + "_colorless"));
303        ForgeRegistries.RECIPES.register(recipe);
304
309            colorRecipe.setRegistryName(new ResourceLocation(pipe.getRegistryName() + "_" + colour));
310            ForgeRegistries.RECIPES.register(colorRecipe);
311        }
MoarVents.java https://bitbucket.org/qwertz19281/moarvents.git | Java | 209 lines
6import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
7import net.minecraftforge.fml.common.registry.ForgeRegistries;
8
146
147		ForgeRegistries.ITEMS.register(ctab.tabitem);
148		ctab.tis=new ItemStack(ctab.tabitem);
155
156		ForgeRegistries.ITEMS.register(va);
157		ForgeRegistries.ITEMS.register(vaB);
157		ForgeRegistries.ITEMS.register(vaB);
158		ForgeRegistries.ITEMS.register(mems[0]);
159		ForgeRegistries.ITEMS.register(mems[1]);
159		ForgeRegistries.ITEMS.register(mems[1]);
160		ForgeRegistries.ITEMS.register(mems[2]);
161		ForgeRegistries.ITEMS.register(mems[3]);
BlockID.java https://github.com/bspkrs-mods/bspkrsCore.git | Java | 154 lines
7import net.minecraft.world.World;
8import net.minecraftforge.fml.common.registry.ForgeRegistries;
9
29    {
30        this(ForgeRegistries.BLOCKS.getKey(block).toString(), metadata);
31    }
34    {
35        this(ForgeRegistries.BLOCKS.getKey(block).toString(), -1);
36    }
66        return Blocks.AIR;
67//        return ForgeRegistries.BLOCKS.get.getObject(id);
68    }
MoarVents.java https://bitbucket.org/qwertz19281/moarvents.git | Java | 259 lines
6import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
7import net.minecraftforge.fml.common.registry.ForgeRegistries;
8import net.minecraftforge.fml.common.registry.GameRegistry;
132
133		ForgeRegistries.ITEMS.register(ctab.tabitem);
134		////LanguageRegistry.addName(ctab.tabitem, "Useless CreativeTab Placeholder");
145
146		ForgeRegistries.ITEMS.register(va);
147		ForgeRegistries.ITEMS.register(vaB);
147		ForgeRegistries.ITEMS.register(vaB);
148		ForgeRegistries.ITEMS.register(mems[0]);
149		ForgeRegistries.ITEMS.register(mems[1]);
149		ForgeRegistries.ITEMS.register(mems[1]);
150		ForgeRegistries.ITEMS.register(mems[2]);
151		ForgeRegistries.ITEMS.register(mems[3]);
ForgeRegistries.java git://github.com/sk89q/worldedit.git | Java | 75 lines
31 */
32class ForgeRegistries extends BundledRegistries {
33
33
34    private static final ForgeRegistries INSTANCE = new ForgeRegistries();
35    private final BlockRegistry blockRegistry = new ForgeBlockRegistry();
70     */
71    public static ForgeRegistries getInstance() {
72        return INSTANCE;
ItemID.java https://github.com/bspkrs-mods/bspkrsCore.git | Java | 95 lines
4import net.minecraft.item.ItemStack;
5import net.minecraftforge.fml.common.registry.ForgeRegistries;
6
37    {
38        this(ForgeRegistries.ITEMS.getKey(item).toString(), damage);
39    }
42    {
43        this(ForgeRegistries.ITEMS.getKey(item).toString(), -1);
44    }
UniqueNameListGenerator.java https://github.com/bspkrs-mods/bspkrsCore.git | Java | 95 lines
2
3import net.minecraftforge.fml.common.registry.ForgeRegistries;
4
33
34            for (Object obj : ForgeRegistries.BLOCKS.getKeys())
35                blockList.add(obj.toString());
36
37            for (Object obj : ForgeRegistries.ITEMS.getKeys())
38                itemList.add(obj.toString());
RecipeBuilderShaped.java https://github.com/2xsaiko/BuildCraft.git | Java | 137 lines
19
20import net.minecraftforge.fml.common.registry.ForgeRegistries;
21import net.minecraftforge.oredict.ShapedOreRecipe;
124        ensureValid();
125        ForgeRegistries.RECIPES.register(new ShapedOreRecipe(result.getItem().getRegistryName(), result, createRecipeObjectArray()));
126    }
129        ensureValid();
130        ForgeRegistries.RECIPES.register(new ShapedOreRecipe(result.getItem().getRegistryName(), result, createRecipeObjectArrayNBT()).setRegistryName(result.getItem().getRegistryName()));
131    }
134        ensureValid();
135        ForgeRegistries.RECIPES.register(buildRotated().setRegistryName(result.getItem().getRegistryName()));
136    }
ForgePlatform.java git://github.com/sk89q/worldedit.git | Java | 227 lines
78    public Registries getRegistries() {
79        return ForgeRegistries.getInstance();
80    }
93    public boolean isValidMobType(String type) {
94        return net.minecraftforge.registries.ForgeRegistries.ENTITIES.containsKey(new ResourceLocation(type));
95    }
BCEnergyConfig.java https://github.com/2xsaiko/BuildCraft.git | Java | 153 lines
17import net.minecraftforge.common.config.Property;
18import net.minecraftforge.fml.common.registry.ForgeRegistries;
19
122        List<ResourceLocation> allValid = new ArrayList<>();
123        allValid.addAll(ForgeRegistries.BIOMES.getKeys());
124        Collections.sort(allValid, Comparator.comparing(ResourceLocation::toString));
147        for (ResourceLocation test : toTest) {
148            if (!ForgeRegistries.BIOMES.containsKey(test)) {
149                invalidDest.add(test);
GuideCraftingRecipes.java https://github.com/2xsaiko/BuildCraft.git | Java | 102 lines
19
20import net.minecraftforge.fml.common.registry.ForgeRegistries;
21import net.minecraftforge.oredict.OreDictionary;
34
35        for (IRecipe recipe : ForgeRegistries.RECIPES) {
36            if (checkRecipeUses(recipe, target)) {
79
80        for (IRecipe recipe : ForgeRegistries.RECIPES) {
81            if (recipe instanceof IRecipeViewable) {
RegistryUtil.java https://github.com/2xsaiko/BuildCraft.git | Java | 22 lines
11
12import net.minecraftforge.fml.common.registry.ForgeRegistries;
13
15    public static boolean isRegistered(Block block) {
16        return ForgeRegistries.BLOCKS.containsValue(block);
17    }
19    public static boolean isRegistered(Item item) {
20        return ForgeRegistries.ITEMS.containsValue(item);
21    }
TagManager.java https://github.com/2xsaiko/BuildCraft.git | Java | 206 lines
19
20import net.minecraftforge.fml.common.registry.ForgeRegistries;
21
33        ResourceLocation loc = new ResourceLocation(regTag);
34        if (ForgeRegistries.ITEMS.containsKey(loc)) {
35            return ForgeRegistries.ITEMS.getValue(loc);
BiomeTextureConfig.java https://github.com/AntiqueAtlasTeam/AntiqueAtlas.git | Java | 97 lines
10import net.minecraft.world.biome.Biome;
11import net.minecraftforge.fml.common.registry.ForgeRegistries;
12import net.minecraftforge.fml.relauncher.Side;
54		for (Entry<String, JsonElement> entry : json.entrySet()) {
55			Biome biome = ForgeRegistries.BIOMES.getValue(new ResourceLocation(entry.getKey()));
56			if (biome == null) {
EvilCraftSoundEvents.java https://github.com/CyclopsMC/EvilCraft.git | Java | 46 lines
6import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
7import net.minecraftforge.fml.common.registry.ForgeRegistries;
8import net.minecraftforge.registries.IForgeRegistry;
33    public static void registerSoundEvents(RegistryEvent.Register event) {
34        if (event.getRegistry() == ForgeRegistries.SOUND_EVENTS) {
35            effect_vengeancebeam_base = getRegisteredSoundEvent(event.getRegistry(), "effect.vengeancebeam.base");
BlockRegistryHandler.java https://github.com/ZonicAir/InfiniTech.git | Java | 63 lines
8import net.minecraftforge.registries.DeferredRegister;
9import net.minecraftforge.registries.ForgeRegistries;
10
13    //Deferred Registries
14    public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, InfiniTech.MOD_ID);
15    public static final DeferredRegister<Item> BLOCKITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, InfiniTech.MOD_ID);
BlockGate.java https://bitbucket.org/AzureZhen/dothack-models.git | Java | 145 lines
24import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
25import net.minecraftforge.fml.common.registry.ForgeRegistries;
26import net.minecraftforge.fml.relauncher.Side;
49		block.setRegistryName("gater1");
50		ForgeRegistries.BLOCKS.register(block);
51		item = new ItemBlock(block).setRegistryName(block.getRegistryName());
51		item = new ItemBlock(block).setRegistryName(block.getRegistryName());
52		ForgeRegistries.ITEMS.register(item);
53	}
DynmapPlugin.java git://github.com/webbukkit/dynmap.git | Java | 2,110 lines
76import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent;
77import net.minecraftforge.registries.ForgeRegistries;
78import net.minecraftforge.registries.ForgeRegistry;
264        	biomelist = new Biome[256];
265        	Iterator<Biome> iter = ForgeRegistries.BIOMES.iterator();
266        	while (iter.hasNext()) {
1 2 3