本文整理汇总了Java中com.bioxx.tfc.Core.Player.PlayerManagerTFC类的典型用法代码示例。如果您正苦于以下问题:Java PlayerManagerTFC类的具体用法?Java PlayerManagerTFC怎么用?Java PlayerManagerTFC使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PlayerManagerTFC类属于com.bioxx.tfc.Core.Player包,在下文中一共展示了PlayerManagerTFC类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onKeyInput
import com.bioxx.tfc.Core.Player.PlayerManagerTFC; //导入依赖的package包/类
@SubscribeEvent
public void onKeyInput(InputEvent.KeyInputEvent event) {
PlayerInfo pi = PlayerManagerTFC.getInstance().getClientPlayer();
EntityClientPlayerMP player = FMLClientHandler.instance().getClient().thePlayer;
if (FMLClientHandler.instance().getClient().inGameHasFocus &&
FMLClientHandler.instance().getClient().thePlayer.getCurrentEquippedItem() != null &&
FMLClientHandler.instance().getClient().currentScreen == null) {
if (Key_PrevChiselMode.isPressed()) {
if (player.getCurrentEquippedItem().getItem() instanceof ItemChisel) {
pi.setChiselMode(prevChiselMode(pi));
//Let's send the actual ChiselMode so the server/client does not
//come out of sync.
AbstractPacket pkt = new KeyPressPacket(pi.chiselMode);
TerraFirmaCraft.PACKET_PIPELINE.sendToServer(pkt);
}
}
}
}
示例2: actionHandlerBuy
import com.bioxx.tfc.Core.Player.PlayerManagerTFC; //导入依赖的package包/类
private void actionHandlerBuy(NBTTagCompound nbt)
{
UUID actionPlayerID = UUID.fromString(nbt.getString("playerID"));
UUID playerID = PlayerManagerTFC.getInstance().getPlayerInfoFromPlayer(this.entityplayer).playerUUID;
if(!actionPlayerID.equals(playerID))
return;
NBTTagCompound itemTag = nbt.getCompoundTag("Item");
ItemStack itemStack = ItemStack.loadItemStackFromNBT(itemTag);
this.entityplayer.inventory.setItemStack(itemStack);
}
示例3: actionSelectLimit
import com.bioxx.tfc.Core.Player.PlayerManagerTFC; //导入依赖的package包/类
public void actionSelectLimit(int goodSlotIndex)
{
_activeGoodSlotIndex = goodSlotIndex;
NBTTagCompound nbt = new NBTTagCompound();
nbt.setByte("Action", _actionId_SelectLimit);
nbt.setString("playername", PlayerManagerTFC.getInstance().getClientPlayer().playerName);
nbt.setInteger("GoodSlotIndex", goodSlotIndex);
this.broadcastPacketInRange(this.createDataPacket(nbt));
this.worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
示例4: actionSetLimit
import com.bioxx.tfc.Core.Player.PlayerManagerTFC; //导入依赖的package包/类
public void actionSetLimit(int goodSlotIndex, Integer limit)
{
NBTTagCompound nbt = new NBTTagCompound();
nbt.setByte("Action", _actionId_SetLimit);
nbt.setString("playername", PlayerManagerTFC.getInstance().getClientPlayer().playerName);
nbt.setInteger("GoodSlotIndex", goodSlotIndex);
if(limit != null)
nbt.setInteger("Limit", limit);
this.broadcastPacketInRange(this.createDataPacket(nbt));
this.worldObj.func_147479_m(xCoord, yCoord, zCoord);
}
示例5: actionBuy
import com.bioxx.tfc.Core.Player.PlayerManagerTFC; //导入依赖的package包/类
public void actionBuy(ItemStack itemStack)
{
NBTTagCompound nbt = new NBTTagCompound();
nbt.setByte("Action", _actionId_Buy);
nbt.setString("playerID", PlayerManagerTFC.getInstance().getClientPlayer().playerUUID.toString());
NBTTagCompound itemTag = new NBTTagCompound();
itemStack.writeToNBT(itemTag);
nbt.setTag("Item", itemTag);
this.broadcastPacketInRange(this.createDataPacket(nbt));
this.worldObj.func_147479_m(xCoord, yCoord, zCoord);
}