本文整理汇总了Java中net.minecraftforge.common.IExtendedEntityProperties.init方法的典型用法代码示例。如果您正苦于以下问题:Java IExtendedEntityProperties.init方法的具体用法?Java IExtendedEntityProperties.init怎么用?Java IExtendedEntityProperties.init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类net.minecraftforge.common.IExtendedEntityProperties
的用法示例。
在下文中一共展示了IExtendedEntityProperties.init方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: clonePlayer
import net.minecraftforge.common.IExtendedEntityProperties; //导入方法依赖的package包/类
public void clonePlayer(EntityPlayer p_71049_1_, boolean p_71049_2_)
{
if (p_71049_2_)
{
this.inventory.copyInventory(p_71049_1_.inventory);
setHealth(p_71049_1_.getHealth());
this.foodStats = p_71049_1_.foodStats;
this.experienceLevel = p_71049_1_.experienceLevel;
this.experienceTotal = p_71049_1_.experienceTotal;
this.experience = p_71049_1_.experience;
setScore(p_71049_1_.getScore());
this.teleportDirection = p_71049_1_.teleportDirection;
this.extendedProperties = p_71049_1_.extendedProperties;
for (IExtendedEntityProperties p : this.extendedProperties.values()) {
p.init(this, this.worldObj);
}
}
else if (this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{
this.inventory.copyInventory(p_71049_1_.inventory);
this.experienceLevel = p_71049_1_.experienceLevel;
this.experienceTotal = p_71049_1_.experienceTotal;
this.experience = p_71049_1_.experience;
setScore(p_71049_1_.getScore());
}
this.theInventoryEnderChest = p_71049_1_.theInventoryEnderChest;
this.spawnChunkMap = p_71049_1_.spawnChunkMap;
this.spawnForcedMap = p_71049_1_.spawnForcedMap;
NBTTagCompound old = p_71049_1_.getEntityData();
if (old.hasKey("PlayerPersisted")) {
getEntityData().setTag("PlayerPersisted", old.getCompoundTag("PlayerPersisted"));
}
MinecraftForge.EVENT_BUS.post(new PlayerEvent.Clone(this, p_71049_1_, !p_71049_2_));
}
示例2: Entity
import net.minecraftforge.common.IExtendedEntityProperties; //导入方法依赖的package包/类
public Entity(World p_i1582_1_)
{
this.entityId = nextEntityID++;
this.renderDistanceWeight = 1.0D;
this.boundingBox = AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
this.field_70135_K = true;
this.width = 0.6F;
this.height = 1.8F;
this.nextStepDistance = 1;
this.rand = new Random();
this.fireResistance = 1;
this.firstUpdate = true;
this.entityUniqueID = UUID.randomUUID();
this.myEntitySize = Entity.EnumEntitySize.SIZE_2;
this.worldObj = p_i1582_1_;
this.setPosition(0.0D, 0.0D, 0.0D);
if (p_i1582_1_ != null)
{
this.dimension = p_i1582_1_.provider.dimensionId;
}
this.dataWatcher = new DataWatcher(this);
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
this.entityInit();
extendedProperties = new HashMap<String, IExtendedEntityProperties>();
MinecraftForge.EVENT_BUS.post(new EntityEvent.EntityConstructing(this));
for (IExtendedEntityProperties props : this.extendedProperties.values())
{
props.init(this, p_i1582_1_);
}
}
示例3: Entity
import net.minecraftforge.common.IExtendedEntityProperties; //导入方法依赖的package包/类
public Entity(World par1World)
{
this.entityId = nextEntityID++;
this.renderDistanceWeight = 1.0D;
this.boundingBox = AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
this.field_70135_K = true;
this.width = 0.6F;
this.height = 1.8F;
this.nextStepDistance = 1;
this.rand = new Random();
this.fireResistance = 1;
this.firstUpdate = true;
this.dataWatcher = new DataWatcher();
this.entityUniqueID = UUID.randomUUID();
this.myEntitySize = EnumEntitySize.SIZE_2;
this.worldObj = par1World;
this.setPosition(0.0D, 0.0D, 0.0D);
if (par1World != null)
{
this.dimension = par1World.provider.dimensionId;
}
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
this.entityInit();
extendedProperties = new HashMap<String, IExtendedEntityProperties>();
MinecraftForge.EVENT_BUS.post(new EntityEvent.EntityConstructing(this));
for (IExtendedEntityProperties props : this.extendedProperties.values())
{
props.init(this, par1World);
}
}
示例4: Entity
import net.minecraftforge.common.IExtendedEntityProperties; //导入方法依赖的package包/类
public Entity(World p_i1582_1_)
{
this.entityId = nextEntityID++;
this.renderDistanceWeight = 1.0D;
this.boundingBox = AxisAlignedBB.getBoundingBox(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
this.field_70135_K = true;
this.width = 0.6F;
this.height = 1.8F;
this.nextStepDistance = 1;
this.rand = new Random();
this.fireResistance = 1;
this.firstUpdate = true;
this.entityUniqueID = new UUID(rand.nextLong(), rand.nextLong()); // Spigot
this.myEntitySize = Entity.EnumEntitySize.SIZE_2;
this.worldObj = p_i1582_1_;
this.setPosition(0.0D, 0.0D, 0.0D);
if (p_i1582_1_ != null)
{
this.dimension = p_i1582_1_.provider.dimensionId;
// Spigot start
this.defaultActivationState = org.spigotmc.ActivationRange.initializeEntityActivationState(this, p_i1582_1_.getSpigotConfig()); // Cauldron
}
else
{
this.defaultActivationState = false;
}
// Spigot end
this.dataWatcher = new DataWatcher(this);
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
this.dataWatcher.addObject(1, Short.valueOf((short)300));
this.entityInit();
extendedProperties = new HashMap<String, IExtendedEntityProperties>();
MinecraftForge.EVENT_BUS.post(new EntityEvent.EntityConstructing(this));
for (IExtendedEntityProperties props : this.extendedProperties.values())
{
props.init(this, p_i1582_1_);
}
}