当前位置: 首页>>代码示例>>Java>>正文


Java PlayerChangedDimensionEvent类代码示例

本文整理汇总了Java中net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent的典型用法代码示例。如果您正苦于以下问题:Java PlayerChangedDimensionEvent类的具体用法?Java PlayerChangedDimensionEvent怎么用?Java PlayerChangedDimensionEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PlayerChangedDimensionEvent类属于net.minecraftforge.fml.common.gameevent.PlayerEvent包,在下文中一共展示了PlayerChangedDimensionEvent类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: teleport

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void teleport(PlayerChangedDimensionEvent event) {
	if (CommonProxy.d == 0) {
		return;
	}
	if (event.player.world.isRemote) {
		return;
	}
	if (event.toDim == 0) {
		new SpawnTeleport(DimensionManager.getWorld(CommonProxy.d)).teleport(event.player, DimensionManager.getWorld(CommonProxy.d));
		event.setCanceled(true);
	}
}
 
开发者ID:trigg,项目名称:Firma,代码行数:14,代码来源:JoinHandler.java

示例2: onChangedDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void onChangedDimension(PlayerChangedDimensionEvent event)
{
	PlayerAether playerAether = PlayerAether.get(event.player);
	
	if (playerAether != null)
	{
		playerAether.onChangedDimension(event.toDim, event.fromDim);
	}
}
 
开发者ID:Modding-Legacy,项目名称:Aether-Legacy,代码行数:11,代码来源:PlayerAetherEvents.java

示例3: onPlayerChangedDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onPlayerChangedDimension(PlayerChangedDimensionEvent event) {
	IAttributeInstance maxHealthInstance = event.player.getAttributeMap().getAttributeInstance(SharedMonsterAttributes.MAX_HEALTH);
	AttributeModifier modifier = maxHealthInstance.getModifier(HealthHelper.LIFEBLOOD_HEALTH_MODIFIER_ID);
	
	if (SyncedConfigHandler.getBooleanValue(GameplayOption.ENABLE_LOWERED_STARTING_HEALTH) && modifier != null) { 
		Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
		multimap.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), modifier);
		event.player.getAttributeMap().applyAttributeModifiers(multimap);
	}
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:12,代码来源:ExMaxHealthHandler.java

示例4: onPlayerWarp

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerWarp(PlayerChangedDimensionEvent event) {
  IPlayerExtendedProperties props = CapabilityRegistry.getPlayerProperties(event.player);
  if (props.getMaxHealth() > 0 && event.player instanceof EntityPlayerMP) {
    //force clientside hearts to visually update
    ModCyclic.network.sendTo(new PacketSyncPlayerHealth(props.getMaxHealth()), (EntityPlayerMP) event.player);
  }
}
 
开发者ID:PrinceOfAmber,项目名称:Cyclic,代码行数:9,代码来源:ItemHeartContainer.java

示例5: onPlayerChangedDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public static void onPlayerChangedDimension(PlayerChangedDimensionEvent event)
{
    if(event.player instanceof EntityPlayerMP)
    {
        ExcavationRenderTracker.INSTANCE.updatePlayerTracking((EntityPlayerMP) event.player);
    }
}
 
开发者ID:grondag,项目名称:Hard-Science,代码行数:9,代码来源:CommonEventHandler.java

示例6: playerDimensionChange

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void playerDimensionChange(PlayerChangedDimensionEvent event) {
    RedstoneEther.server().resetPlayer(event.player);
    RedstoneEtherAddons.server().onDimensionChange(event.player);
}
 
开发者ID:TheCBProject,项目名称:WirelessRedstone,代码行数:6,代码来源:WREventHandler.java

示例7: changeDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
/** Updates the brightness when the player changes dimension. */
@SubscribeEvent
public static void changeDimension(PlayerChangedDimensionEvent event) {

    updateBrightness(event.toDim);
}
 
开发者ID:JayAvery,项目名称:accesstweaks,代码行数:7,代码来源:Maxbright.java

示例8: dimChangeEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void dimChangeEvent(PlayerChangedDimensionEvent event) {
    NEIServerConfig.forPlayer(event.player.getCommandSenderName()).onWorldReload();
}
 
开发者ID:SneakyTactician,项目名称:BIGB,代码行数:5,代码来源:ServerHandler.java

示例9: onPlayerChangedDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerChangedDimension(PlayerChangedDimensionEvent event) {
	SkinCore.updatePlayerSkin(event.player);
}
 
开发者ID:NekoCaffeine,项目名称:Alchemy,代码行数:5,代码来源:SkinCapability.java

示例10: dimChangeEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void dimChangeEvent(PlayerChangedDimensionEvent event) {
    NEIServerConfig.getSaveForPlayer(event.player.getName()).onWorldReload();
}
 
开发者ID:TheCBProject,项目名称:NotEnoughItems,代码行数:5,代码来源:ServerHandler.java

示例11: onEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent(priority = EventPriority.LOWEST)
public void onEvent(PlayerChangedDimensionEvent event) {
    ProgressionAPI.registry.fireTrigger(event.player, getProvider().getUnlocalisedName(), event.fromDim, event.toDim);
}
 
开发者ID:joshiejack,项目名称:Progression,代码行数:5,代码来源:TriggerChangeDimension.java

示例12: onPlayerChangedDimension

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerChangedDimension(PlayerChangedDimensionEvent event){
	event.player.getCapability(NecroDataCapabilityProvider.NECRO_DATA_CAP, null).triggerDimensionUnlock(event.toDim);
}
 
开发者ID:Shinoow,项目名称:AbyssalCraft,代码行数:5,代码来源:KnowledgeEventHandler.java

示例13: onPlayerChangedDimensionEvent

import net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent; //导入依赖的package包/类
@SubscribeEvent
public void onPlayerChangedDimensionEvent(PlayerChangedDimensionEvent event)
	{ sendBackpackStack(event.player, event.player); }
 
开发者ID:copygirl,项目名称:WearableBackpacks,代码行数:4,代码来源:ProxyCommon.java


注:本文中的net.minecraftforge.fml.common.gameevent.PlayerEvent.PlayerChangedDimensionEvent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。