Skip to content

Commit

Permalink
Updated to Forge
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexeption committed Aug 18, 2019
1 parent 77c7970 commit b13da95
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
24 changes: 12 additions & 12 deletions patches/net/minecraft/world/World.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -704,15 +704,15 @@
}
}

@@ -2449,6 +2782,7 @@
}
@@ -2451,6 +2784,7 @@
}

toInvalidate.forEach(TileEntity::invalidate);
+ tileEntityIn.setWorld(this); // Spigot - No null worlds
this.addedTileEntityList.add(tileEntityIn);
}
else
@@ -2657,6 +2991,13 @@
@@ -2659,6 +2993,13 @@
}

this.rainingStrength = MathHelper.clamp(this.rainingStrength, 0.0F, 1.0F);
Expand All @@ -726,7 +726,7 @@
}
}
}
@@ -2844,10 +3185,14 @@
@@ -2846,10 +3187,14 @@
}
}

Expand All @@ -743,7 +743,7 @@
return false;
}
else
@@ -2858,9 +3203,9 @@
@@ -2860,9 +3205,9 @@
this.profiler.startSection("getBrightness");
int l2 = this.getLightFor(lightType, pos);
int i3 = this.getRawLight(pos, lightType);
Expand All @@ -756,7 +756,7 @@

if (i3 > l2)
{
@@ -3137,7 +3482,16 @@
@@ -3139,7 +3484,16 @@

for (Entity entity4 : this.loadedEntityList)
{
Expand All @@ -774,7 +774,7 @@
{
++j2;
}
@@ -3152,6 +3506,9 @@
@@ -3154,6 +3508,9 @@
{
if (!net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.entity.EntityJoinWorldEvent(entity4, this)))
{
Expand All @@ -784,7 +784,7 @@
loadedEntityList.add(entity4);
this.onEntityAdded(entity4);
}
@@ -3168,19 +3525,26 @@
@@ -3170,19 +3527,26 @@
IBlockState iblockstate1 = this.getBlockState(pos);
AxisAlignedBB axisalignedbb = skipCollisionCheck ? null : blockIn.getDefaultState().getCollisionBoundingBox(this, pos);

Expand Down Expand Up @@ -814,7 +814,7 @@
}

public int getSeaLevel()
@@ -3345,6 +3709,12 @@
@@ -3347,6 +3711,12 @@
{
EntityPlayer entityplayer1 = this.playerEntities.get(j2);

Expand All @@ -827,7 +827,7 @@
if (p_190525_9_.apply(entityplayer1))
{
double d1 = entityplayer1.getDistanceSq(x, y, z);
@@ -3592,6 +3962,16 @@
@@ -3594,6 +3964,16 @@
{
}

Expand All @@ -844,7 +844,7 @@
public float getThunderStrength(float delta)
{
return (this.prevThunderingStrength + (this.thunderingStrength - this.prevThunderingStrength) * delta) * this.getRainStrength(delta);
@@ -3880,7 +4260,7 @@
@@ -3882,7 +4262,7 @@
int j2 = x * 16 + 8 - blockpos1.getX();
int k2 = z * 16 + 8 - blockpos1.getZ();
int l2 = 128;
Expand All @@ -853,7 +853,7 @@
}

/* ======================================== FORGE START =====================================*/
@@ -4016,4 +4396,48 @@
@@ -4018,4 +4398,48 @@
{
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.tileentity.TileEntity;
@@ -79,14 +76,14 @@
@@ -79,15 +76,14 @@

if (nbttagcompound == null)
{
Expand All @@ -31,11 +31,12 @@
}

- nbttagcompound = this.fixer.process(FixTypes.CHUNK, CompressedStreamTools.read(datainputstream));
- datainputstream.close(); // Forge: close stream after use
+ nbttagcompound = this.fixer.process(FixTypes.CHUNK, nbtTagCompound);
}

return this.checkedReadChunkFromNBT__Async(worldIn, x, z, nbttagcompound);
@@ -237,9 +234,10 @@
@@ -238,9 +234,10 @@

private void writeChunkData(ChunkPos pos, NBTTagCompound compound) throws IOException
{
Expand All @@ -49,7 +50,7 @@
}

public void saveExtraChunkData(World worldIn, Chunk chunkIn) throws IOException
@@ -608,8 +606,11 @@
@@ -609,8 +606,11 @@

public static void spawnEntity(Entity entityIn, World worldIn)
{
Expand Down

0 comments on commit b13da95

Please sign in to comment.