本文整理汇总了Java中net.minecraft.network.play.client.C0FPacketConfirmTransaction类的典型用法代码示例。如果您正苦于以下问题:Java C0FPacketConfirmTransaction类的具体用法?Java C0FPacketConfirmTransaction怎么用?Java C0FPacketConfirmTransaction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
C0FPacketConfirmTransaction类属于net.minecraft.network.play.client包,在下文中一共展示了C0FPacketConfirmTransaction类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Verifies that the server and client are synchronized with respect to the inventory/container opened by the player
* and confirms if it is the case.
*/
public void handleConfirmTransaction(S32PacketConfirmTransaction packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Container container = null;
EntityPlayer entityplayer = this.gameController.thePlayer;
if (packetIn.getWindowId() == 0)
{
container = entityplayer.inventoryContainer;
}
else if (packetIn.getWindowId() == entityplayer.openContainer.windowId)
{
container = entityplayer.openContainer;
}
if (container != null && !packetIn.func_148888_e())
{
this.addToSendQueue(new C0FPacketConfirmTransaction(packetIn.getWindowId(), packetIn.getActionNumber(), true));
}
}
示例2: handleConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Verifies that the server and client are synchronized with respect to the
* inventory/container opened by the player and confirms if it is the case.
*/
public void handleConfirmTransaction(S32PacketConfirmTransaction packetIn) {
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.gameController);
Container container = null;
EntityPlayer entityplayer = this.gameController.thePlayer;
if (packetIn.getWindowId() == 0) {
container = entityplayer.inventoryContainer;
} else if (packetIn.getWindowId() == entityplayer.openContainer.windowId) {
container = entityplayer.openContainer;
}
if (container != null && !packetIn.func_148888_e()) {
this.addToSendQueue(
new C0FPacketConfirmTransaction(packetIn.getWindowId(), packetIn.getActionNumber(), true));
}
}
示例3: handleConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Verifies that the server and client are synchronized with respect to the inventory/container opened by the player
* and confirms if it is the case.
*/
public void handleConfirmTransaction(S32PacketConfirmTransaction p_147239_1_)
{
Container var2 = null;
EntityClientPlayerMP var3 = this.gameController.thePlayer;
if (p_147239_1_.func_148889_c() == 0)
{
var2 = var3.inventoryContainer;
}
else if (p_147239_1_.func_148889_c() == var3.openContainer.windowId)
{
var2 = var3.openContainer;
}
if (var2 != null && !p_147239_1_.func_148888_e())
{
this.addToSendQueue(new C0FPacketConfirmTransaction(p_147239_1_.func_148889_c(), p_147239_1_.func_148890_d(), true));
}
}
示例4: handleConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
public void handleConfirmTransaction(S32PacketConfirmTransaction p_147239_1_)
{
Container container = null;
EntityClientPlayerMP entityclientplayermp = this.gameController.thePlayer;
if (p_147239_1_.func_148889_c() == 0)
{
container = entityclientplayermp.inventoryContainer;
}
else if (p_147239_1_.func_148889_c() == entityclientplayermp.openContainer.windowId)
{
container = entityclientplayermp.openContainer;
}
if (container != null && !p_147239_1_.func_148888_e())
{
this.addToSendQueue(new C0FPacketConfirmTransaction(p_147239_1_.func_148889_c(), p_147239_1_.func_148890_d(), true));
}
}
示例5: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Received in response to the server requesting to confirm that the client-side open container matches the servers'
* after a mismatched container-slot manipulation. It will unlock the player's ability to manipulate the container
* contents
*/
public void processConfirmTransaction(C0FPacketConfirmTransaction packetIn)
{
PacketThreadUtil.checkThreadAndEnqueue(packetIn, this, this.playerEntity.getServerForPlayer());
Short oshort = (Short)this.field_147372_n.lookup(this.playerEntity.openContainer.windowId);
if (oshort != null && packetIn.getUid() == oshort.shortValue() && this.playerEntity.openContainer.windowId == packetIn.getWindowId() && !this.playerEntity.openContainer.getCanCraft(this.playerEntity) && !this.playerEntity.isSpectator())
{
this.playerEntity.openContainer.setCanCraft(this.playerEntity, true);
}
}
示例6: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Received in response to the server requesting to confirm that the client-side open container matches the servers'
* after a mismatched container-slot manipulation. It will unlock the player's ability to manipulate the container
* contents
*/
public void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_)
{
Short var2 = (Short)this.field_147372_n.lookup(this.playerEntity.openContainer.windowId);
if (var2 != null && p_147339_1_.func_149533_d() == var2.shortValue() && this.playerEntity.openContainer.windowId == p_147339_1_.func_149532_c() && !this.playerEntity.openContainer.isPlayerNotUsingContainer(this.playerEntity))
{
this.playerEntity.openContainer.setPlayerIsPresent(this.playerEntity, true);
}
}
示例7: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
public void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_)
{
if (this.playerEntity.isDead)
{
return; // CraftBukkit
}
Short oshort = (Short) this.field_147372_n.lookup(this.playerEntity.openContainer.windowId);
if (oshort != null && p_147339_1_.func_149533_d() == oshort.shortValue() && this.playerEntity.openContainer.windowId == p_147339_1_.func_149532_c() && !this.playerEntity.openContainer.isPlayerNotUsingContainer(this.playerEntity))
{
this.playerEntity.openContainer.setPlayerIsPresent(this.playerEntity, true);
}
}
示例8: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
public void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_)
{
Short oshort = (Short)this.field_147372_n.lookup(this.playerEntity.openContainer.windowId);
if (oshort != null && p_147339_1_.func_149533_d() == oshort.shortValue() && this.playerEntity.openContainer.windowId == p_147339_1_.func_149532_c() && !this.playerEntity.openContainer.isPlayerNotUsingContainer(this.playerEntity))
{
this.playerEntity.openContainer.setPlayerIsPresent(this.playerEntity, true);
}
}
示例9: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
@Override
public void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_) {
}
示例10: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Received in response to the server requesting to confirm that the client-side open container matches the servers'
* after a mismatched container-slot manipulation. It will unlock the player's ability to manipulate the container
* contents
*/
void processConfirmTransaction(C0FPacketConfirmTransaction packetIn);
示例11: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
/**
* Received in response to the server requesting to confirm that the client-side open container matches the servers'
* after a mismatched container-slot manipulation. It will unlock the player's ability to manipulate the container
* contents
*/
void processConfirmTransaction(C0FPacketConfirmTransaction var1);
示例12: processConfirmTransaction
import net.minecraft.network.play.client.C0FPacketConfirmTransaction; //导入依赖的package包/类
void processConfirmTransaction(C0FPacketConfirmTransaction p_147339_1_);