diff --git a/src/main/java/fr/sushi/charmsnfabrics/common/block/FloralWorkstation.java b/src/main/java/fr/sushi/charmsnfabrics/common/block/FloralWorkstation.java index 458cb21..77dbee2 100644 --- a/src/main/java/fr/sushi/charmsnfabrics/common/block/FloralWorkstation.java +++ b/src/main/java/fr/sushi/charmsnfabrics/common/block/FloralWorkstation.java @@ -4,7 +4,6 @@ import fr.sushi.charmsnfabrics.common.entities.block.FloralWorkstationBlockEntit import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.world.item.context.BlockPlaceContext; -import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.EntityBlock; import net.minecraft.world.level.block.HorizontalDirectionalBlock; @@ -14,33 +13,17 @@ import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.EnumProperty; -import net.minecraft.world.phys.shapes.CollisionContext; -import net.minecraft.world.phys.shapes.Shapes; -import net.minecraft.world.phys.shapes.VoxelShape; import org.jetbrains.annotations.Nullable; -import java.util.Map; - public class FloralWorkstation extends Block implements EntityBlock { public static final EnumProperty FACING = HorizontalDirectionalBlock.FACING; - private static final VoxelShape LEGS = - Shapes.or(Block.box(1.0, 0.0, 1.0, 3.0, 12.0, 3.0), - Block.box(1.0, 0.0, 13.0, 3.0, 12.0, 15.0), - Block.box(13.0, 0.0, 13.0, 15.0, 12.0, 15.0), - Block.box(13.0, 0.0, 1.0, 15.0, 12.0, 3.0)); - private static final VoxelShape TABLE = Block.column(16.0, 12.0, 14.0); - private static final VoxelShape SUPPORT = Block.column(12.0, 2.0, 3.0); - private static final Map SHAPES = - Shapes.rotateHorizontalAxis(Shapes.or(LEGS, TABLE, SUPPORT)); - public FloralWorkstation(BlockBehaviour.Properties properties) { super(properties); - this.registerDefaultState( - this.stateDefinition.any().setValue(FACING, Direction.NORTH)); + this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH)); } @Override @@ -63,13 +46,6 @@ public class FloralWorkstation extends Block implements EntityBlock return state.setValue(FACING, rot.rotate(state.getValue(FACING))); } - @Override - protected VoxelShape getShape(BlockState state, BlockGetter level, - BlockPos pos, CollisionContext context) - { - return SHAPES.get(state.getValue(FACING).getAxis()); - } - @Override public @Nullable BlockEntity newBlockEntity(BlockPos pos, BlockState state) { diff --git a/src/main/resources/assets/charmsnfabrics/models/block/floral_workstation.json b/src/main/resources/assets/charmsnfabrics/models/block/floral_workstation.json index cc39c4e..4d44158 100644 --- a/src/main/resources/assets/charmsnfabrics/models/block/floral_workstation.json +++ b/src/main/resources/assets/charmsnfabrics/models/block/floral_workstation.json @@ -2,7 +2,7 @@ "format_version": "1.21.6", "credit": "Made with Blockbench", "texture_size": [64, 64], - "render_type": "minecraft:cutout_mipped", + "render_type": "minecraft:cutout", "textures": { "0": "charmsnfabrics:block/floral_workstation", "particle": "minecraft:block/oak_planks" @@ -153,31 +153,6 @@ } } ], - "display": { - "thirdperson_righthand": { - "scale": [0.5, 0.5, 0.5] - }, - "thirdperson_lefthand": { - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_righthand": { - "scale": [0.5, 0.5, 0.5] - }, - "firstperson_lefthand": { - "scale": [0.5, 0.5, 0.5] - }, - "ground": { - "translation": [0, 2, 0], - "scale": [0.25, 0.25, 0.25] - }, - "gui": { - "rotation": [30, 45, 0], - "scale": [0.625, 0.625, 0.625] - }, - "head": { - "translation": [0, 1, 0] - } - }, "groups": [ { "name": "legs",