本文整理汇总了Java中net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerRespawnEvent方法的典型用法代码示例。如果您正苦于以下问题:Java PlayerEvent.PlayerRespawnEvent方法的具体用法?Java PlayerEvent.PlayerRespawnEvent怎么用?Java PlayerEvent.PlayerRespawnEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.fml.common.gameevent.PlayerEvent
的用法示例。
在下文中一共展示了PlayerEvent.PlayerRespawnEvent方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PlayerRespawnEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void PlayerRespawnEvent(PlayerEvent.PlayerRespawnEvent event) {
recalcTeams();
int totalKills = event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getInteger("warsmod_totalKill");
int killStreak = event.player.getEntityData().getInteger("warsmod_killstreak");
int deaths = event.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getInteger("warsmod_deaths");
PacketDispatcher.sendTo(new PacketKills(totalKills, killStreak, deaths), (EntityPlayerMP) event.player);
PacketDispatcher.sendTo(new PacketTeams(redPlayers, greenPlayers, bluePlayers, yellowPlayers), (EntityPlayerMP) event.player);
WarsSavedData savedWarsData = WarsSavedData.get(event.player.worldObj);
if (!savedWarsData.editMode.editModeToggle) {
PacketDispatcher.sendTo(new PacketOpenTeamSelect(), (EntityPlayerMP) event.player);
}
}
示例2: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
event.player.getEntityData().removeTag(IGNORE_REVIVAL_DEATH);
if (ModConfig.glowOnDeath) {
event.player.setGlowing(false);
}
}
示例3: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
@SuppressWarnings("unused")
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {
if (event.player == null) {
return;
}
if(checkGear(event.player)) {
equipGear(event.player);
} else {
unEquipGear(event.player);
}
}
示例4: onRespawned
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onRespawned(PlayerEvent.PlayerRespawnEvent event) {
EntityPlayer player = event.player;
updatePlayerSpechial(player);
updatePlayerSkills(player);
updatePlayerLevel(player);
updatePlayerWater(player);
updatePlayerRads(player);
PlayerParamsSetup.normalizer(player);
}
示例5: playerRespawnEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public static void playerRespawnEvent(PlayerEvent.PlayerRespawnEvent event)
{
if (FMLCommonHandler.instance().getEffectiveSide().isClient()) return;
InventoryPlayer oldInventory = map.get(event.player.getPersistentID());
if (oldInventory == null) return;
event.player.inventory.copyInventory(oldInventory);
map.remove(event.player.getPersistentID());
}
示例6: onRespawnSomewhere
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onRespawnSomewhere(PlayerEvent.PlayerRespawnEvent ev) {
this.sendRequest(ev.player);
}
示例7: onRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public static void onRespawn(PlayerEvent.PlayerRespawnEvent e)
{
e.player.getCapability(CapabilityRegistry.ENTRY_STORE_CAP, null).sync((EntityPlayerMP) e.player);
e.player.getCapability(CapabilityRegistry.AURA_CONTAINER_CAP, null).sync((EntityPlayerMP) e.player);
}
示例8: toLua
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@Override
public Proxy<PlayerEvent.PlayerRespawnEvent> toLua(PlayerEvent.PlayerRespawnEvent javaObj) {
return new Proxy<>(getConverters(), getMetatable(), javaObj);
}
示例9: fixReachDistance
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void fixReachDistance(PlayerEvent.PlayerRespawnEvent event) {
fixReachDistance((EntityPlayerMP)event.player);
}
示例10: onPlayerRespawn
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event)
{
JustEnoughDimensions.logInfo("PlayerEvent.PlayerRespawnEvent - DIM: {}", event.player.getEntityWorld().provider.getDimension());
this.syncAndSetPlayerData(event.player);
}
示例11: playerLoggedInEvent
import net.minecraftforge.fml.common.gameevent.PlayerEvent; //导入方法依赖的package包/类
@SubscribeEvent
public void playerLoggedInEvent(PlayerEvent.PlayerRespawnEvent event) {
if (FMLCommonHandler.instance().getEffectiveSide().isServer()) {
MobHandler.setMobSpawnTime(event.player);
}
}