got PineLog to render multiple textures need to fix facing

This commit is contained in:
Steven 2023-10-03 03:17:28 -04:00
parent 92396cba0c
commit 2a1c432588
4 changed files with 32 additions and 10 deletions

View file

@ -0,0 +1,21 @@
package com.skdevstudios.util_rings.block;
import net.minecraft.core.Direction;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.StateDefinition;
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
import net.minecraft.world.level.block.state.properties.EnumProperty;
public class PineLog extends Block {
public static final EnumProperty<Direction.Axis> AXIS = BlockStateProperties.AXIS;
public PineLog(Properties properties) {
super(properties);
}
@Override
protected void createBlockStateDefinition(StateDefinition.Builder<Block,BlockState> builder){
super.createBlockStateDefinition(builder);
builder.add(AXIS);
}
}

View file

@ -1,6 +1,7 @@
package com.skdevstudios.util_rings.init;
import com.skdevstudios.util_rings.UtilRings;
import com.skdevstudios.util_rings.block.PineLog;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
@ -17,7 +18,7 @@ public class BlockInit {
public static final RegistryObject<Block> LEAD_ORE = BLOCKS.register("lead_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE)));
public static final RegistryObject<Block> TIN_ORE = BLOCKS.register("tin_ore", () -> new Block(BlockBehaviour.Properties.copy(Blocks.IRON_ORE)));
public static final RegistryObject<Block> PINE_LOG = BLOCKS.register("pine_log",
() -> new Block(BlockBehaviour.Properties.of()
() -> new PineLog(BlockBehaviour.Properties.of()
.mapColor(MapColor.COLOR_BROWN)
.sound(SoundType.WOOD)
.strength(2)

View file

@ -1,8 +1,7 @@
{
"variants": {
"":{
"model": "util_rings:block/pine_log"
}
"axis=x": { "model": "util_rings:block/pine_log", "x": 90, "y": 0 },
"axis=y": { "model": "util_rings:block/pine_log"},
"axis=z": { "model": "util_rings:block/pine_log", "x": 90, "y": 90 }
}
}

View file

@ -1,6 +1,7 @@
{
"parent":"minecraft:block/cube_all",
"textures":{
"all":"util_rings:block/pine/log"
"parent": "block/cube_column",
"textures": {
"end": "util_rings:block/pine/log_top",
"side": "util_rings:block/pine/log"
}
}