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


Java IExtendedEntityProperties.init方法代码示例

本文整理汇总了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_));
}
 
开发者ID:4Space,项目名称:4Space-5,代码行数:40,代码来源:EntityPlayer.java

示例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_);
    }
}
 
开发者ID:wildex999,项目名称:TickDynamic,代码行数:37,代码来源:Entity.java

示例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);
    }
}
 
开发者ID:HATB0T,项目名称:RuneCraftery,代码行数:37,代码来源:Entity.java

示例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_);
    }
}
 
开发者ID:xtrafrancyz,项目名称:Cauldron,代码行数:44,代码来源:Entity.java


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