From c868bf3789c1fd5d4db6e5d56d7511237efca04d Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Sat, 22 Dec 2018 12:51:11 +0100 Subject: [PATCH] made ancient bark also wood Closes #20 (again) --- .../naturesaura/blocks/BlockAncientLog.java | 7 +++++-- .../ellpeck/naturesaura/blocks/ModBlocks.java | 4 ++-- .../naturesaura/blockstates/ancient_bark.json | 18 +++++++++++++++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientLog.java b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientLog.java index 0ff68de3..80431035 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientLog.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/BlockAncientLog.java @@ -13,13 +13,16 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; public class BlockAncientLog extends BlockLog implements IModItem, ICreativeItem, IModelProvider { - public BlockAncientLog() { + private final String baseName; + + public BlockAncientLog(String baseName) { + this.baseName = baseName; ModRegistry.add(this); } @Override public String getBaseName() { - return "ancient_log"; + return this.baseName; } @Override diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java b/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java index f321cf45..efaa16fd 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/ModBlocks.java @@ -6,8 +6,8 @@ import net.minecraft.block.material.Material; public final class ModBlocks { - public static final Block ANCIENT_LOG = new BlockAncientLog(); - public static final Block ANCIENT_BARK = new BlockImpl("ancient_bark", Material.WOOD).setSoundType(SoundType.WOOD).setHardness(2F); + public static final Block ANCIENT_LOG = new BlockAncientLog("ancient_log"); + public static final Block ANCIENT_BARK = new BlockAncientLog("ancient_bark"); public static final Block ANCIENT_PLANKS = new BlockImpl("ancient_planks", Material.WOOD).setSoundType(SoundType.WOOD).setHardness(2F); public static final Block ANCIENT_STAIRS = new BlockStairsNA("ancient_stairs", ANCIENT_PLANKS.getDefaultState()); public static final Block ANCIENT_SLAB = BlockSlabsNA.makeSlab("ancient_slab", Material.WOOD, SoundType.WOOD, 1.5F); diff --git a/src/main/resources/assets/naturesaura/blockstates/ancient_bark.json b/src/main/resources/assets/naturesaura/blockstates/ancient_bark.json index b246fa24..08ec3087 100644 --- a/src/main/resources/assets/naturesaura/blockstates/ancient_bark.json +++ b/src/main/resources/assets/naturesaura/blockstates/ancient_bark.json @@ -1,14 +1,26 @@ { "forge_marker": 1, "defaults": { - "model": "minecraft:cube_all", + "model": "minecraft:cube_column", "textures": { - "all": "naturesaura:blocks/ancient_log" + "end": "naturesaura:blocks/ancient_log", + "side": "naturesaura:blocks/ancient_log" }, "transform": "forge:default-block" }, "variants": { "normal": [{}], - "inventory": [{}] + "inventory": [{}], + "axis": { + "y": {}, + "z": { + "x": 90 + }, + "x": { + "x": 90, + "y": 90 + }, + "none": {} + } } } \ No newline at end of file