本文整理匯總了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);
}