Java Code Examples for net.minecraft.entity.player.EntityPlayer.interactWith()

The following are Jave code examples for showing how to use interactWith() of the net.minecraft.entity.player.EntityPlayer class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: DecompiledMinecraft   File: PlayerControllerMP.java   View Source Code Vote up 5 votes
/**
 * Send packet to server - player is interacting with another entity (left click)
 */
public boolean interactWithEntitySendPacket(EntityPlayer playerIn, Entity targetEntity)
{
    this.syncCurrentPlayItem();
    this.netClientHandler.addToSendQueue(new C02PacketUseEntity(targetEntity, C02PacketUseEntity.Action.INTERACT));
    return this.currentGameType != WorldSettings.GameType.SPECTATOR && playerIn.interactWith(targetEntity);
}
 
Example 2
Project: BaseClient   File: PlayerControllerMP.java   View Source Code Vote up 5 votes
/**
 * Send packet to server - player is interacting with another entity (left click)
 */
public boolean interactWithEntitySendPacket(EntityPlayer playerIn, Entity targetEntity)
{
    this.syncCurrentPlayItem();
    this.netClientHandler.addToSendQueue(new C02PacketUseEntity(targetEntity, C02PacketUseEntity.Action.INTERACT));
    return this.currentGameType != WorldSettings.GameType.SPECTATOR && playerIn.interactWith(targetEntity);
}
 
Example 3
Project: BaseClient   File: PlayerControllerMP.java   View Source Code Vote up 5 votes
/**
 * Send packet to server - player is interacting with another entity (left click)
 */
public boolean interactWithEntitySendPacket(EntityPlayer playerIn, Entity targetEntity)
{
    this.syncCurrentPlayItem();
    this.netClientHandler.addToSendQueue(new C02PacketUseEntity(targetEntity, C02PacketUseEntity.Action.INTERACT));
    return this.currentGameType != WorldSettings.GameType.SPECTATOR && playerIn.interactWith(targetEntity);
}