diff --git a/src/main/java/electroblob/wizardry/block/BlockGildedWood.java b/src/main/java/electroblob/wizardry/block/BlockGildedWood.java index 9e95cc6a..c5d933a6 100644 --- a/src/main/java/electroblob/wizardry/block/BlockGildedWood.java +++ b/src/main/java/electroblob/wizardry/block/BlockGildedWood.java @@ -1,17 +1,30 @@ package electroblob.wizardry.block; import electroblob.wizardry.registry.WizardryTabs; +import net.minecraft.block.Block; import net.minecraft.block.BlockPlanks; import net.minecraft.block.SoundType; +import net.minecraft.block.material.MapColor; +import net.minecraft.block.material.Material; +import net.minecraft.block.properties.IProperty; +import net.minecraft.block.properties.PropertyEnum; +import net.minecraft.block.state.BlockStateContainer; +import net.minecraft.block.state.IBlockState; +import net.minecraft.creativetab.CreativeTabs; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IStringSerializable; +import net.minecraft.util.NonNullList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.IBlockAccess; -public class BlockGildedWood extends BlockPlanks { +public class BlockGildedWood extends Block { - public BlockGildedWood(){ - super(); + public BlockGildedWood() + { + super(Material.WOOD); this.setCreativeTab(WizardryTabs.WIZARDRY); this.setHardness(2.0F); this.setResistance(5.0F); this.setSoundType(SoundType.WOOD); // Why is this protected?! } - -} +} \ No newline at end of file diff --git a/src/main/java/electroblob/wizardry/client/model/WizardryModels.java b/src/main/java/electroblob/wizardry/client/model/WizardryModels.java index de23d73b..e0e1e6b7 100644 --- a/src/main/java/electroblob/wizardry/client/model/WizardryModels.java +++ b/src/main/java/electroblob/wizardry/client/model/WizardryModels.java @@ -46,11 +46,6 @@ public final class WizardryModels { @SubscribeEvent public static void register(ModelRegistryEvent event){ - ModelLoader.setCustomStateMapper(WizardryBlocks.gilded_wood, new StateMap.Builder() - .withName(BlockPlanks.VARIANT).withSuffix("_gilded_wood").build()); - ItemBlockMultiTextured gildedWoodItem = (ItemBlockMultiTextured)Item.getItemFromBlock(WizardryBlocks.gilded_wood); - registerMultiTexturedModel(gildedWoodItem); - // Explanation for all this here -> https://github.com/TheGreyGhost/MinecraftByExample/tree/master/src/main/java/minecraftbyexample/mbe05_block_dynamic_block_model2 ModelLoaderRegistry.registerLoader(new ModelLoaderBookshelf()); diff --git a/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java b/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java index 692a07c7..ee56c792 100644 --- a/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java +++ b/src/main/java/electroblob/wizardry/registry/WizardryBlocks.java @@ -84,7 +84,12 @@ public final class WizardryBlocks { public static final Block healing_runestone_pedestal = placeholder(); public static final Block sorcery_runestone_pedestal = placeholder(); - public static final Block gilded_wood = placeholder(); + public static final Block acacia_gilded_wood = placeholder(); + public static final Block birch_gilded_wood = placeholder(); + public static final Block dark_oak_gilded_wood = placeholder(); + public static final Block jungle_gilded_wood = placeholder(); + public static final Block oak_gilded_wood = placeholder(); + public static final Block spruce_gilded_wood = placeholder(); public static final Block oak_bookshelf = placeholder(); public static final Block spruce_bookshelf = placeholder(); @@ -170,7 +175,12 @@ public final class WizardryBlocks { registerBlock(registry, "healing_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.HEALING)); registerBlock(registry, "sorcery_runestone_pedestal", new BlockRunestonePedestal(Material.ROCK, Element.SORCERY)); - registerBlock(registry, "gilded_wood", new BlockGildedWood()); + registerBlock(registry, "acacia_gilded_wood", new BlockGildedWood()); + registerBlock(registry, "birch_gilded_wood", new BlockGildedWood()); + registerBlock(registry, "dark_oak_gilded_wood", new BlockGildedWood()); + registerBlock(registry, "jungle_gilded_wood", new BlockGildedWood()); + registerBlock(registry, "oak_gilded_wood", new BlockGildedWood()); + registerBlock(registry, "spruce_gilded_wood", new BlockGildedWood()); registerBlock(registry, "oak_bookshelf", new BlockBookshelf()); registerBlock(registry, "spruce_bookshelf", new BlockBookshelf()); diff --git a/src/main/java/electroblob/wizardry/registry/WizardryItems.java b/src/main/java/electroblob/wizardry/registry/WizardryItems.java index b52121f1..0dd86adb 100644 --- a/src/main/java/electroblob/wizardry/registry/WizardryItems.java +++ b/src/main/java/electroblob/wizardry/registry/WizardryItems.java @@ -577,7 +577,20 @@ public final class WizardryItems { registerItemBlock(registry, WizardryBlocks.sorcery_runestone); registerItemBlock(registry, WizardryBlocks.healing_runestone); - registerMultiTexturedItemBlock(registry, WizardryBlocks.gilded_wood, true, woodTypes); + registerItemBlock(registry, WizardryBlocks.fire_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.ice_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.lightning_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.necromancy_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.earth_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.healing_runestone_pedestal); + registerItemBlock(registry, WizardryBlocks.sorcery_runestone_pedestal); + + registerItemBlock(registry, WizardryBlocks.acacia_gilded_wood); + registerItemBlock(registry, WizardryBlocks.birch_gilded_wood); + registerItemBlock(registry, WizardryBlocks.dark_oak_gilded_wood); + registerItemBlock(registry, WizardryBlocks.jungle_gilded_wood); + registerItemBlock(registry, WizardryBlocks.oak_gilded_wood); + registerItemBlock(registry, WizardryBlocks.spruce_gilded_wood); registerItemBlock(registry, WizardryBlocks.oak_bookshelf); registerItemBlock(registry, WizardryBlocks.spruce_bookshelf); diff --git a/src/main/java/electroblob/wizardry/worldgen/WoodTypeTemplateProcessor.java b/src/main/java/electroblob/wizardry/worldgen/WoodTypeTemplateProcessor.java index 99ac6d99..f5d6879a 100644 --- a/src/main/java/electroblob/wizardry/worldgen/WoodTypeTemplateProcessor.java +++ b/src/main/java/electroblob/wizardry/worldgen/WoodTypeTemplateProcessor.java @@ -1,5 +1,6 @@ package electroblob.wizardry.worldgen; +import electroblob.wizardry.block.BlockGildedWood; import electroblob.wizardry.registry.WizardryBlocks; import electroblob.wizardry.util.BlockUtils; import net.minecraft.block.Block; @@ -89,11 +90,24 @@ public class WoodTypeTemplateProcessor implements ITemplateProcessor { public Template.BlockInfo processBlock(World world, BlockPos pos, Template.BlockInfo info){ // Why do these each have their own property key? - if(info.blockState.getBlock() instanceof BlockPlanks){ // This covers gilded wood too + if(info.blockState.getBlock() instanceof BlockPlanks){ // This doesn't cover gilded wood return new Template.BlockInfo(info.pos, info.blockState.withProperty(BlockPlanks.VARIANT, woodType), info.tileentityData); - }else if(info.blockState.getBlock() instanceof BlockWoodSlab){ - return new Template.BlockInfo(info.pos, info.blockState.withProperty(BlockWoodSlab.VARIANT, woodType), info.tileentityData); - // This is a mess, no wonder the flattening happened + }else if(info.blockState.getBlock() instanceof BlockGildedWood){ + switch (woodType) { + case OAK: + return new Template.BlockInfo(info.pos, WizardryBlocks.oak_gilded_wood.getDefaultState(), info.tileentityData); + case SPRUCE: + return new Template.BlockInfo(info.pos, WizardryBlocks.spruce_gilded_wood.getDefaultState(), info.tileentityData); + case BIRCH: + return new Template.BlockInfo(info.pos, WizardryBlocks.birch_gilded_wood.getDefaultState(), info.tileentityData); + case JUNGLE: + return new Template.BlockInfo(info.pos, WizardryBlocks.jungle_gilded_wood.getDefaultState(), info.tileentityData); + case ACACIA: + return new Template.BlockInfo(info.pos, WizardryBlocks.acacia_gilded_wood.getDefaultState(), info.tileentityData); + case DARK_OAK: + return new Template.BlockInfo(info.pos, WizardryBlocks.dark_oak_gilded_wood.getDefaultState(), info.tileentityData); + } + // This is a mess, no wonder the flattening happened }else if(DOORS.containsValue(info.blockState.getBlock())){ return new Template.BlockInfo(info.pos, BlockUtils.copyState(DOORS.get(woodType), info.blockState), info.tileentityData); }else if(STAIRS.containsValue(info.blockState.getBlock())){ diff --git a/src/main/resources/assets/ebwizardry/lang/en_us.lang b/src/main/resources/assets/ebwizardry/lang/en_us.lang index 639a219a..297a16fc 100644 --- a/src/main/resources/assets/ebwizardry/lang/en_us.lang +++ b/src/main/resources/assets/ebwizardry/lang/en_us.lang @@ -31,7 +31,7 @@ tile.ebwizardry\:dry_frosted_ice.name=Dry Frosted Ice tile.ebwizardry\:crystal_flower_pot.name=Flower Pot tile.ebwizardry\:permafrost.name=Permafrost -tile.ebwizardry\:magic_crystal_block.name=Block of Crystal +tile.ebwizardry\:magic_crystal_block.name=Block of Magic Crystal tile.ebwizardry\:fire_crystal_block.name=Block of Fiery Crystal tile.ebwizardry\:ice_crystal_block.name=Block of Icy Crystal tile.ebwizardry\:lightning_crystal_block.name=Block of Stormy Crystal diff --git a/src/main/resources/assets/ebwizardry/recipes/acacia_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/acacia_bookshelf.json index 510f7286..81baed63 100644 --- a/src/main/resources/assets/ebwizardry/recipes/acacia_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/acacia_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 4 + "item": "ebwizardry:acacia_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/acacia_lectern.json b/src/main/resources/assets/ebwizardry/recipes/acacia_lectern.json index b785dbdf..be92accf 100644 --- a/src/main/resources/assets/ebwizardry/recipes/acacia_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/acacia_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 4 + "item": "ebwizardry:acacia_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/birch_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/birch_bookshelf.json index 5a0ed340..9b45b366 100644 --- a/src/main/resources/assets/ebwizardry/recipes/birch_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/birch_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 2 + "item": "ebwizardry:birch_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/birch_lectern.json b/src/main/resources/assets/ebwizardry/recipes/birch_lectern.json index cb4f6322..ee310e5b 100644 --- a/src/main/resources/assets/ebwizardry/recipes/birch_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/birch_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 2 + "item": "ebwizardry:birch_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/dark_oak_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/dark_oak_bookshelf.json index ffad88f7..8e73ca7c 100644 --- a/src/main/resources/assets/ebwizardry/recipes/dark_oak_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/dark_oak_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 5 + "item": "ebwizardry:dark_oak_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/dark_oak_lectern.json b/src/main/resources/assets/ebwizardry/recipes/dark_oak_lectern.json index 4f8354d8..7a93d26f 100644 --- a/src/main/resources/assets/ebwizardry/recipes/dark_oak_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/dark_oak_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 5 + "item": "ebwizardry:dark_oak_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_acacia_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_acacia_wood.json index fda2add0..a9df45b3 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_acacia_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_acacia_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 4, + "item": "ebwizardry:acacia_gilded_wood", "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_birch_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_birch_wood.json index 0679b0eb..6dc3c30a 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_birch_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_birch_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 2, + "item": "ebwizardry:birch_gilded_wood", "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_dark_oak_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_dark_oak_wood.json index 6ea664e4..ba7c73ab 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_dark_oak_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_dark_oak_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 5, + "item": "ebwizardry:dark_oak_gilded_wood", "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_jungle_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_jungle_wood.json index 17497047..89df1439 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_jungle_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_jungle_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 3, + "item": "ebwizardry:jungle_gilded_wood", "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_oak_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_oak_wood.json index 18da37be..51d185a4 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_oak_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_oak_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 0, + "item": "ebwizardry:oak_gilded_wood", "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/gilded_spruce_wood.json b/src/main/resources/assets/ebwizardry/recipes/gilded_spruce_wood.json index ec5c03e1..b15487a0 100644 --- a/src/main/resources/assets/ebwizardry/recipes/gilded_spruce_wood.json +++ b/src/main/resources/assets/ebwizardry/recipes/gilded_spruce_wood.json @@ -16,8 +16,7 @@ } }, "result": { - "item": "ebwizardry:gilded_wood", - "data": 1, + "item": "ebwizardry:spruce_gilded_wood" "count": 8 } } \ No newline at end of file diff --git a/src/main/resources/assets/ebwizardry/recipes/jungle_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/jungle_bookshelf.json index 20676b56..95672948 100644 --- a/src/main/resources/assets/ebwizardry/recipes/jungle_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/jungle_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 3 + "item": "ebwizardry:jungle_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/jungle_lectern.json b/src/main/resources/assets/ebwizardry/recipes/jungle_lectern.json index f1e85736..4c3b55f9 100644 --- a/src/main/resources/assets/ebwizardry/recipes/jungle_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/jungle_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 3 + "item": "ebwizardry:jungle_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/oak_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/oak_bookshelf.json index be8a2963..3e37b4a0 100644 --- a/src/main/resources/assets/ebwizardry/recipes/oak_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/oak_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 0 + "item": "ebwizardry:oak_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/oak_lectern.json b/src/main/resources/assets/ebwizardry/recipes/oak_lectern.json index e791bc85..22beed3a 100644 --- a/src/main/resources/assets/ebwizardry/recipes/oak_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/oak_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 0 + "item": "ebwizardry:oak_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/spruce_bookshelf.json b/src/main/resources/assets/ebwizardry/recipes/spruce_bookshelf.json index 291fb0c3..fa555fdd 100644 --- a/src/main/resources/assets/ebwizardry/recipes/spruce_bookshelf.json +++ b/src/main/resources/assets/ebwizardry/recipes/spruce_bookshelf.json @@ -10,8 +10,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 1 + "item": "ebwizardry:spruce_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/recipes/spruce_lectern.json b/src/main/resources/assets/ebwizardry/recipes/spruce_lectern.json index 459a8c38..b7bf71a4 100644 --- a/src/main/resources/assets/ebwizardry/recipes/spruce_lectern.json +++ b/src/main/resources/assets/ebwizardry/recipes/spruce_lectern.json @@ -13,8 +13,7 @@ "item": "ebwizardry:grand_crystal" }, "w": { - "item": "ebwizardry:gilded_wood", - "data": 1 + "item": "ebwizardry:spruce_gilded_wood" } }, "result": { diff --git a/src/main/resources/assets/ebwizardry/structures/library_ruins_0.nbt b/src/main/resources/assets/ebwizardry/structures/library_ruins_0.nbt index 5f5d5468..99b4796d 100644 Binary files a/src/main/resources/assets/ebwizardry/structures/library_ruins_0.nbt and b/src/main/resources/assets/ebwizardry/structures/library_ruins_0.nbt differ diff --git a/src/main/resources/assets/ebwizardry/structures/underground_library_ruins_2.nbt b/src/main/resources/assets/ebwizardry/structures/underground_library_ruins_2.nbt index 31599f1b..662626b0 100644 Binary files a/src/main/resources/assets/ebwizardry/structures/underground_library_ruins_2.nbt and b/src/main/resources/assets/ebwizardry/structures/underground_library_ruins_2.nbt differ