mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 18:45:09 +00:00
Disable substitution test, substitutions are not managed the way they used to be.
We do not care about substitutions, People who replace entries should make them compatible with the existing item.
This commit is contained in:
1 parent
3437093256
commit
a03ffbc860
4 files changed
+18
-5
No files matched your search
@@ -137,7 +137,7 @@ public class DynBucketTest
|
||||
public void registrRecipes(RegistryEvent.Register<IRecipe> event)
|
||||
{
|
||||
ItemStack filledBucket = FluidUtil.getFilledBucket(new FluidStack(TestFluid.instance, Fluid.BUCKET_VOLUME));
|
||||
GameRegistry.addShapelessRecipe(new ResourceLocation(MODID, "diamond_to_fluid"), null, filledBucket, Ingredient.func_193368_a(Items.DIAMOND));
|
||||
GameRegistry.addShapelessRecipe(new ResourceLocation(MODID, "diamond_to_fluid"), null, filledBucket, Ingredient.fromItem(Items.DIAMOND));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
|
||||
@@ -38,7 +38,7 @@ public class NBTShareTagItemTest
|
||||
nbt.setBoolean("crafted", true);
|
||||
crafted.setTagCompound(nbt);
|
||||
|
||||
GameRegistry.addShapelessRecipe(new ResourceLocation(MODID, "nbt_share"), null, crafted, Ingredient.func_193367_a(Items.STICK));
|
||||
GameRegistry.addShapelessRecipe(new ResourceLocation(MODID, "nbt_share"), null, crafted, Ingredient.fromItem(Items.STICK));
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -2,12 +2,15 @@ package net.minecraftforge.debug;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.crafting.IRecipe;
|
||||
import net.minecraft.item.crafting.ShapedRecipes;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.event.RegistryEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.oredict.ShapedOreRecipe;
|
||||
|
||||
@Mod(modid = "recipetest", version = "1.0", acceptableRemoteVersions = "*")
|
||||
@@ -15,16 +18,22 @@ public class RecipeTestMod
|
||||
{
|
||||
@Mod.EventHandler
|
||||
public void preinit(FMLPreInitializationEvent event)
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void registerRecipes(RegistryEvent.Register<IRecipe> event)
|
||||
{
|
||||
ResourceLocation location1 = new ResourceLocation("recipetest", "dirt");
|
||||
ShapedOreRecipe recipe1 = new ShapedOreRecipe(location1, new ItemStack(Blocks.DIAMOND_BLOCK), "DDD", 'D', new ItemStack(Blocks.DIRT));
|
||||
recipe1.setRegistryName(location1);
|
||||
GameRegistry.register(recipe1);
|
||||
event.getRegistry().register(recipe1);
|
||||
|
||||
ResourceLocation location2 = new ResourceLocation("recipetest", "stone");
|
||||
CraftingHelper.ShapedPrimer primer1 = CraftingHelper.parseShaped("SSS", 'S', new ItemStack(Blocks.IRON_BLOCK));
|
||||
ShapedRecipes recipe2 = new ShapedRecipes(location2.getResourcePath(), primer1.width, primer1.height, primer1.input, new ItemStack(Blocks.GOLD_BLOCK));
|
||||
recipe2.setRegistryName(location2);
|
||||
GameRegistry.register(recipe2);
|
||||
event.getRegistry().register(recipe2);
|
||||
}
|
||||
}
|
||||
@@ -58,6 +58,10 @@ public class SubstitutionInjectionTest
|
||||
@Test
|
||||
public void testSubstitutionInjection() throws Exception
|
||||
{
|
||||
//TODO: Decide exactly how I want to deal with subs, this test doesn't really do anything right now
|
||||
if (true == Boolean.valueOf("true").booleanValue())
|
||||
return;
|
||||
|
||||
final ForgeRegistry<Block> blockRegistry = (ForgeRegistry<Block>)RegistryManager.ACTIVE.getRegistry(Block.class);
|
||||
final ForgeRegistry<Item> itemRegistry = (ForgeRegistry<Item>)RegistryManager.ACTIVE.getRegistry(Item.class);
|
||||
|
||||
|
||||
Reference in new issue
Block a user