From 0749e354315d67141b6e0bc721c7d94defeeabe1 Mon Sep 17 00:00:00 2001 From: GiantLuigi4 <49770992+GiantLuigi4@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:35:05 -0400 Subject: [PATCH] remove excess facing properties --- .../java/net/montoyo/wd/block/BlockPeripheral.java | 4 +--- src/main/java/net/montoyo/wd/block/BlockRCTRL.java | 5 +---- src/main/java/net/montoyo/wd/block/BlockRedCTRL.java | 5 +---- src/main/java/net/montoyo/wd/block/BlockScreen.java | 10 +--------- src/main/java/net/montoyo/wd/block/BlockServer.java | 5 +---- .../net/montoyo/wd/client/renderers/ScreenBaker.java | 1 + 6 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/main/java/net/montoyo/wd/block/BlockPeripheral.java b/src/main/java/net/montoyo/wd/block/BlockPeripheral.java index b16072c..30c344c 100644 --- a/src/main/java/net/montoyo/wd/block/BlockPeripheral.java +++ b/src/main/java/net/montoyo/wd/block/BlockPeripheral.java @@ -24,7 +24,6 @@ import net.minecraft.world.level.block.entity.BlockEntityType; 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.DirectionProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.Material; @@ -48,8 +47,7 @@ import org.jetbrains.annotations.Nullable; public class BlockPeripheral extends WDBlockContainer { public static final EnumProperty type = EnumProperty.create("type", DefaultPeripheral.class); - public static final DirectionProperty facing = DirectionProperty.create("facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST); - private static final Property[] properties = new Property[] { type, facing }; + private static final Property[] properties = new Property[] { type }; public BlockPeripheral() { super(BlockBehaviour.Properties.of(Material.STONE).strength(1.5f, 10.f)); diff --git a/src/main/java/net/montoyo/wd/block/BlockRCTRL.java b/src/main/java/net/montoyo/wd/block/BlockRCTRL.java index 7651b30..617b22a 100644 --- a/src/main/java/net/montoyo/wd/block/BlockRCTRL.java +++ b/src/main/java/net/montoyo/wd/block/BlockRCTRL.java @@ -5,7 +5,6 @@ package net.montoyo.wd.block; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -21,7 +20,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; 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.DirectionProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.Material; @@ -38,8 +36,7 @@ import org.jetbrains.annotations.Nullable; public class BlockRCTRL extends WDBlockContainer { public static final EnumProperty type = BlockPeripheral.type; - public static final DirectionProperty facing = DirectionProperty.create("facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST); - private static final Property[] properties = new Property[] {type, facing}; + private static final Property[] properties = new Property[] {type}; public BlockRCTRL() { super(BlockBehaviour.Properties.of(Material.STONE).strength(1.5f, 10.f)); diff --git a/src/main/java/net/montoyo/wd/block/BlockRedCTRL.java b/src/main/java/net/montoyo/wd/block/BlockRedCTRL.java index a1a2c4a..3b57af3 100644 --- a/src/main/java/net/montoyo/wd/block/BlockRedCTRL.java +++ b/src/main/java/net/montoyo/wd/block/BlockRedCTRL.java @@ -5,7 +5,6 @@ package net.montoyo.wd.block; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -21,7 +20,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; 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.DirectionProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.Material; @@ -38,8 +36,7 @@ import org.jetbrains.annotations.Nullable; public class BlockRedCTRL extends WDBlockContainer { public static final EnumProperty type = BlockPeripheral.type; - public static final DirectionProperty facing = DirectionProperty.create("facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST); - private static final Property[] properties = new Property[] {type, facing}; + private static final Property[] properties = new Property[] {type}; public BlockRedCTRL() { super(BlockBehaviour.Properties.of(Material.STONE).strength(1.5f, 10.f)); diff --git a/src/main/java/net/montoyo/wd/block/BlockScreen.java b/src/main/java/net/montoyo/wd/block/BlockScreen.java index 990501b..fac0299 100644 --- a/src/main/java/net/montoyo/wd/block/BlockScreen.java +++ b/src/main/java/net/montoyo/wd/block/BlockScreen.java @@ -24,9 +24,7 @@ import net.minecraft.world.level.block.RenderShape; import net.minecraft.world.level.block.entity.BlockEntity; 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.BooleanProperty; -import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.PushReaction; @@ -52,12 +50,6 @@ public class BlockScreen extends BaseEntityBlock { public static final BooleanProperty hasTE = BooleanProperty.create("haste"); public static final BooleanProperty emitting = BooleanProperty.create("emitting"); private static final Property[] properties = new Property[]{hasTE, emitting}; - public static final DirectionProperty FACING = BlockStateProperties.FACING; - - private static final int BAR_BOT = 1; - private static final int BAR_RIGHT = 2; - private static final int BAR_TOP = 4; - private static final int BAR_LEFT = 8; public BlockScreen(Properties properties) { super(properties.strength(1.5f, 10.f)); @@ -66,7 +58,7 @@ public class BlockScreen extends BaseEntityBlock { @Override protected void createBlockStateDefinition(StateDefinition.Builder builder) { - builder.add(properties).add(FACING); + builder.add(properties); } @Override diff --git a/src/main/java/net/montoyo/wd/block/BlockServer.java b/src/main/java/net/montoyo/wd/block/BlockServer.java index d19e2da..11e7400 100644 --- a/src/main/java/net/montoyo/wd/block/BlockServer.java +++ b/src/main/java/net/montoyo/wd/block/BlockServer.java @@ -5,7 +5,6 @@ package net.montoyo.wd.block; import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -21,7 +20,6 @@ import net.minecraft.world.level.block.entity.BlockEntity; 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.DirectionProperty; import net.minecraft.world.level.block.state.properties.EnumProperty; import net.minecraft.world.level.block.state.properties.Property; import net.minecraft.world.level.material.Material; @@ -41,8 +39,7 @@ import org.jetbrains.annotations.Nullable; public class BlockServer extends WDBlockContainer{ public static final EnumProperty type = BlockPeripheral.type; - public static final DirectionProperty facing = DirectionProperty.create("facing", Direction.NORTH, Direction.EAST, Direction.SOUTH, Direction.WEST); - private static final Property[] properties = new Property[] {type, facing}; + private static final Property[] properties = new Property[] {type}; public BlockServer() { super(BlockBehaviour.Properties.of(Material.STONE).strength(1.5f, 10.f)); diff --git a/src/main/java/net/montoyo/wd/client/renderers/ScreenBaker.java b/src/main/java/net/montoyo/wd/client/renderers/ScreenBaker.java index 7830388..4a01654 100644 --- a/src/main/java/net/montoyo/wd/client/renderers/ScreenBaker.java +++ b/src/main/java/net/montoyo/wd/client/renderers/ScreenBaker.java @@ -188,6 +188,7 @@ public class ScreenBaker implements BakedModel { builder.with(TEXTURES[i], res); } + return builder.build(); }