mirror of
https://github.com/refactorinqq/SLC-1.8.9.git
synced 2024-11-10 07:11:31 +01:00
Update PlayerControllerMPMixin.java
This commit is contained in:
parent
6de7309345
commit
f9cf54b43a
@ -15,7 +15,7 @@ public class PlayerControllerMPMixin {
|
||||
@Redirect(method = "onPlayerRightClick", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/network/NetHandlerPlayClient;addToSendQueue(Lnet/minecraft/network/Packet;)V"))
|
||||
public void fixPacketSend(NetHandlerPlayClient instance, Packet p_147297_1_) {
|
||||
ItemStack itemstack = Minecraft.getMinecraft().thePlayer.inventory.getCurrentItem();
|
||||
if(itemstack.getItem() == Items.diamond_sword || itemstack.getItem() == Items.stone_sword || itemstack.getItem() == Items.golden_sword || itemstack.getItem() == Items.iron_sword || itemstack.getItem() == Items.wooden_sword) {
|
||||
if(itemstack != null && (itemstack.getItem() == Items.diamond_sword || itemstack.getItem() == Items.stone_sword || itemstack.getItem() == Items.golden_sword || itemstack.getItem() == Items.iron_sword || itemstack.getItem() == Items.wooden_sword)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user