From 6935b01458ef718d2623073086f0c1d04c0926ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Sat, 16 Jul 2016 13:24:41 +0200 Subject: [PATCH] Register various (mostly wooden) things to the ore dictionary --- src/java/mmm/deco/DStairs.java | 2 + src/java/mmm/deco/slabs/DSlabParts.java | 2 + src/java/mmm/materials/trees/MTree.java | 134 ++---------------------- 3 files changed, 10 insertions(+), 128 deletions(-) diff --git a/src/java/mmm/deco/DStairs.java b/src/java/mmm/deco/DStairs.java index 7f571b4..d6811a4 100644 --- a/src/java/mmm/deco/DStairs.java +++ b/src/java/mmm/deco/DStairs.java @@ -13,6 +13,7 @@ import net.minecraft.block.state.IBlockState; import net.minecraft.init.Blocks; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; @@ -48,6 +49,7 @@ public class DStairs Blocks.FIRE.setFireInfo( stairs , materials.getBaseFireEncouragement( ) , materials.getBaseFlammability( ) * 4 ); } + OreDictionary.registerOre( "stairWood" , stairs ); return stairs; } diff --git a/src/java/mmm/deco/slabs/DSlabParts.java b/src/java/mmm/deco/slabs/DSlabParts.java index 0805c3d..5fde99f 100644 --- a/src/java/mmm/deco/slabs/DSlabParts.java +++ b/src/java/mmm/deco/slabs/DSlabParts.java @@ -12,6 +12,7 @@ import net.minecraft.init.Blocks; import net.minecraft.item.ItemSlab; import net.minecraft.item.ItemStack; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; @@ -35,6 +36,7 @@ public class DSlabParts Blocks.FIRE.setFireInfo( slab.DOUBLE , materials.getBaseFireEncouragement( ) , materials.getBaseFlammability( ) * 4 ); } + OreDictionary.registerOre( "slabWood" , slab.HALF ); return slab; } diff --git a/src/java/mmm/materials/trees/MTree.java b/src/java/mmm/materials/trees/MTree.java index 9abf686..29270eb 100644 --- a/src/java/mmm/materials/trees/MTree.java +++ b/src/java/mmm/materials/trees/MTree.java @@ -21,6 +21,7 @@ import net.minecraft.world.World; import net.minecraft.world.gen.feature.WorldGenAbstractTree; import net.minecraftforge.common.IPlantable; import net.minecraftforge.fml.common.registry.GameRegistry; +import net.minecraftforge.oredict.OreDictionary; @@ -228,6 +229,11 @@ public class MTree CRegistry.setFuel( sapling , this.baseFlammability * 30 ); } + OreDictionary.registerOre( "logWood" , LOG ); + OreDictionary.registerOre( "plankWood" , PLANKS ); + OreDictionary.registerOre( "treeLeaves" , LEAVES ); + OreDictionary.registerOre( "treeSapling" , SAPLING ); + CRegistry.addRecipeRegistrar( this ); return this; } @@ -378,134 +384,6 @@ public class MTree // Log -> charcoal GameRegistry.addSmelting( this.LOG , new ItemStack( Items.COAL , 1 , 1 ) , 0.15f ); - // Planks can be used to make... - // - crafting tables - GameRegistry.addShapedRecipe( new ItemStack( Blocks.CRAFTING_TABLE ) , // - "PP" , // - "PP" , // - 'P' , new ItemStack( this.PLANKS ) ); - // - chests - GameRegistry.addShapedRecipe( new ItemStack( Blocks.CHEST ) , // - "PPP" , // - "P P" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) ); - // - beds - GameRegistry.addShapedRecipe( new ItemStack( Items.BED ) , // - "WWW" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'W' , new ItemStack( Blocks.WOOL , 1 , 32767 ) ); - // - sticks - GameRegistry.addShapedRecipe( new ItemStack( Items.STICK , 4 ) , // - "P" , // - "P" , // - 'P' , new ItemStack( this.PLANKS ) ); - // - trap doors - GameRegistry.addShapedRecipe( new ItemStack( Blocks.TRAPDOOR , 2 ) , // - "PPP" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) ); - // - pressure plates - GameRegistry.addShapedRecipe( new ItemStack( Blocks.WOODEN_PRESSURE_PLATE ) , // - "PP" , // - 'P' , new ItemStack( this.PLANKS ) ); - // - pistons - GameRegistry.addShapedRecipe( new ItemStack( Blocks.PISTON ) , // - "PPP" , // - "CIC" , // - "CRC" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'C' , new ItemStack( Blocks.COBBLESTONE ) , // - 'I' , new ItemStack( Items.IRON_INGOT ) , // - 'R' , new ItemStack( Items.REDSTONE ) ); - // - note blocks - GameRegistry.addShapedRecipe( new ItemStack( Blocks.NOTEBLOCK ) , // - "PPP" , // - "PRP" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'R' , new ItemStack( Items.REDSTONE ) ); - // - signs - GameRegistry.addShapedRecipe( new ItemStack( Items.SIGN , 3 ) , // - "PPP" , // - "PPP" , // - " S " , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - bowls - GameRegistry.addShapedRecipe( new ItemStack( Items.BOWL , 4 ) , // - "P P" , // - " P " , // - 'P' , new ItemStack( this.PLANKS ) ); - // - jukeboxes - GameRegistry.addShapedRecipe( new ItemStack( Blocks.JUKEBOX ) , // - "PPP" , // - "PDP" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'D' , new ItemStack( Items.DIAMOND ) ); - // - buttons - GameRegistry.addShapelessRecipe( new ItemStack( Blocks.WOODEN_BUTTON ) , // - new ItemStack( this.PLANKS ) ); - // - bookshelves - GameRegistry.addShapedRecipe( new ItemStack( Blocks.BOOKSHELF ) , // - "PPP" , // - "BBB" , // - "PPP" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'B' , new ItemStack( Items.BOOK ) ); - // - tripwire hooks - GameRegistry.addShapedRecipe( new ItemStack( Blocks.TRIPWIRE_HOOK , 2 ) , // - "I" , // - "S" , // - "P" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'I' , new ItemStack( Items.IRON_INGOT ) , // - 'S' , new ItemStack( Items.STICK ) ); - - // - swords - GameRegistry.addShapedRecipe( new ItemStack( Items.WOODEN_SWORD ) , // - "P" , // - "P" , // - "S" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - shovels - GameRegistry.addShapedRecipe( new ItemStack( Items.WOODEN_SHOVEL ) , // - "P" , // - "S" , // - "S" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - pickaxes - GameRegistry.addShapedRecipe( new ItemStack( Items.WOODEN_PICKAXE ) , // - "PPP" , // - " S " , // - " S " , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - axes - GameRegistry.addShapedRecipe( new ItemStack( Items.WOODEN_AXE ) , // - "PP" , // - "PS" , // - " S" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - hoes - GameRegistry.addShapedRecipe( new ItemStack( Items.WOODEN_HOE ) , // - "PP" , // - " S" , // - " S" , // - 'P' , new ItemStack( this.PLANKS ) , // - 'S' , new ItemStack( Items.STICK ) ); - // - shields - GameRegistry.addShapedRecipe( new ItemStack( Items.SHIELD ) , // - "PIP" , // - "PPP" , // - " P " , // - 'P' , new ItemStack( this.PLANKS ) , // - 'I' , new ItemStack( Items.IRON_INGOT ) ); } }