Skip to content

Commit

Permalink
some extra checks
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Feb 16, 2024
1 parent 5bbc11c commit bd2d9d2
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static void toolActionEvent(ZBlock.BlockToolModification event) {
BlockState state = event.getState();
Block block = state.getBlock();

if(waxableBlock.block == block) {
if(waxableBlock.block == block && state.getValue(waxableBlock.property)) {
event.setFinalState(copyState(state, waxableBlock.block)
.setValue(waxableBlock.property, false)
);
Expand Down Expand Up @@ -137,7 +137,7 @@ public static void itemUse(ZRightClickBlock event) {
}

for (BooleanPropertyWaxableBlock waxableBlock : booleanPropertySet) {
if(waxableBlock.block == block) {
if(waxableBlock.block == block && !state.getValue(waxableBlock.property)) {
if(event.getEntity() instanceof ServerPlayer sp)
CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger(sp, pos, stack);

Expand Down

0 comments on commit bd2d9d2

Please sign in to comment.