PageRenderTime 186ms queryFilters 0ms Sphinxql 10ms app.CodeModel.GetByIds 157ms findMatchingLines 4ms GetByIds 161ms meta 0ms repositoryFilters 1ms languageFilters 0ms sourceFilters 0ms

14 results for 'ForgeRegistries' (186 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        }
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;
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);
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()) {
GuideCraftingFactory.java https://github.com/2xsaiko/BuildCraft.git | Java | 178 lines
18import net.minecraftforge.common.crafting.IShapedRecipe;
19import net.minecraftforge.fml.common.registry.ForgeRegistries;
20import net.minecraftforge.fml.relauncher.Side;
51    public static GuidePartFactory create(@Nonnull ItemStack stack) {
52        for (IRecipe recipe : ForgeRegistries.RECIPES) {
53            if (OreDictionary.itemMatches(stack, StackUtil.asNonNull(recipe.getRecipeOutput()), false)) {
ListHandler.java https://github.com/2xsaiko/BuildCraft.git | Java | 290 lines
20
21import net.minecraftforge.fml.common.registry.ForgeRegistries;
22import net.minecraftforge.fml.relauncher.Side;
189            if (handlersCustom.size() > 0) {
190                for (Item i : ForgeRegistries.ITEMS) {
191                    NonNullList<ItemStack> examples = NonNullList.create();
FacadeStateManager.java https://github.com/2xsaiko/BuildCraft.git | Java | 422 lines
49import net.minecraftforge.fml.common.event.FMLInterModComms.IMCMessage;
50import net.minecraftforge.fml.common.registry.ForgeRegistries;
51
208        defaultState = new FacadeBlockStateInfo(Blocks.AIR.getDefaultState(), StackUtil.EMPTY, ImmutableSet.of());
209        for (Block block : ForgeRegistries.BLOCKS) {
210            if (!DEBUG && KNOWN_INVALID_REPORTED_MODS.contains(block.getRegistryName().getResourceDomain())) {
1