Skip to content

Commit

Permalink
Fix Ball Registration Table Locks
Browse files Browse the repository at this point in the history
Bump Version
  • Loading branch information
FirstMegaGame4 committed Jul 12, 2024
1 parent 9e8b270 commit afbfb64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ yarn_mappings=1.21+build.1
loader_version=0.15.11

# Mod Properties
mod_version=0.1.7-beta
mod_version=0.1.8-beta
maven_group=com.mmodding.extravaganza
archives_base_name=extravaganza

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ protected ItemActionResult onUseWithItem(ItemStack stack, BlockState state, Worl

@Override
protected void onBlockBreakStart(BlockState state, World world, BlockPos pos, PlayerEntity player) {
if (world.getBlockEntity(pos) instanceof BallPoolRegistrationTableBlockEntity bpitbe && !world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SCAN)) {
if (!player.isSneaking() || world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SETTINGS)) {
if (world.getBlockEntity(pos) instanceof BallPoolRegistrationTableBlockEntity bpitbe) {
if (!player.isSneaking() && !world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SCAN)) {
bpitbe.switchSelectionMode();
if (!world.isClient()) {
Object object;
Expand All @@ -100,7 +100,7 @@ protected void onBlockBreakStart(BlockState state, World world, BlockPos pos, Pl
player.sendMessage(Text.literal(bpitbe.getSelectionMode().asString() + ": " + object), true);
}
}
else {
else if (!world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SETTINGS)) {
if (bpitbe.getPoolSettings().power < 15) {
bpitbe.getPoolSettings().power = MathHelper.clamp(bpitbe.getPoolSettings().power + 1, 1, 15);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ public WrenchAganzaItem(Settings settings) {

@Override
public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity miner) {
if (world.getBlockEntity(pos) instanceof BallPoolRegistrationTableBlockEntity bpitbe && !world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SCAN)) {
if (!miner.isSneaking() || world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SETTINGS)) {
if (world.getBlockEntity(pos) instanceof BallPoolRegistrationTableBlockEntity bpitbe) {
if (!miner.isSneaking() && !world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SCAN)) {
bpitbe.switchSelectionMode();
if (!world.isClient()) {
Object object;
Expand All @@ -36,7 +36,7 @@ public boolean canMine(BlockState state, World world, BlockPos pos, PlayerEntity
miner.sendMessage(Text.literal(bpitbe.getSelectionMode().asString() + ": " + object), true);
}
}
else {
else if (!world.getBlockState(pos).get(BallPoolRegistrationTableBlock.LOCK_SETTINGS)) {
if (bpitbe.getPoolSettings().power < 15) {
bpitbe.getPoolSettings().power = MathHelper.clamp(bpitbe.getPoolSettings().power + 1, 1, 15);
}
Expand Down

0 comments on commit afbfb64

Please sign in to comment.