本文整理匯總了Java中net.minecraftforge.event.entity.EntityEvent.EntityConstructing方法的典型用法代碼示例。如果您正苦於以下問題:Java EntityEvent.EntityConstructing方法的具體用法?Java EntityEvent.EntityConstructing怎麽用?Java EntityEvent.EntityConstructing使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類net.minecraftforge.event.entity.EntityEvent
的用法示例。
在下文中一共展示了EntityEvent.EntityConstructing方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event) {
if(event.entity instanceof EntityPlayer) {
EntityPlayer player = (EntityPlayer) event.entity;
if(PlayerSymptoms.getForPlayer(player) == null) {
PlayerSymptoms.addToPlayer(player);
HealthMod.debug("Adding symptoms");
PlayerSymptoms.getForPlayer(player).addSymptom(new SymptomFever().instantiate(0));
PlayerSymptoms.getForPlayer(player).addSymptom(new SymptomNausea().instantiate(2));
}
if(PlayerBodyProperties.getForPlayer(player) == null) {
PlayerBodyProperties.addToPlayer(player);
}
if(PlayerDiseases.getForPlayer(player) == null) {
PlayerDiseases.addToPlayer(player);
}
}
}
示例2: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityPlayer && ARKPlayer.get((EntityPlayer) event.entity) == null)
{
ARKPlayer.register((EntityPlayer) event.entity, event.entity.worldObj);
if (event.entity.worldObj.isRemote) // On client
{
LogHelper.info("ARKPlayerEventHandler: Registered a new ARKPlayer on client.");
}
else
{
LogHelper.info("ARKPlayerEventHandler: Registered a new ARKPlayer on server.");
}
}
}
示例3: onPlayerJoinWorld
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@ForgeSubscribe
public void onPlayerJoinWorld(EntityEvent.EntityConstructing event)
{
if (event.entity != null)
if (event.entity.worldObj != null)
if (!event.entity.worldObj.isRemote)
if (event.entity instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) event.entity;
if (player
.getExtendedProperties(R0b0tsPlayerProperties.IDENTIFIER) == null)
player.registerExtendedProperties(
R0b0tsPlayerProperties.IDENTIFIER,
new R0b0tsPlayerProperties());
}
}
示例4: onEntityConstructEvent
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public static void onEntityConstructEvent(EntityEvent.EntityConstructing event)
{
Entity entity = event.getEntity();
if(entity instanceof EntityLivingBase) {
((EntityLivingBase) entity).getAttributeMap().registerAttribute(PHYSICAL_DAMAGE_RATE);
((EntityLivingBase) entity).getAttributeMap().registerAttribute(FIRE_DAMAGE_RATE);
}
}
示例5: entityConstruct
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void entityConstruct(EntityEvent.EntityConstructing e){
//add custom properties to players
if(e.entity instanceof EntityPlayer){
if(e.entity.getExtendedProperties(PlayerProperties.ID) == null){
e.entity.registerExtendedProperties(PlayerProperties.ID, new PlayerProperties());
}
}
}
示例6: entityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void entityConstructing(final EntityEvent.EntityConstructing event) {
if (event.getEntity() instanceof EntityPlayerSP) {
//System.out.println("Constructing player");
}
}
示例7: entityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void entityConstructing(final EntityEvent.EntityConstructing event) {
if (event.getEntity() instanceof EntityLivingBase) {
//event.getEntity().getDataManager().register(ENTITY_UBER, false);
event.getEntity().getDataManager().register(ENTITY_OVERHEAL, 0f);
}
if (event.getEntity() instanceof EntityPlayer && TF2UdpClient.instance != null) {
TF2UdpClient.instance.shutdown();
TF2UdpClient.instance = null;
}
}
示例8: onEntityConstruction
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent(priority = EventPriority.LOW)
public void onEntityConstruction(EntityEvent.EntityConstructing event)
{
Entity entity = event.getEntity();
if(entity instanceof EntityPlayer)
{
if(entity.world != null)
{
if(event.getEntity().world.isRemote)
{
CraftingParadise.proxy.registerCustomSky();
}
}
}
}
示例9: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityPlayerMP && GCPlayerStats.get((EntityPlayerMP) event.entity) == null)
{
GCPlayerStats.register((EntityPlayerMP) event.entity);
}
}
示例10: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityPlayerMP && GCPlayerStats.get((EntityPlayerMP) event.entity) == null)
{
GCPlayerStats.register((EntityPlayerMP) event.entity);
}
if (isClient)
{
this.onEntityConstructingClient(event);
}
}
示例11: onEntityConstructingClient
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SideOnly(Side.CLIENT)
public void onEntityConstructingClient(EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityClientPlayerMP)
{
if (GCPlayerStatsClient.get((EntityClientPlayerMP) event.entity) == null)
{
GCPlayerStatsClient.register((EntityClientPlayerMP) event.entity);
}
Minecraft.getMinecraft().gameSettings.sendSettingsToServer();
}
}
示例12: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event)
{
if (event.entity instanceof EntityPlayer && StatsHelper.get((EntityPlayer) event.entity) == null)
{
StatsHelper.register((EntityPlayer) event.entity);
}
}
示例13: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing (EntityEvent.EntityConstructing event) {
if (event.entity instanceof EntityPlayer && FWPlayerStats.get((EntityPlayer) event.entity) == null) {
FWPlayerStats.register((EntityPlayer) event.entity);
}
}
示例14: onEntityConstructing
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent
public void onEntityConstructing(EntityEvent.EntityConstructing event) {
Side side = FMLCommonHandler.instance().getEffectiveSide();
if (side == Side.SERVER) {
if (event.entity instanceof EntityPlayer) {
LoreStatusTracker.attachStatusTracker((EntityPlayer) event.entity);
}
}
}
示例15: on
import net.minecraftforge.event.entity.EntityEvent; //導入方法依賴的package包/類
@SubscribeEvent(priority = EventPriority.LOWEST)
public void on(EntityEvent.EntityConstructing e) {
if(e.entity instanceof EntityGolemBase) {
EntityGolemBase golem = (EntityGolemBase) e.entity;
golem.registerExtendedProperties(Gadomancy.MODID, new ExtendedGolemProperties(golem));
golem.getDataWatcher().addObject(ModConfig.golemDatawatcherId, "");
}
}