Java 类net.minecraft.item.ItemInWorldManager 实例源码
项目:RuneCraftery
文件:EntityPlayerMP.java
public EntityPlayerMP(MinecraftServer p_i1523_1_, World p_i1523_2_, String p_i1523_3_, ItemInWorldManager p_i1523_4_) {
super(p_i1523_2_, p_i1523_3_);
p_i1523_4_.field_73090_b = this;
this.field_71134_c = p_i1523_4_;
this.field_71142_cm = p_i1523_1_.func_71203_ab().func_72395_o();
ChunkCoordinates var5 = p_i1523_2_.func_72861_E();
int var6 = var5.field_71574_a;
int var7 = var5.field_71573_c;
int var8 = var5.field_71572_b;
if(!p_i1523_2_.field_73011_w.field_76576_e && p_i1523_2_.func_72912_H().func_76077_q() != EnumGameType.ADVENTURE) {
int var9 = Math.max(5, p_i1523_1_.func_82357_ak() - 6);
var6 += this.field_70146_Z.nextInt(var9 * 2) - var9;
var7 += this.field_70146_Z.nextInt(var9 * 2) - var9;
var8 = p_i1523_2_.func_72825_h(var6, var7);
}
this.field_71133_b = p_i1523_1_;
this.field_70138_W = 0.0F;
this.field_70129_M = 0.0F;
this.func_70012_b((double)var6 + 0.5D, (double)var8, (double)var7 + 0.5D, 0.0F, 0.0F);
while(!p_i1523_2_.func_72945_a(this, this.field_70121_D).isEmpty()) {
this.func_70107_b(this.field_70165_t, this.field_70163_u + 1.0D, this.field_70161_v);
}
}
项目:RuneCraftery
文件:EntityPlayerMP.java
public EntityPlayerMP(MinecraftServer par1MinecraftServer, World par2World, String par3Str, ItemInWorldManager par4ItemInWorldManager)
{
super(par2World, par3Str);
par4ItemInWorldManager.thisPlayerMP = this;
this.theItemInWorldManager = par4ItemInWorldManager;
if (par1MinecraftServer == null) //ToDo: Remove this in 1.7, Fake players shouldn't be used purely client side.
this.renderDistance = 0;
else
this.renderDistance = par1MinecraftServer.getConfigurationManager().getViewDistance();
ChunkCoordinates chunkcoordinates = par2World.provider.getRandomizedSpawnPoint();
int i = chunkcoordinates.posX;
int j = chunkcoordinates.posZ;
int k = chunkcoordinates.posY;
this.mcServer = par1MinecraftServer;
this.stepHeight = 0.0F;
this.yOffset = 0.0F;
this.setLocationAndAngles((double)i + 0.5D, (double)k, (double)j + 0.5D, 0.0F, 0.0F);
while (!par2World.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty())
{
this.setPosition(this.posX, this.posY + 1.0D, this.posZ);
}
}
项目:BetterNutritionMod
文件:EntityPlayerMP.java
public EntityPlayerMP(MinecraftServer par1MinecraftServer, World par2World, String par3Str, ItemInWorldManager par4ItemInWorldManager)
{
super(par2World, par3Str);
par4ItemInWorldManager.thisPlayerMP = this;
this.theItemInWorldManager = par4ItemInWorldManager;
if (par1MinecraftServer == null) //ToDo: Remove this in 1.7, Fake players shouldn't be used purely client side.
this.renderDistance = 0;
else
this.renderDistance = par1MinecraftServer.getConfigurationManager().getViewDistance();
ChunkCoordinates chunkcoordinates = par2World.provider.getRandomizedSpawnPoint();
int i = chunkcoordinates.posX;
int j = chunkcoordinates.posZ;
int k = chunkcoordinates.posY;
this.mcServer = par1MinecraftServer;
this.stepHeight = 0.0F;
this.yOffset = 0.0F;
this.setLocationAndAngles((double)i + 0.5D, (double)k, (double)j + 0.5D, 0.0F, 0.0F);
while (!par2World.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty())
{
this.setPosition(this.posX, this.posY + 1.0D, this.posZ);
}
}
项目:RuneCraftery
文件:FakePlayer.java
public FakePlayer(World world, String name)
{
super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, name, new ItemInWorldManager(world));
}
项目:RuneCraftery
文件:FakePlayer.java
public FakePlayer(World world, String name)
{
super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, name, new ItemInWorldManager(world));
}
项目:BetterNutritionMod
文件:FakePlayer.java
public FakePlayer(World world, String name)
{
super(FMLCommonHandler.instance().getMinecraftServerInstance(), world, name, new ItemInWorldManager(world));
}