Skip to content

Commit

Permalink
Fixed bug related to APG BMT
Browse files Browse the repository at this point in the history
  • Loading branch information
ZiYueCommentary committed Aug 8, 2024
1 parent aafa3c7 commit eabe666
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

public class BlockAPGGlassTianjinBMT extends BlockAPGGlass implements BlockFlagAPGTianjinBMT
{
public static final IntegerProperty ARROW_DIRECTION = IntegerProperty.of("propagate_property", 0, 2);
public static final EnumProperty<EnumDoorType> STYLE = EnumProperty.of("style", EnumDoorType.class);

@Nonnull
Expand Down Expand Up @@ -53,8 +54,8 @@ public ActionResult onUse2(BlockState state, World world, BlockPos pos, PlayerEn
setStyle.accept(false, IBlock.getStatePropertySafe(state, FACING).rotateYCounterclockwise());
} else {
world.setBlockState(pos, state.cycle(new Property<>(ARROW_DIRECTION.data)));
propagate(world, pos, IBlock.getStatePropertySafe(state, FACING).rotateYClockwise(), new Property<>(ARROW_DIRECTION.data), 1);
propagate(world, pos, IBlock.getStatePropertySafe(state, FACING).rotateYCounterclockwise(), new Property<>(ARROW_DIRECTION.data), 1);
propagate(world, pos, IBlock.getStatePropertySafe(state, FACING).rotateYClockwise(), new Property<>(ARROW_DIRECTION.data), 3);
propagate(world, pos, IBlock.getStatePropertySafe(state, FACING).rotateYCounterclockwise(), new Property<>(ARROW_DIRECTION.data), 3);
}
}, null, org.mtr.mod.Items.BRUSH.get(), ItemList.WRENCH.get());
} else {
Expand All @@ -80,8 +81,11 @@ public BlockEntityExtension createBlockEntity(BlockPos blockPos, BlockState bloc

@Override
public void addBlockProperties(List<HolderBase<?>> properties) {
properties.add(FACING);
properties.add(HALF);
properties.add(SIDE_EXTENDED);
properties.add(ARROW_DIRECTION);
properties.add(STYLE);
super.addBlockProperties(properties);
}

public static class BlockEntity extends BlockPSDTop.BlockEntityBase
Expand Down

0 comments on commit eabe666

Please sign in to comment.