Skip to content

Commit

Permalink
Potentially safer way to access the player send queue
Browse files Browse the repository at this point in the history
  • Loading branch information
squeek502 committed Sep 26, 2014
1 parent 56f9f09 commit 45de95b
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package iguanaman.hungeroverhaul.util;

import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.item.ItemStack;
import net.minecraft.network.play.client.C08PacketPlayerBlockPlacement;
import cpw.mods.fml.client.FMLClientHandler;
Expand All @@ -12,6 +11,6 @@ public class ClientHelper
{
public static void sendRightClickPacket(int x, int y, int z, int side, ItemStack currentItem, float hitX, float hitY, float hitZ)
{
((NetHandlerPlayClient) FMLClientHandler.instance().getClientPlayHandler()).addToSendQueue(new C08PacketPlayerBlockPlacement(x, y, z, side, currentItem, hitX, hitY, hitZ));
FMLClientHandler.instance().getClientPlayerEntity().sendQueue.addToSendQueue(new C08PacketPlayerBlockPlacement(x, y, z, side, currentItem, hitX, hitY, hitZ));
}
}

0 comments on commit 45de95b

Please sign in to comment.