diff --git a/src/main/java/carpet/helpers/EntityPlayerActionPack.java b/src/main/java/carpet/helpers/EntityPlayerActionPack.java index 03bfa80d..4d153518 100644 --- a/src/main/java/carpet/helpers/EntityPlayerActionPack.java +++ b/src/main/java/carpet/helpers/EntityPlayerActionPack.java @@ -177,14 +177,10 @@ public class EntityPlayerActionPack public void onUpdate() { boolean used = false; + actions.entrySet().removeIf((e) -> e.getValue().done); for (Map.Entry e : actions.entrySet()) { Action action = e.getValue(); - if (action.done) - { - actions.remove(e.getKey()); - continue; - } if (used && e.getKey() == ActionType.ATTACK) continue; if (action.tick(this, e.getKey())) diff --git a/src/main/java/carpet/mixins/ClientPlayerInteractionManager_ghostBlocksMixin.java b/src/main/java/carpet/mixins/ClientPlayerInteractionManager_ghostBlocksMixin.java index eed14269..cf6ef1d1 100644 --- a/src/main/java/carpet/mixins/ClientPlayerInteractionManager_ghostBlocksMixin.java +++ b/src/main/java/carpet/mixins/ClientPlayerInteractionManager_ghostBlocksMixin.java @@ -6,6 +6,7 @@ import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.client.MinecraftClient; import net.minecraft.client.network.ClientPlayerInteractionManager; +import net.minecraft.item.AxeItem; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; import net.minecraft.server.network.packet.PlayerInteractBlockC2SPacket; @@ -42,9 +43,9 @@ public abstract class ClientPlayerInteractionManager_ghostBlocksMixin ) { ItemStack handItem = client.player.getMainHandStack(); - if (handItem.isEmpty() || + if (handItem.isEmpty() || ( ( handItem.getItem().getGroup() == ItemGroup.TOOLS || - handItem.getItem().getGroup() == ItemGroup.COMBAT + handItem.getItem().getGroup() == ItemGroup.COMBAT ) && !(handItem.getItem() instanceof AxeItem )) ) client.getNetworkHandler().sendPacket(new PlayerInteractBlockC2SPacket( Hand.MAIN_HAND,