fix errors and excepted axes from auto gb protection.

This commit is contained in:
gnembon committed 2019-10-04 22:57:52 -03:00
1 parent 62f4a4c113
commit 891cfbddde
2 files changed
+4 -7

No files matched your search

@@ -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,