Skip to content

Commit

Permalink
fix: allow placing basalt where basaltToLavaConversion kicks in
Browse files Browse the repository at this point in the history
fixes #60
  • Loading branch information
RubixDev committed Jan 8, 2025
1 parent ee39734 commit 5c87d4e
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/java/de/rubixdev/rug/mixins/WorldMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,11 @@ private void convertBasalt(
if (state.isOf(Blocks.BASALT)) {
BlockState prevState = ((BlockView) this).getBlockState(pos);
if (FluidHelper.shouldConvertToLava((BlockView) this, pos)) {
if (prevState.isOf(Blocks.LAVA) && prevState.getFluidState().isStill()) {
cir.setReturnValue(false);
return;
}

FluidHelper.playFizzleSound((WorldAccess) this, pos);
((WorldAccess) this)
.playSound(null, pos, SoundEvents.ITEM_BUCKET_EMPTY_LAVA, SoundCategory.BLOCKS, 1.0F, 1.0F);
cir.setReturnValue(this.setBlockState(pos, Blocks.LAVA.getDefaultState(), flags, maxUpdateDepth));
boolean couldPlace = this.setBlockState(pos, Blocks.LAVA.getDefaultState(), flags, maxUpdateDepth);
cir.setReturnValue(couldPlace || prevState.isOf(Blocks.LAVA) && prevState.getFluidState().isStill());
}
}
}
Expand Down

0 comments on commit 5c87d4e

Please sign in to comment.