Skip to content
This repository has been archived by the owner on Jan 26, 2019. It is now read-only.

Commit

Permalink
Fix ender chest issue
Browse files Browse the repository at this point in the history
  • Loading branch information
sameer committed Feb 10, 2016
1 parent 68760c3 commit 3cd7948
Showing 1 changed file with 14 additions and 22 deletions.
36 changes: 14 additions & 22 deletions patches/net/minecraft/entity/player/EntityPlayer.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -284,23 +284,15 @@
if (p_70037_1_.hasKey("SpawnX", 99) && p_70037_1_.hasKey("SpawnY", 99) && p_70037_1_.hasKey("SpawnZ", 99))
{
this.spawnChunk = new ChunkCoordinates(p_70037_1_.getInteger("SpawnX"), p_70037_1_.getInteger("SpawnY"), p_70037_1_.getInteger("SpawnZ"));
@@ -903,7 +1021,6 @@
if (p_70037_1_.hasKey("EnderItems", 9))
{
NBTTagList nbttaglist1 = p_70037_1_.getTagList("EnderItems", 10);
- this.theInventoryEnderChest.loadInventoryFromNBT(nbttaglist1);
}
}

@@ -925,6 +1042,7 @@
@@ -925,6 +1043,7 @@
p_70014_1_.setInteger("SpawnY", this.spawnChunk.posY);
p_70014_1_.setInteger("SpawnZ", this.spawnChunk.posZ);
p_70014_1_.setBoolean("SpawnForced", this.spawnForced);
+ p_70014_1_.setString("SpawnWorld", spawnWorld); // CraftBukkit - fixes bed spawns for multiworld worlds
}

NBTTagList spawnlist = new NBTTagList();
@@ -1003,7 +1121,7 @@
@@ -1003,7 +1122,7 @@
{
if (this.worldObj.difficultySetting == EnumDifficulty.PEACEFUL)
{
Expand All @@ -309,7 +301,7 @@
}

if (this.worldObj.difficultySetting == EnumDifficulty.EASY)
@@ -1017,7 +1135,7 @@
@@ -1017,7 +1136,7 @@
}
}

Expand All @@ -318,7 +310,7 @@
{
return false;
}
@@ -1039,9 +1157,40 @@
@@ -1039,9 +1158,40 @@

public boolean canAttackPlayer(EntityPlayer p_96122_1_)
{
Expand Down Expand Up @@ -362,7 +354,7 @@
}

protected void damageArmor(float p_70675_1_)
@@ -1073,19 +1222,34 @@
@@ -1073,19 +1223,34 @@
return (float)i / (float)this.inventory.armorInventory.length;
}

Expand Down Expand Up @@ -399,15 +391,15 @@
p_70665_2_ = this.applyPotionDamageCalculations(p_70665_1_, p_70665_2_);
float f1 = p_70665_2_;
p_70665_2_ = Math.max(p_70665_2_ - this.getAbsorptionAmount(), 0.0F);
@@ -1099,6 +1263,7 @@
@@ -1099,6 +1264,7 @@
this.func_110142_aN().func_94547_a(p_70665_1_, f2, p_70665_2_);
}
}
+ return true;
}

public void func_146101_a(TileEntityFurnace p_146101_1_) {}
@@ -1134,7 +1299,8 @@
@@ -1134,7 +1300,8 @@

if (itemstack.interactWithEntity(this, (EntityLivingBase)p_70998_1_))
{
Expand All @@ -417,7 +409,7 @@
{
this.destroyCurrentEquippedItem();
}
@@ -1281,7 +1447,8 @@
@@ -1281,7 +1448,8 @@
{
itemstack.hitEntity((EntityLivingBase)object, this);

Expand All @@ -427,7 +419,7 @@
{
this.destroyCurrentEquippedItem();
}
@@ -1293,7 +1460,17 @@
@@ -1293,7 +1461,17 @@

if (j > 0)
{
Expand All @@ -446,7 +438,7 @@
}
}

@@ -1322,6 +1499,10 @@
@@ -1322,6 +1500,10 @@

if (this.openContainer != null)
{
Expand All @@ -457,7 +449,7 @@
this.openContainer.onContainerClosed(this);
}
}
@@ -1381,6 +1562,20 @@
@@ -1381,6 +1563,20 @@
this.mountEntity((Entity)null);
}

Expand All @@ -478,7 +470,7 @@
this.setSize(0.2F, 0.2F);
this.yOffset = 0.2F;

@@ -1476,6 +1671,26 @@
@@ -1476,6 +1672,26 @@
this.worldObj.updateAllPlayersSleepingFlag();
}

Expand All @@ -505,7 +497,7 @@
if (p_70999_1_)
{
this.sleepTimer = 0;
@@ -1606,11 +1821,13 @@
@@ -1606,11 +1822,13 @@
{
this.spawnChunk = new ChunkCoordinates(p_71063_1_);
this.spawnForced = p_71063_2_;
Expand All @@ -519,7 +511,7 @@
}
}

@@ -2035,7 +2252,7 @@
@@ -2035,7 +2253,7 @@
{
getEntityData().setTag(PERSISTED_NBT_TAG, old.getCompoundTag(PERSISTED_NBT_TAG));
}
Expand Down

0 comments on commit 3cd7948

Please sign in to comment.