feat: flattened the gilded wood blocks
This commit is contained in:
@@ -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?!
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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())){
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 4
|
||||
"item": "ebwizardry:acacia_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 4
|
||||
"item": "ebwizardry:acacia_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 2
|
||||
"item": "ebwizardry:birch_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 2
|
||||
"item": "ebwizardry:birch_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 5
|
||||
"item": "ebwizardry:dark_oak_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 5
|
||||
"item": "ebwizardry:dark_oak_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 4,
|
||||
"item": "ebwizardry:acacia_gilded_wood",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 2,
|
||||
"item": "ebwizardry:birch_gilded_wood",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 5,
|
||||
"item": "ebwizardry:dark_oak_gilded_wood",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 3,
|
||||
"item": "ebwizardry:jungle_gilded_wood",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 0,
|
||||
"item": "ebwizardry:oak_gilded_wood",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -16,8 +16,7 @@
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 1,
|
||||
"item": "ebwizardry:spruce_gilded_wood"
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 3
|
||||
"item": "ebwizardry:jungle_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 3
|
||||
"item": "ebwizardry:jungle_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 0
|
||||
"item": "ebwizardry:oak_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 0
|
||||
"item": "ebwizardry:oak_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -10,8 +10,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 1
|
||||
"item": "ebwizardry:spruce_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
@@ -13,8 +13,7 @@
|
||||
"item": "ebwizardry:grand_crystal"
|
||||
},
|
||||
"w": {
|
||||
"item": "ebwizardry:gilded_wood",
|
||||
"data": 1
|
||||
"item": "ebwizardry:spruce_gilded_wood"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user