NOT FINISHED!!! Current Progress on 1.13-pre7 update
This work is 100% unfinished. I am pushing it up so that we as a team can work on this update. Do not try to use this branch. You will fail.
This commit is contained in:
@@ -50,30 +50,39 @@ index 000000000..93397188b
|
||||
+}
|
||||
\ No newline at end of file
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index a5db14343..0788f7712 100644
|
||||
index 32f467b37..fa500e93f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.google.common.collect.Lists; // CraftBukkit
|
||||
import org.bukkit.Server; // CraftBukkit
|
||||
+import org.bukkit.Server; // CraftBukkit
|
||||
+import org.bukkit.craftbukkit.util.CraftMagicNumbers; // Paper
|
||||
|
||||
public class Chunk {
|
||||
public class Chunk implements IChunkAccess {
|
||||
|
||||
@@ -0,0 +0,0 @@ public class Chunk {
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
return this.getBlockData(i, j, k).b(this.world, new BlockPosition(i, j, k));
|
||||
}
|
||||
|
||||
+ public IBlockData getBlockData(BlockPosition blockposition) { return getType(blockposition); } // Paper
|
||||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return this.getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
this.tileEntities.remove(blockposition);
|
||||
// Paper end
|
||||
} else {
|
||||
- System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
|
||||
- + " (" + org.bukkit.craftbukkit.util.CraftMagicNumbers.getMaterial(getBlockData(blockposition).getBlock()) + ") where there was no entity tile!");
|
||||
- + " (" + getType(blockposition) + ") where there was no entity tile!");
|
||||
- System.out.println("Chunk coordinates: " + (this.locX * 16) + "," + (this.locZ * 16));
|
||||
- new Exception().printStackTrace();
|
||||
+ // Paper start
|
||||
@@ -89,33 +98,20 @@ index a5db14343..0788f7712 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 2b320cbd1..4e7e8e5fd 100644
|
||||
index 51bc23daf..bb96a7392 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
@@ -0,0 +0,0 @@ import java.util.concurrent.ExecutionException;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import javax.annotation.Nullable;
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
|
||||
return chunk;
|
||||
} catch (Exception exception) {
|
||||
- ChunkProviderServer.a.error("Couldn\'t load chunk", exception);
|
||||
+ // Paper start
|
||||
+ String msg = "Couldn\'t load chunk";
|
||||
+ ChunkProviderServer.a.error(msg, exception);
|
||||
+ ServerInternalException.reportInternalException(exception);
|
||||
+ // Paper end
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
try {
|
||||
// this.chunkLoader.b(this.world, chunk); // Spigot
|
||||
// this.chunkLoader.a(this.world, chunk); // Spigot
|
||||
} catch (Exception exception) {
|
||||
- ChunkProviderServer.a.error("Couldn\'t save entities", exception);
|
||||
+ // Paper start
|
||||
@@ -127,8 +123,8 @@ index 2b320cbd1..4e7e8e5fd 100644
|
||||
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||
chunk.setLastSaved(this.world.getTime());
|
||||
this.chunkLoader.saveChunk(this.world, chunk, unloaded); // Spigot
|
||||
ichunkaccess.setLastSaved(this.world.getTime());
|
||||
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
|
||||
} catch (IOException ioexception) {
|
||||
- ChunkProviderServer.a.error("Couldn\'t save chunk", ioexception);
|
||||
+ // Paper start
|
||||
@@ -144,17 +140,16 @@ index 2b320cbd1..4e7e8e5fd 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||
index 83322b85b..b943a9b20 100644
|
||||
index 33e5aaf2c..f13534917 100644
|
||||
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
+import com.google.common.base.Charsets;
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.collect.Iterators;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.io.Files;
|
||||
@@ -0,0 +0,0 @@ public class NameReferencingFileConverter {
|
||||
root = NBTCompressedStreamTools.a(new java.io.FileInputStream(file1));
|
||||
} catch (Exception exception) {
|
||||
@@ -172,7 +167,7 @@ index 83322b85b..b943a9b20 100644
|
||||
}
|
||||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/PersistentCollection.java b/src/main/java/net/minecraft/server/PersistentCollection.java
|
||||
index 936d6c640..50056f49a 100644
|
||||
index 0ffca4301..86d8fd0d9 100644
|
||||
--- a/src/main/java/net/minecraft/server/PersistentCollection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PersistentCollection.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -181,15 +176,15 @@ index 936d6c640..50056f49a 100644
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import java.io.DataInputStream;
|
||||
import com.mojang.datafixers.DataFixTypes;
|
||||
@@ -0,0 +0,0 @@ public class PersistentCollection {
|
||||
}
|
||||
} catch (Exception exception1) {
|
||||
exception1.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(exception1); // Paper
|
||||
}
|
||||
}
|
||||
|
||||
nbttagcompound = GameProfileSerializer.a(this.c.i(), DataFixTypes.SAVED_DATA, nbttagcompound1, j, i);
|
||||
} catch (Throwable throwable1) {
|
||||
throwable = throwable1;
|
||||
+ ServerInternalException.reportInternalException(throwable1); // Paper
|
||||
throw throwable1;
|
||||
} finally {
|
||||
if (fileinputstream != null) {
|
||||
@@ -0,0 +0,0 @@ public class PersistentCollection {
|
||||
}
|
||||
} catch (Exception exception) {
|
||||
@@ -199,7 +194,7 @@ index 936d6c640..50056f49a 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
index 1ba26de5c..6a92b5af8 100644
|
||||
index 94364baae..c80d724f0 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -218,7 +213,7 @@ index 1ba26de5c..6a92b5af8 100644
|
||||
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class RegionFile {
|
||||
this.b(i, j, (int) (MinecraftServer.aw() / 1000L));
|
||||
this.b(i, j, (int) (SystemUtils.d() / 1000L));
|
||||
} catch (IOException ioexception) {
|
||||
ioexception.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(ioexception); // Paper
|
||||
@@ -226,7 +221,7 @@ index 1ba26de5c..6a92b5af8 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
index c15a0d1f8..5f9e9ddef 100644
|
||||
index d394645a5..384628ccc 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -245,11 +240,11 @@ index c15a0d1f8..5f9e9ddef 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 1c7c187c7..68a045323 100644
|
||||
index aec9cdae5..6d842df62 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Random;
|
||||
import java.util.Set;
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
// CraftBukkit start
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
@@ -257,23 +252,23 @@ index 1c7c187c7..68a045323 100644
|
||||
import org.bukkit.craftbukkit.util.LongHashSet;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
||||
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
||||
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { worldserver});
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper
|
||||
return j1;
|
||||
}
|
||||
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.a((World) worldserver);
|
||||
} catch (Exception exception) {
|
||||
SpawnerCreature.a.warn("Failed to create mob", exception);
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper
|
||||
return j1;
|
||||
}
|
||||
|
||||
@@ -0,0 +0,0 @@ public final class SpawnerCreature {
|
||||
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.getConstructor(new Class[] { World.class}).newInstance(new Object[] { world});
|
||||
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.a(generatoraccess.getMinecraftWorld());
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
SpawnerCreature.a.warn("Failed to create mob", exception);
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper
|
||||
continue;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
|
||||
index 9ff4f23ab..6fce3015f 100644
|
||||
index 4ff243dab..67b2e41c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillageSiege.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -285,7 +280,7 @@ index 9ff4f23ab..6fce3015f 100644
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
@@ -0,0 +0,0 @@ public class VillageSiege {
|
||||
entityzombie.prepare(this.a.D(new BlockPosition(entityzombie)), (GroupDataEntity) null);
|
||||
entityzombie.prepare(this.a.getDamageScaler(new BlockPosition(entityzombie)), (GroupDataEntity) null, (NBTTagCompound) null);
|
||||
} catch (Exception exception) {
|
||||
exception.printStackTrace();
|
||||
+ ServerInternalException.reportInternalException(exception); // Paper
|
||||
@@ -293,18 +288,19 @@ index 9ff4f23ab..6fce3015f 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 89197281e..6be9c1815 100644
|
||||
index 26b2a1fd4..d51ed0f80 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import co.aikar.timings.Timings;
|
||||
+import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
+import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.base.Function;
|
||||
import com.google.common.base.MoreObjects;
|
||||
import com.google.common.base.Predicate;
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
import com.google.common.collect.Lists;
|
||||
import java.util.ArrayList;
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
} catch (Throwable throwable1) {
|
||||
entity.tickTimer.stopTiming();
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
@@ -316,8 +312,8 @@ index 89197281e..6be9c1815 100644
|
||||
entity.dead = true;
|
||||
continue;
|
||||
// Paper end
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements IBlockAccess {
|
||||
this.methodProfiler.b();
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
this.methodProfiler.e();
|
||||
} catch (Throwable throwable2) {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
- System.err.println("TileEntity threw exception at " + tileentity.world.getWorld().getName() + ":" + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ());
|
||||
|
||||
Reference in New Issue
Block a user