got PineLog to render multiple textures need to fix facing
This commit is contained in:
parent
92396cba0c
commit
2a1c432588
4 changed files with 32 additions and 10 deletions
21
src/main/java/com/skdevstudios/util_rings/block/PineLog.java
Normal file
21
src/main/java/com/skdevstudios/util_rings/block/PineLog.java
Normal 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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.skdevstudios.util_rings.init;
|
package com.skdevstudios.util_rings.init;
|
||||||
|
|
||||||
import com.skdevstudios.util_rings.UtilRings;
|
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.Block;
|
||||||
import net.minecraft.world.level.block.Blocks;
|
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> 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> 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",
|
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)
|
.mapColor(MapColor.COLOR_BROWN)
|
||||||
.sound(SoundType.WOOD)
|
.sound(SoundType.WOOD)
|
||||||
.strength(2)
|
.strength(2)
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
{
|
{
|
||||||
"variants": {
|
"variants": {
|
||||||
"":{
|
"axis=x": { "model": "util_rings:block/pine_log", "x": 90, "y": 0 },
|
||||||
"model": "util_rings:block/pine_log"
|
"axis=y": { "model": "util_rings:block/pine_log"},
|
||||||
|
"axis=z": { "model": "util_rings:block/pine_log", "x": 90, "y": 90 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
{
|
{
|
||||||
"parent":"minecraft:block/cube_all",
|
"parent": "block/cube_column",
|
||||||
"textures": {
|
"textures": {
|
||||||
"all":"util_rings:block/pine/log"
|
"end": "util_rings:block/pine/log_top",
|
||||||
|
"side": "util_rings:block/pine/log"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in a new issue