NOT FINISHED! She compiles, and she... suffers the wrath of chunkgen...
This commit is contained in:
@@ -39,7 +39,7 @@ index 2cfe2202e..909432d51 100644
|
||||
return null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index bfed2d988..d1eea2133 100644
|
||||
index bbf7b5088..c94b5c817 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -0,0 +0,0 @@ public class CraftBlock implements Block {
|
||||
|
||||
@@ -52,7 +52,7 @@ index a87ef5fb8..b8bfc7577 100644
|
||||
return i * 2;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9f9002dd8..c2cd5ac4b 100644
|
||||
index 43e357e39..7021a81be 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -65,10 +65,10 @@ index 9f9002dd8..c2cd5ac4b 100644
|
||||
+ public int applyMending(int amount) {
|
||||
+ EntityPlayer handle = getHandle();
|
||||
+ // Logic copied from EntityExperienceOrb and remapped to unobfuscated methods/properties
|
||||
+ ItemStack itemstack = EnchantmentManager.getRandomEquippedItemWithEnchant(Enchantments.MENDING, handle);
|
||||
+ if (!itemstack.isEmpty() && itemstack.hasDamage()) {
|
||||
+ net.minecraft.server.ItemStack itemstack = net.minecraft.server.EnchantmentManager.getRandomEquippedItemWithEnchant(net.minecraft.server.Enchantments.MENDING, handle);
|
||||
+ if (!itemstack.isEmpty() && itemstack.getItem().usesDurability()) {
|
||||
+
|
||||
+ EntityExperienceOrb orb = new EntityExperienceOrb(handle.world);
|
||||
+ net.minecraft.server.EntityExperienceOrb orb = new net.minecraft.server.EntityExperienceOrb(handle.world);
|
||||
+ orb.value = amount;
|
||||
+ orb.spawnReason = org.bukkit.entity.ExperienceOrb.SpawnReason.CUSTOM;
|
||||
+ orb.locX = handle.locX;
|
||||
|
||||
@@ -40,7 +40,7 @@ index cadff64bf..b1e0d6185 100644
|
||||
case TRAPPED_CHEST:
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
new file mode 100644
|
||||
index 000000000..dc372f6db
|
||||
index 000000000..30941c7b0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
|
||||
@@ -0,0 +0,0 @@
|
||||
@@ -48,12 +48,16 @@ index 000000000..dc372f6db
|
||||
+
|
||||
+import com.destroystokyo.paper.inventory.meta.ArmorStandMeta;
|
||||
+import com.google.common.collect.ImmutableMap;
|
||||
+import com.mojang.datafixers.Dynamic;
|
||||
+
|
||||
+import net.minecraft.server.DataConverterTypes;
|
||||
+import net.minecraft.server.DynamicOpsNBT;
|
||||
+import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.NBTBase;
|
||||
+import net.minecraft.server.NBTTagCompound;
|
||||
+import org.bukkit.Material;
|
||||
+import org.bukkit.configuration.serialization.DelegateDeserialization;
|
||||
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
+
|
||||
+import java.util.Map;
|
||||
+
|
||||
@@ -220,7 +224,7 @@ index 000000000..dc372f6db
|
||||
+
|
||||
+ if (tag.hasKey(ENTITY_TAG.NBT)) {
|
||||
+ entityTag = tag.getCompound(ENTITY_TAG.NBT);
|
||||
+ MinecraftServer.getServer().dataConverterManager.a(DataConverterTypes.ENTITY, entityTag); // PAIL: convert
|
||||
+ MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, CraftMagicNumbers.DATA_VERSION);
|
||||
+
|
||||
+ if (entityTag.hasKey(INVISIBLE.NBT)) {
|
||||
+ invisible = entityTag.getBoolean(INVISIBLE.NBT);
|
||||
@@ -343,7 +347,7 @@ index 000000000..dc372f6db
|
||||
+ CraftMetaArmorStand clone = (CraftMetaArmorStand) super.clone();
|
||||
+
|
||||
+ if (entityTag != null) {
|
||||
+ clone.entityTag = entityTag.g();
|
||||
+ clone.entityTag = entityTag.clone();
|
||||
+ }
|
||||
+
|
||||
+ return clone;
|
||||
|
||||
@@ -17,7 +17,7 @@ index f08c0ba60..1b944abea 100644
|
||||
super.cG();
|
||||
this.a(StatisticList.JUMP);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index bf549bfed..25c38f3bb 100644
|
||||
index 383ef87ba..480b93aa0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
|
||||
@@ -18,7 +18,7 @@ index 77440ac81..8711462e1 100644
|
||||
private Vec3D c;
|
||||
private EnumHand d;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 9c27966ea..5c70a4a9b 100644
|
||||
index 88b761d27..a3486bd46 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index fa500e93f..f376b3a34 100644
|
||||
index 7ea4b9b5c..fb27dcac2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -18,7 +18,7 @@ index fa500e93f..f376b3a34 100644
|
||||
return this.a(blockposition, i, this.world.o().g());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index d51ed0f80..1c939e523 100644
|
||||
index d51ed0f80..d3785f73b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -26,7 +26,7 @@ index d51ed0f80..1c939e523 100644
|
||||
protected final IntHashMap<Entity> entitiesById = new IntHashMap();
|
||||
private final long G = 16777215L;
|
||||
- private int H;
|
||||
+ private int H; private int getSkylightSubtracted() { return this.H; } // Paper - OBFHELPER
|
||||
+ private int H; public int getSkylightSubtracted() { return this.H; } public void setSkylightSubtracted(int value) { this.H = value;} // Paper - OBFHELPER
|
||||
protected int m = (new Random()).nextInt();
|
||||
protected final int n = 1013904223;
|
||||
protected float o;
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Tue, 1 Mar 2016 23:19:01 -0600
|
||||
Subject: [PATCH] Add async chunk load API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0b2a9d09d..4df849eef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start - Async chunk load API
|
||||
+ public void getChunkAtAsync(final int x, final int z, final ChunkLoadCallback callback) {
|
||||
+ final ChunkProviderServer cps = this.world.getChunkProviderServer();
|
||||
+ cps.getChunkAt(x, z, new Runnable() {
|
||||
+ @Override
|
||||
+ public void run() {
|
||||
+ callback.onLoad(cps.getChunkAt(x, z).bukkitChunk);
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ public void getChunkAtAsync(Block block, ChunkLoadCallback callback) {
|
||||
+ getChunkAtAsync(block.getX() >> 4, block.getZ() >> 4, callback);
|
||||
+ }
|
||||
+
|
||||
+ public void getChunkAtAsync(Location location, ChunkLoadCallback callback) {
|
||||
+ getChunkAtAsync(location.getBlockX() >> 4, location.getBlockZ() >> 4, callback);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
public Chunk getChunkAt(int x, int z) {
|
||||
return this.world.getChunkProviderServer().getChunkAt(x, z).bukkitChunk;
|
||||
}
|
||||
--
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add config to disable ender dragon legacy check
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 650addb84..b2855f3ca 100644
|
||||
index ef4bfb480..1607619bd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -50,7 +50,7 @@ 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 32f467b37..fa500e93f 100644
|
||||
index 2d55abd7a..7ea4b9b5c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Riley Park <rileysebastianpark@gmail.com>
|
||||
Date: Wed, 13 Apr 2016 20:21:38 -0700
|
||||
Subject: [PATCH] Add handshake event to allow plugins to handle client
|
||||
handshaking logic themselves
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
index 7c75433f5..088ec198e 100644
|
||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
@@ -0,0 +0,0 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||
this.b.close(chatmessage);
|
||||
} else {
|
||||
this.b.setPacketListener(new LoginListener(this.a, this.b));
|
||||
+ // Paper start - handshake event
|
||||
+ boolean proxyLogicEnabled = org.spigotmc.SpigotConfig.bungee;
|
||||
+ boolean handledByEvent = false;
|
||||
+ // Try and handle the handshake through the event
|
||||
+ if (com.destroystokyo.paper.event.player.PlayerHandshakeEvent.getHandlerList().getRegisteredListeners().length != 0) { // Hello? Can you hear me?
|
||||
+ com.destroystokyo.paper.event.player.PlayerHandshakeEvent event = new com.destroystokyo.paper.event.player.PlayerHandshakeEvent(packethandshakinginsetprotocol.hostname, !proxyLogicEnabled);
|
||||
+ if (event.callEvent()) {
|
||||
+ // If we've failed somehow, let the client know so and go no further.
|
||||
+ if (event.isFailed()) {
|
||||
+ chatmessage = new ChatMessage(event.getFailMessage());
|
||||
+ this.b.sendPacket(new PacketLoginOutDisconnect(chatmessage));
|
||||
+ this.b.close(chatmessage);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ packethandshakinginsetprotocol.hostname = event.getServerHostname();
|
||||
+ this.b.l = new java.net.InetSocketAddress(event.getSocketAddressHostname(), ((java.net.InetSocketAddress) this.b.getSocketAddress()).getPort());
|
||||
+ this.b.spoofedUUID = event.getUniqueId();
|
||||
+ this.b.spoofedProfile = gson.fromJson(event.getPropertiesJson(), com.mojang.authlib.properties.Property[].class);
|
||||
+ handledByEvent = true; // Hooray, we did it!
|
||||
+ }
|
||||
+ }
|
||||
+ // Don't try and handle default logic if it's been handled by the event.
|
||||
+ if (!handledByEvent && proxyLogicEnabled) {
|
||||
+ // Paper end
|
||||
// Spigot Start
|
||||
- if (org.spigotmc.SpigotConfig.bungee) {
|
||||
+ //if (org.spigotmc.SpigotConfig.bungee) { // Paper - comment out, we check above!
|
||||
String[] split = packethandshakinginsetprotocol.hostname.split("\00");
|
||||
if ( split.length == 3 || split.length == 4 ) {
|
||||
packethandshakinginsetprotocol.hostname = split[0];
|
||||
--
|
||||
@@ -26,7 +26,7 @@ index 0b748d402..99fe720e8 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 36a961cb7..0da76b268 100644
|
||||
index 83bfb6611..0486dee2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -39,7 +39,7 @@ index 36a961cb7..0da76b268 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 25e3d6423..128b2beb5 100644
|
||||
index aa93b5945..383ef87ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add player view distance API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index cb44bf3a7..0531812fb 100644
|
||||
index ace6db1fa..8ca7da336 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Add velocity warnings
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 32a05ca18..eaac1430e 100644
|
||||
index 703d38f0c..a9d60b8d2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
@@ -17,7 +17,7 @@ index 32a05ca18..eaac1430e 100644
|
||||
private final class BooleanWrapper {
|
||||
private boolean value = true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 0daa15f1b..2b9c571ca 100644
|
||||
index 34246369c..03a3328b0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
@@ -8,7 +8,7 @@ This API has more capabilities than .dropItem with the Consumer function
|
||||
Item can be set inside of the Consumer pre spawn function.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 3ee663293..65ad8e588 100644
|
||||
index 1afb480f8..f7eaecb3f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Sat, 14 Jan 2017 01:22:07 -0600
|
||||
Subject: [PATCH] Assign the World in WorldGenStronghold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
index 8b285bdd4..b6e60e9df 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
@@ -0,0 +0,0 @@ public class WorldGenStronghold extends StructureGenerator<WorldGenFeatureStrong
|
||||
if (this.d != world.getSeed()) {
|
||||
this.c();
|
||||
}
|
||||
-
|
||||
+ this.g = world; // Paper
|
||||
if (!this.b) {
|
||||
this.a(chunkgenerator);
|
||||
this.b = true;
|
||||
--
|
||||
@@ -14,7 +14,7 @@ completion, such as offline players.
|
||||
Also adds isCommand and getLocation to the sync TabCompleteEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index d47805962..ea29b1b2a 100644
|
||||
index 7e96c4eb4..ab2bd6dae 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -161,7 +161,7 @@ index 49b2c27c6..bf020293d 100644
|
||||
this.methodProfiler.a("snooper");
|
||||
if (getSnooperEnabled() && !this.j.d() && this.ticks > 100) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 801a147f0..1f2265231 100644
|
||||
index 6b7d81933..3ee587014 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -22,7 +22,7 @@ index 2612d4207..b3cdc0b7d 100644
|
||||
this.a(entity, entity.af);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ee061d693..1b9013ab4 100644
|
||||
index d8ce3efc9..35db0e184 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -14,7 +14,7 @@ And since minecart hoppers are used _very_ rarely near we can avoid alot of sear
|
||||
Combined, this adds up a lot.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index e5567701e..32f467b37 100644
|
||||
index b0060c363..2d55abd7a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 0b12ed819..83e6276b8 100644
|
||||
index 382b8028a..2ef1433a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -0,0 +0,0 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
|
||||
@@ -12,7 +12,7 @@ This disables that by not saving the thrower when the chunk is unloaded.
|
||||
This is mainly useful for survival servers that do not allow freeform teleporting.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 87d2dd131..5a9c68e4f 100644
|
||||
index b07ff9587..f1db4becd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
@@ -27,14 +27,14 @@ index 87d2dd131..5a9c68e4f 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
index fc8c0cab5..b3323aa8e 100644
|
||||
index fc8c0cab5..dd8af4be8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
if (nbttagcompound.hasKeyOfType("owner", 10)) {
|
||||
this.shooterId = GameProfileSerializer.b(nbttagcompound.getCompound("owner"));
|
||||
}
|
||||
+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterName = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
|
||||
+ if (this instanceof EntityEnderPearl && this.world != null && this.world.paperConfig.disableEnderpearlExploit) { this.shooterId = null; } // Paper - Don't store shooter name for pearls to block enderpearl travel exploit
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Chunk Save Reattempt
|
||||
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 17996af9c..faaa1b36b 100644
|
||||
index 8701777cc..ad3bd3808 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
@@ -55,7 +55,7 @@ index 9145401bc..ef35eb7ec 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 071e8a196..fedc38dc1 100644
|
||||
index 20aa20a98..de2231bb0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
@@ -8,7 +8,7 @@ World checks and the Chunk Add logic are inconsistent on how Y > 256, < 0, is tr
|
||||
Keep them consistent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a8ef9e337..3b2de1f31 100644
|
||||
index 067b92f3e..04b5521cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -41,7 +41,7 @@ index 36689db74..3898ad8fa 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index e26860516..17996af9c 100644
|
||||
index 3a0e52d88..8701777cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ import java.util.function.Consumer;
|
||||
|
||||
@@ -53,7 +53,7 @@ index b602bbf12..62bce1806 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
index a540167d6..d8a882191 100644
|
||||
index add618866..9f8e17b9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Random;
|
||||
|
||||
@@ -10,7 +10,7 @@ player at their bed should it of became obstructed.
|
||||
Defaults to vanilla 1.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index b2855f3ca..d30a8ff6c 100644
|
||||
index 1607619bd..692206127 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -23,7 +23,7 @@ index 1c2209270..17fb883f6 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 75fcc693d..aaa65582b 100644
|
||||
index 1c0580f79..744b5bc6d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@@ -8,7 +8,7 @@ Vanilla already had this limited, make it configurable.
|
||||
Limit how much exploration lags the server
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 33743f8fd..49f282332 100644
|
||||
index 605e84173..703642c0b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Apr 2016 16:28:17 -0400
|
||||
Subject: [PATCH] Configurable Grass Spread Tick Rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 17fb883f6..eb09be512 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
private void useInhabitedTime() {
|
||||
useInhabitedTime = getBoolean("use-chunk-inhabited-timer", true);
|
||||
}
|
||||
+
|
||||
+ public int grassUpdateRate = 1;
|
||||
+ private void grassUpdateRate() {
|
||||
+ grassUpdateRate = Math.max(0, getInt("grass-spread-tick-rate", grassUpdateRate));
|
||||
+ log("Grass Spread Tick Rate: " + grassUpdateRate);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
index 6343fb1e0..903e8241b 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDirtSnowSpreadable.java
|
||||
@@ -0,0 +0,0 @@ public abstract class BlockDirtSnowSpreadable extends BlockDirtSnow {
|
||||
}
|
||||
|
||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
||||
+ if (this instanceof BlockGrass && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + blockposition.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper
|
||||
if (!world.isClientSide) {
|
||||
if (!a((IWorldReader) world, blockposition)) {
|
||||
// CraftBukkit start
|
||||
--
|
||||
@@ -39,7 +39,7 @@ index 1027b0588..b7aa9e869 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index e42a334bc..d15afd595 100644
|
||||
index cc1492e4d..2c6774082 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -67,7 +67,7 @@ index f90dc11f2..06b59657f 100644
|
||||
for (int j = -short1; j <= short1; j += 16) {
|
||||
for (int k = -short1; k <= short1; k += 16) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4df849eef..9d88b9ddb 100644
|
||||
index 0b2a9d09d..ff3558363 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
117
Spigot-Server-Patches/Configurable-Player-Collision.patch
Normal file
117
Spigot-Server-Patches/Configurable-Player-Collision.patch
Normal file
@@ -0,0 +1,117 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 13 Apr 2016 02:10:49 -0400
|
||||
Subject: [PATCH] Configurable Player Collision
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index ec4643384..430b5d0cd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperConfig {
|
||||
private static void regionFileCacheSize() {
|
||||
regionFileCacheSize = getInt("settings.region-file-cache-size", 256);
|
||||
}
|
||||
+
|
||||
+ public static boolean enablePlayerCollisions = true;
|
||||
+ private static void enablePlayerCollisions() {
|
||||
+ enablePlayerCollisions = getBoolean("settings.enable-player-collisions", true);
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b7aa9e869..c5670fe8d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -0,0 +0,0 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||
|
||||
this.a(this.getDifficulty());
|
||||
this.g_();
|
||||
+
|
||||
+ // Paper start - Handle collideRule team for player collision toggle
|
||||
+ final Scoreboard scoreboard = this.getScoreboard();
|
||||
+ final java.util.Collection<String> toRemove = scoreboard.getTeams().stream().filter(team -> team.getName().startsWith("collideRule_")).map(ScoreboardTeam::getName).collect(java.util.stream.Collectors.toList());
|
||||
+ for (String teamName : toRemove) {
|
||||
+ scoreboard.removeTeam(scoreboard.getTeam(teamName)); // Clean up after ourselves
|
||||
+ }
|
||||
+
|
||||
+ if (!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions) {
|
||||
+ this.getPlayerList().collideRuleTeamName = org.apache.commons.lang3.StringUtils.left("collideRule_" + worlds.get(0).random.nextInt(), 16);
|
||||
+ ScoreboardTeam collideTeam = scoreboard.createTeam(this.getPlayerList().collideRuleTeamName);
|
||||
+ collideTeam.setCanSeeFriendlyInvisibles(false); // Because we want to mimic them not being on a team at all
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
protected void a(File file, WorldData worlddata) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
index 5f54e7b9c..759288b97 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||
@@ -0,0 +0,0 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
|
||||
packetdataserializer.a(this.b);
|
||||
packetdataserializer.writeByte(this.j);
|
||||
packetdataserializer.a(this.e);
|
||||
- packetdataserializer.a(this.f);
|
||||
+ packetdataserializer.a(!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions ? "never" : this.f); // Paper
|
||||
packetdataserializer.a((Enum) this.g);
|
||||
packetdataserializer.a(this.c);
|
||||
packetdataserializer.a(this.d);
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 8e1edde31..6b7d81933 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
private CraftServer cserver;
|
||||
private final Map<String,EntityPlayer> playersByName = new org.spigotmc.CaseInsensitiveMap<EntityPlayer>();
|
||||
+ @Nullable String collideRuleTeamName; // Paper - Team name used for collideRule
|
||||
|
||||
public PlayerList(MinecraftServer minecraftserver) {
|
||||
this.cserver = minecraftserver.server = new CraftServer(minecraftserver, this);
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
entityplayer.syncInventory();
|
||||
+ // Paper start - Add to collideRule team if needed
|
||||
+ final Scoreboard scoreboard = this.getServer().getWorldServer(0).getScoreboard();
|
||||
+ final ScoreboardTeam collideRuleTeam = scoreboard.getTeam(collideRuleTeamName);
|
||||
+ if (this.collideRuleTeamName != null && collideRuleTeam != null && entityplayer.getTeam() == null) {
|
||||
+ scoreboard.addPlayerToTeam(entityplayer.getName(), collideRuleTeam);
|
||||
+ }
|
||||
+ // Paper end
|
||||
// CraftBukkit - Moved from above, added world
|
||||
PlayerList.f.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, Integer.valueOf(entityplayer.getId()), entityplayer.world.worldData.getName(), Double.valueOf(entityplayer.locX), Double.valueOf(entityplayer.locY), Double.valueOf(entityplayer.locZ));
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
entityplayer.playerTick();// SPIGOT-924
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Paper start - Remove from collideRule team if needed
|
||||
+ if (this.collideRuleTeamName != null) {
|
||||
+ final Scoreboard scoreBoard = this.server.getWorldServer(0).getScoreboard();
|
||||
+ final ScoreboardTeam team = scoreBoard.getTeam(this.collideRuleTeamName);
|
||||
+ if (entityplayer.getTeam() == team && team != null) {
|
||||
+ scoreBoard.removePlayerFromTeam(entityplayer.getName(), team);
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
this.savePlayerFile(entityplayer);
|
||||
if (entityplayer.isPassenger()) {
|
||||
Entity entity = entityplayer.getRootVehicle();
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
player.playerConnection.disconnect(this.server.server.getShutdownMessage()); // CraftBukkit - add custom shutdown message
|
||||
}
|
||||
// CraftBukkit end
|
||||
-
|
||||
+ // Paper start - Remove collideRule team if it exists
|
||||
+ if (this.collideRuleTeamName != null) {
|
||||
+ final Scoreboard scoreboard = this.getServer().getWorldServer(0).getScoreboard();
|
||||
+ final ScoreboardTeam team = scoreboard.getTeam(this.collideRuleTeamName);
|
||||
+ if (team != null) scoreboard.removeTeam(team);
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
--
|
||||
21
Spigot-Server-Patches/Configurable-RCON-IP-address.patch
Normal file
21
Spigot-Server-Patches/Configurable-RCON-IP-address.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 16 Apr 2016 00:39:33 -0400
|
||||
Subject: [PATCH] Configurable RCON IP address
|
||||
|
||||
For servers with multiple IP's, ability to bind to a specific interface.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||
index 6f0176f6f..1e5caa13a 100644
|
||||
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||
@@ -0,0 +0,0 @@ public class RemoteControlListener extends RemoteConnectionThread {
|
||||
super(iminecraftserver, "RCON Listener");
|
||||
this.h = iminecraftserver.a("rcon.port", 0);
|
||||
this.l = iminecraftserver.a("rcon.password", "");
|
||||
- this.j = iminecraftserver.e();
|
||||
+ this.j = iminecraftserver.a("rcon.ip", iminecraftserver.d_()); // Paper
|
||||
this.i = iminecraftserver.f();
|
||||
if (0 == this.h) {
|
||||
this.h = this.i + 10;
|
||||
--
|
||||
@@ -19,7 +19,7 @@ index 47f391243..26d8dbb60 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 0531812fb..5ca0dec1f 100644
|
||||
index 8ca7da336..55eaa89f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@@ -20,7 +20,7 @@ index 1e3405cc1..dccccbf5b 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index e035025f0..cb44bf3a7 100644
|
||||
index d4e9f489d..ace6db1fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
|
||||
@@ -21,7 +21,7 @@ index 2001175bf..621c585e7 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index aa7c019ab..be0322941 100644
|
||||
index a41fa05ee..1f2cfbc92 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -23,7 +23,7 @@ index cf06f8ac3..2001175bf 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index e9ce81bfc..c757881b7 100644
|
||||
index b17540ecb..a41fa05ee 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack
|
||||
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 830b99cd7..87d2dd131 100644
|
||||
index 4ca31c8eb..b07ff9587 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -20,7 +20,7 @@ index 4da846719..a340866f3 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 2288df268..111eeeecc 100644
|
||||
index 6bb4cf48e..d378f1a9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
@@ -30,7 +30,7 @@ index 3898ad8fa..2f6e169f5 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index eaac1430e..6dae117ac 100644
|
||||
index a9d60b8d2..4db5aacc4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -0,0 +0,0 @@ public final class CraftServer implements Server {
|
||||
|
||||
@@ -131,7 +131,7 @@ index 4d888d6d4..cf5c76a78 100644
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 4588df4b1..c34f42efc 100644
|
||||
index 5102f24ed..c9b6b57af 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
@@ -150,7 +150,7 @@ index 4588df4b1..c34f42efc 100644
|
||||
this.methodProfiler.a(() -> {
|
||||
return String.valueOf(TileEntityTypes.a(tileentity.C()));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 9d88b9ddb..e516ec603 100644
|
||||
index ff3558363..90e260f3b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -48,7 +48,7 @@ index 1ee54fa45..43715902e 100644
|
||||
if (!this.e(damagesource)) {
|
||||
SoundEffect soundeffect = this.cr();
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index ddbf667c4..2652b1575 100644
|
||||
index 8fdcd52b2..75b21010b 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -0,0 +0,0 @@ public class Explosion {
|
||||
|
||||
@@ -19,7 +19,7 @@ index efacd5ea0..0130e5860 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 7a9cd1398..21b8a1dd9 100644
|
||||
index a4003896d..9bd11a5fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
@@ -19,7 +19,7 @@ index be92c1af6..efacd5ea0 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 420cbee6a..7a9cd1398 100644
|
||||
index d7f86bf76..a4003896d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 31 Mar 2016 19:17:58 -0400
|
||||
Subject: [PATCH] Do not load chunks for light checks
|
||||
|
||||
Should only happen for blocks on the edge that uses neighbors light level
|
||||
(certain blocks). In that case, there will be 3-4 other neighbors to get a light level from.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 307539199..cc1492e4d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
if (blockposition.getY() >= 256) {
|
||||
blockposition = new BlockPosition(blockposition.getX(), 255, blockposition.getZ());
|
||||
}
|
||||
+ if (!this.isLoaded(blockposition)) return 0; // Paper
|
||||
|
||||
return this.getChunkAtWorldCoords(blockposition).a(blockposition, i);
|
||||
}
|
||||
--
|
||||
@@ -0,0 +1,32 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 5 Apr 2016 19:42:22 -0400
|
||||
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 5b2d67260..3aecf7a5d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
return this.K;
|
||||
}
|
||||
|
||||
+ public boolean shouldStayLoaded(int i, int j) { return g(i, j); } // Paper - OBFHELPER
|
||||
public boolean g(int i, int j) {
|
||||
BlockPosition blockposition = this.getSpawn();
|
||||
int k = i * 16 + 8 - blockposition.getX();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
index 6b62235e5..26ef3a41f 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||
@@ -0,0 +0,0 @@ public abstract class WorldProvider {
|
||||
public void l() {}
|
||||
|
||||
public boolean a(int i, int j) {
|
||||
- return true;
|
||||
+ return !this.b.shouldStayLoaded(i, j); // Paper - Use shouldStayLoaded check for all worlds
|
||||
}
|
||||
|
||||
protected abstract void m();
|
||||
--
|
||||
20
Spigot-Server-Patches/Don-t-tick-Skulls-unused-code.patch
Normal file
20
Spigot-Server-Patches/Don-t-tick-Skulls-unused-code.patch
Normal file
@@ -0,0 +1,20 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 13 Apr 2016 00:30:10 -0400
|
||||
Subject: [PATCH] Don't tick Skulls - unused code
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||
index db4967f24..804236547 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||
@@ -0,0 +0,0 @@ import com.mojang.authlib.ProfileLookupCallback;
|
||||
import java.util.concurrent.Callable;
|
||||
// Spigot end
|
||||
|
||||
-public class TileEntitySkull extends TileEntity implements ITickable {
|
||||
+public class TileEntitySkull extends TileEntity /*implements ITickable*/ { // Paper - remove tickable
|
||||
|
||||
private GameProfile a;
|
||||
private int e;
|
||||
--
|
||||
@@ -24,7 +24,7 @@ index 0094d1a87..4da846719 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index a5d0ae1de..12b86ab75 100644
|
||||
index 2ed362791..20248de7e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -36,7 +36,7 @@ index a5d0ae1de..12b86ab75 100644
|
||||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 850436d42..7aa12c3b4 100644
|
||||
index 850436d42..8d47b58c9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -47,7 +47,7 @@ index 850436d42..7aa12c3b4 100644
|
||||
+ // Paper start - Configurable EntityFallingBlock height nerf
|
||||
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) {
|
||||
+ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
|
||||
+ this.dropItem(new ItemStack(block, 1, block.getDropData(this.block)), 0.0F);
|
||||
+ this.dropItem(new ItemStack(block), 0.0F);
|
||||
+ }
|
||||
+
|
||||
+ this.die();
|
||||
|
||||
@@ -7,7 +7,7 @@ Unloading Chunks async is extremely dangerous. This will force it to main
|
||||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 4fd6d3dbf..013c5b4cf 100644
|
||||
index 8b63192cf..86848543d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
|
||||
the same way we handle async chunk loads.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 1f2265231..e41850742 100644
|
||||
index 3ee587014..fdbc01792 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
|
||||
@@ -14,7 +14,7 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
||||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index c2eb3a58d..9c27966ea 100644
|
||||
index 359aa3997..88b761d27 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c9d0c22d5..e88baae1d 100644
|
||||
index 11012360b..307539199 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -51,7 +51,7 @@ index 20248de7e..6bb4cf48e 100644
|
||||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 7aa12c3b4..1d4a7b64d 100644
|
||||
index 8d47b58c9..7e5a2775a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -89,7 +89,7 @@ index 5ceb3f206..87f3205f8 100644
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index e56d4836d..0bf8d15d7 100644
|
||||
index a8280acf9..38dd8f17a 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
@@ -118,7 +118,7 @@ index fd64b75ed..3f0b6ac26 100644
|
||||
flag = true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index f4edde236..9882fe466 100644
|
||||
index f09251eec..34246369c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
|
||||
@@ -7,7 +7,7 @@ If any part of a Vehicle/Passenger relationship is visible to a player,
|
||||
send all passenger/vehicles to the player in the chain.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 115504bf6..509254b35 100644
|
||||
index 9af242380..70694c8e5 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
37
Spigot-Server-Patches/EntityPathfindEvent.patch
Normal file
37
Spigot-Server-Patches/EntityPathfindEvent.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 21:22:26 -0400
|
||||
Subject: [PATCH] EntityPathfindEvent
|
||||
|
||||
Fires when an Entity decides to start moving to a location.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index 1964684ac..0c5215657 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -0,0 +0,0 @@ import javax.annotation.Nullable;
|
||||
|
||||
public abstract class NavigationAbstract {
|
||||
|
||||
- protected EntityInsentient a;
|
||||
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
||||
protected World b;
|
||||
@Nullable
|
||||
protected PathEntity c;
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||
return this.c;
|
||||
} else {
|
||||
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
||||
this.q = blockposition;
|
||||
float f = this.k();
|
||||
|
||||
@@ -0,0 +0,0 @@ public abstract class NavigationAbstract {
|
||||
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||
return this.c;
|
||||
} else {
|
||||
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
|
||||
this.q = blockposition;
|
||||
float f = this.k();
|
||||
|
||||
--
|
||||
@@ -0,0 +1,43 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <1254957+zachbr@users.noreply.github.com>
|
||||
Date: Fri, 22 Apr 2016 01:43:11 -0500
|
||||
Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
||||
|
||||
Don't even get me started
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index acf0e0281..b12c9e461 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -0,0 +0,0 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
|
||||
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
||||
+ // Paper start - Forward
|
||||
+ heal(f, regainReason, false);
|
||||
+ }
|
||||
+
|
||||
+ public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason, boolean isFastRegen) {
|
||||
+ // Paper end
|
||||
float f1 = this.getHealth();
|
||||
|
||||
if (f1 > 0.0F) {
|
||||
- EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason);
|
||||
+ EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); // Paper - Add isFastRegen
|
||||
this.world.getServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/FoodMetaData.java b/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
index bbcc488bd..d886e476b 100644
|
||||
--- a/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
+++ b/src/main/java/net/minecraft/server/FoodMetaData.java
|
||||
@@ -0,0 +0,0 @@ public class FoodMetaData {
|
||||
if (this.foodTickTimer >= 10) {
|
||||
float f = Math.min(this.saturationLevel, 6.0F);
|
||||
|
||||
- entityhuman.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
|
||||
+ entityhuman.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED, true); // CraftBukkit - added RegainReason // Paper - This is fast regen
|
||||
this.a(f);
|
||||
this.foodTickTimer = 0;
|
||||
}
|
||||
--
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Expand Explosions API
|
||||
Add Entity as a Source capability, and add more API choices, and on Location.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 65ad8e588..0640ca094 100644
|
||||
index f7eaecb3f..e8290759b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -37,7 +37,7 @@ index c5da2cde3..4ac2d39c5 100644
|
||||
|
||||
if (this.a(entityplayer, false, d0, d1, d2, packetplayoutworldparticles)) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 817e29474..3ee663293 100644
|
||||
index 7004f1176..1afb480f8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -8,7 +8,7 @@ Plugins can cancel this if they want to ensure experience orbs do not lose impor
|
||||
metadata such as spawn reason, or conditionally move data from source to target.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 069ba83db..ee061d693 100644
|
||||
index b96511804..d8ce3efc9 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -221,7 +221,7 @@ index 998662d9e..6b4eb7f05 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 013c5b4cf..817e29474 100644
|
||||
index 86848543d..7004f1176 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -111,7 +111,7 @@ index 7acdac55e..f1a3be69d 100644
|
||||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index d7eb4af83..9f9002dd8 100644
|
||||
index 019fd4b48..43e357e39 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@@ -13,7 +13,7 @@ Update adjacent blocks of doors, double plants, pistons and beds
|
||||
when cancelling interaction.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index ce8f76871..126c17d1b 100644
|
||||
index e34198e40..620efb1ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerInteractManager {
|
||||
|
||||
@@ -30,7 +30,7 @@ index f88444c7e..f64a5ef35 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index 1d4a7b64d..c4a25bd87 100644
|
||||
index 7e5a2775a..ad5ac66ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -0,0 +0,0 @@ public class EntityFallingBlock extends Entity {
|
||||
|
||||
@@ -53,14 +53,14 @@ index 4c2cdd4bc..abf8799c4 100644
|
||||
|
||||
public boolean bk() {
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
index 7b1d51e5a..b0863b4db 100644
|
||||
index 7b1d51e5a..1493d0999 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||
@@ -0,0 +0,0 @@ public class ItemFireworks extends Item {
|
||||
ItemStack itemstack = itemactioncontext.getItemStack();
|
||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack);
|
||||
|
||||
+ entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
||||
+ entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper
|
||||
world.addEntity(entityfireworks);
|
||||
itemstack.subtract(1);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix AIOOBE in inventory handling
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index e4f28b8ac..c09620b37 100644
|
||||
index 32cef8e30..b17540ecb 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -26,7 +26,7 @@ index 845ec2250..c252ff6d5 100644
|
||||
|
||||
this.lastLevelCost = this.levelCost;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3c1f02c18..d7eb4af83 100644
|
||||
index 1c8c364d3..019fd4b48 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -35,7 +35,7 @@ index 3c1f02c18..d7eb4af83 100644
|
||||
}
|
||||
+ // Paper start
|
||||
+ if (prop == Property.REPAIR_COST && container instanceof net.minecraft.server.ContainerAnvil) {
|
||||
+ ((ContainerAnvil) container).levelCost = value;
|
||||
+ ((net.minecraft.server.ContainerAnvil) container).levelCost = value;
|
||||
+ }
|
||||
+ // Paper end
|
||||
getHandle().setContainerData(container, prop.getId(), value);
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 3 Apr 2016 17:48:50 -0400
|
||||
Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 2c6774082..5b2d67260 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
}
|
||||
|
||||
public void applyPhysics(BlockPosition blockposition, Block block) {
|
||||
+ if (captureBlockStates) { return; } // Paper - Cancel all physics during placement
|
||||
this.a(blockposition.west(), block, blockposition);
|
||||
this.a(blockposition.east(), block, blockposition);
|
||||
this.a(blockposition.down(), block, blockposition);
|
||||
--
|
||||
@@ -9,7 +9,7 @@ has not resolved all the bugs with the changes.
|
||||
This patch fixes known issues and really should be applied by Spigot team.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index aaa65582b..8ecdf7a5b 100644
|
||||
index 744b5bc6d..718ebfea0 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@@ -8,7 +8,7 @@ Vanilla will double add Spider Jockeys to the world, so ignore already added.
|
||||
Also add debug if something else tries to, and abort before world gets bad state
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index faaa1b36b..063d53f1c 100644
|
||||
index ad3bd3808..e70c2184c 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
@@ -21,7 +21,7 @@ index faaa1b36b..063d53f1c 100644
|
||||
Iterator iterator = entity.bP().iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c34f42efc..a8ef9e337 100644
|
||||
index c9b6b57af..067b92f3e 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix MC-117075: TE Unload Lag Spike
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 0ba99bcbc..49e7c1589 100644
|
||||
index ca7c23f54..d0ce6b363 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix block break desync
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index a7132427a..32c99085f 100644
|
||||
index f26636e30..aa93b5945 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix exploit that allowed colored signs to be created
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index d71efd62f..5fe01e7ef 100644
|
||||
index ab2bd6dae..067f7b990 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Fix lag from explosions processing dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 37e6e5922..e30219258 100644
|
||||
index 37e6e5922..6b9f6c956 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -0,0 +0,0 @@ public class Explosion {
|
||||
@@ -17,7 +17,7 @@ index 37e6e5922..e30219258 100644
|
||||
+ List list = this.world.getEntities(this.source, new AxisAlignedBB((double) i, (double) l, (double) j1, (double) j, (double) i1, (double) k1), new com.google.common.base.Predicate<Entity>() {
|
||||
+ @Override
|
||||
+ public boolean apply(Entity entity) {
|
||||
+ return IEntitySelector.d.apply(entity) && !entity.dead;
|
||||
+ return IEntitySelector.d.test(entity) && !entity.dead;
|
||||
+ }
|
||||
+ });
|
||||
+ // Paper end
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Sat, 2 Apr 2016 20:37:03 -0400
|
||||
Subject: [PATCH] Fix reducedDebugInfo not initialized on client
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 23cab725d..8e1edde31 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
playerconnection.sendPacket(new PacketPlayOutHeldItemSlot(entityplayer.inventory.itemInHandIndex));
|
||||
playerconnection.sendPacket(new PacketPlayOutRecipeUpdate(this.server.getCraftingManager().b()));
|
||||
playerconnection.sendPacket(new PacketPlayOutTags(this.server.getTagRegistry()));
|
||||
+ playerconnection.sendPacket(new PacketPlayOutEntityStatus(entityplayer, (byte) (worldserver.getGameRules().getBoolean("reducedDebugInfo") ? 22 : 23))); // Paper - fix this rule not being initialized on the client
|
||||
this.f(entityplayer);
|
||||
entityplayer.getStatisticManager().c();
|
||||
entityplayer.B().a(entityplayer);
|
||||
--
|
||||
@@ -9,7 +9,7 @@ e.g. servers which allow and support the usage of mod packs.
|
||||
provide an optional flag to disable this check, at your own risk.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 12af78209..3b76c7080 100644
|
||||
index c0b484177..60bc6d331 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
|
||||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 7f249a975..70f2dcc9e 100644
|
||||
index 68a59e708..ed714c2cc 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ import com.mojang.brigadier.StringReader;
|
||||
@@ -78,7 +78,7 @@ index 7f249a975..70f2dcc9e 100644
|
||||
|
||||
public boolean hasEnchantments() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index 4c4f04557..cb3b952e2 100644
|
||||
index d41459ef0..cadff64bf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -0,0 +0,0 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
|
||||
|
||||
@@ -15,7 +15,7 @@ This may cause additional prefixes to be disabled for plugins bypassing
|
||||
the plugin logger.
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 1b4877868..a98abca8e 100644
|
||||
index 9d2473317..eb2cdf129 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Implement World.getEntity(UUID) API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 0640ca094..6705864a7 100644
|
||||
index e8290759b..0f4a894eb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -0,0 +0,0 @@ public class CraftWorld implements World {
|
||||
|
||||
@@ -226,7 +226,7 @@ index c9edd289a..8aa121e2f 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
index 2179664a0..616fcbf13 100644
|
||||
index d7e1ecc03..f20cddc41 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
@@ -0,0 +0,0 @@ public class ServerPing {
|
||||
|
||||
@@ -43,7 +43,7 @@ index 6ae576a2e..af1981967 100644
|
||||
ItemStack itemstack = entityitemframe.getItem();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3b3cc69de..4588df4b1 100644
|
||||
index e5ecfdbf0..5102f24ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Include Log4J2 SLF4J implementation
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index a98abca8e..9354f6edf 100644
|
||||
index eb2cdf129..353a5560e 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -0,0 +0,0 @@
|
||||
|
||||
@@ -110,7 +110,7 @@ index c91caf578..59dc239b8 100644
|
||||
this.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 5fe01e7ef..4ed107eac 100644
|
||||
index 067f7b990..97b315bca 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -123,7 +123,7 @@ index 5fe01e7ef..4ed107eac 100644
|
||||
this.player.m();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index c1de6564a..d397c6c74 100644
|
||||
index 879780c5b..907f0232b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class PlayerList {
|
||||
@@ -155,7 +155,7 @@ index 4b9ecb4a6..b602a5d1b 100644
|
||||
public boolean isBlocking() {
|
||||
return getHandle().isBlocking();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3b76c7080..79ade89c5 100644
|
||||
index 60bc6d331..b25980027 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] ItemStack#getMaxItemUseDuration
|
||||
Allows you to determine how long it takes to use a usable/consumable item
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index be6205275..a4a5058da 100644
|
||||
index ca169e113..dad883054 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||
|
||||
@@ -43,7 +43,7 @@ index a340866f3..1e3405cc1 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 36ea4ad47..e5567701e 100644
|
||||
index 4a4cc6c59..b0060c363 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -0,0 +0,0 @@ public class Chunk implements IChunkAccess {
|
||||
|
||||
@@ -18,7 +18,7 @@ index c3e990bdf..e2a7b4be2 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 002da2a19..80cdf5528 100644
|
||||
index 002da2a19..70a7edf57 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -38,6 +38,22 @@ index 002da2a19..80cdf5528 100644
|
||||
public BlockPosition a(int i, int j, int k) {
|
||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k);
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
+ public BlockPosition.MutableBlockPosition setValues(int i, int j, int k) { return c(i, j, k);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
||||
this.b = i;
|
||||
this.c = j;
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
return this;
|
||||
}
|
||||
|
||||
+ public BlockPosition.MutableBlockPosition setValues(double d0, double d1, double d2) { return c(d0, d1, d2);} // Paper - OBFHELPER
|
||||
public BlockPosition.MutableBlockPosition c(double d0, double d1, double d2) {
|
||||
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 0ae780c8e..3b97981bc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -73,7 +89,7 @@ index 00a530c51..2947d9ff6 100644
|
||||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 97cfd6695..05ed0abe7 100644
|
||||
index 97cfd6695..81605b10f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -0,0 +0,0 @@ package net.minecraft.server;
|
||||
@@ -90,6 +106,9 @@ index 97cfd6695..05ed0abe7 100644
|
||||
|
||||
- EntityTypes.REGISTRY.a(new MinecraftKey(s), entitytypes);
|
||||
+ // Paper start
|
||||
+ if (clsToKeyMap == null ) clsToKeyMap = new java.util.HashMap<>();
|
||||
+ if (clsToTypeMap == null ) clsToTypeMap = new java.util.HashMap<>();
|
||||
+
|
||||
+ MinecraftKey key = new MinecraftKey(s);
|
||||
+ Class<? extends T> entityClass = entitytypes_a.getEntityClass();
|
||||
+ EntityTypes.REGISTRY.a(key, entitytypes);
|
||||
@@ -97,8 +116,8 @@ index 97cfd6695..05ed0abe7 100644
|
||||
+ clsToTypeMap.put(entityClass, org.bukkit.entity.EntityType.fromName(s));
|
||||
return entitytypes;
|
||||
}
|
||||
+ public static Map<Class<? extends Entity>, MinecraftKey> clsToKeyMap = new java.util.HashMap<>();
|
||||
+ public static Map<Class<? extends Entity>, org.bukkit.entity.EntityType> clsToTypeMap = new java.util.HashMap<>();
|
||||
+ public static Map<Class<? extends Entity>, MinecraftKey> clsToKeyMap;
|
||||
+ public static Map<Class<? extends Entity>, org.bukkit.entity.EntityType> clsToTypeMap;
|
||||
+ // Paper end
|
||||
|
||||
@Nullable
|
||||
@@ -113,7 +132,7 @@ index 97cfd6695..05ed0abe7 100644
|
||||
private boolean c = true;
|
||||
private boolean d = true;
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index cc96294f4..7f249a975 100644
|
||||
index 3f0c5d7dd..68a59e708 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ import org.bukkit.Location;
|
||||
@@ -142,6 +161,24 @@ index cc96294f4..7f249a975 100644
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/LotoSelectorEntry.java b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
index a540167d6..add618866 100644
|
||||
--- a/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LotoSelectorEntry.java
|
||||
@@ -0,0 +0,0 @@ public abstract class LotoSelectorEntry {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(LotoSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((LotoSelectorEntry) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public LotoSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
new file mode 100644
|
||||
index 000000000..a4b0901cf
|
||||
@@ -349,8 +386,30 @@ index 000000000..a4b0901cf
|
||||
+ return null;
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
index 8170a8428..e21e60b00 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
@@ -0,0 +0,0 @@ public interface NBTBase {
|
||||
|
||||
byte getTypeId();
|
||||
|
||||
- static default NBTBase createTag(byte b0) {
|
||||
+ static NBTBase createTag(byte b0) { // Paper - decompile fix
|
||||
switch (b0) {
|
||||
case 0:
|
||||
return new NBTTagEnd();
|
||||
@@ -0,0 +0,0 @@ public interface NBTBase {
|
||||
}
|
||||
}
|
||||
|
||||
- static default String n(int i) {
|
||||
+ static String n(int i) { // Paper - decompile fix
|
||||
switch (i) {
|
||||
case 0:
|
||||
return "TAG_End";
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
||||
index 1a81d8e5f..08db5e332 100644
|
||||
index 1a81d8e5f..057c2077a 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
||||
@@ -0,0 +0,0 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
@@ -363,10 +422,9 @@ index 1a81d8e5f..08db5e332 100644
|
||||
this.a(i, t0);
|
||||
return nbtbase;
|
||||
@@ -0,0 +0,0 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||
public abstract void a(int i, NBTBase nbtbase);
|
||||
|
||||
public abstract void b(int i);
|
||||
-
|
||||
|
||||
- public Object set(int i, Object object) {
|
||||
- return this.set(i, (NBTBase) object);
|
||||
- }
|
||||
@@ -374,7 +432,22 @@ index 1a81d8e5f..08db5e332 100644
|
||||
- public Object get(int i) {
|
||||
- return this.get(i);
|
||||
- }
|
||||
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
index 11ffa6c34..3ff3a2983 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
|
||||
return stringbuilder.append(']').toString();
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ @Override
|
||||
+ public NBTTagByteArray clone() {
|
||||
byte[] abyte = new byte[this.data.length];
|
||||
|
||||
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index 7fc9b5ff3..e658816c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -411,8 +484,21 @@ index 7fc9b5ff3..e658816c2 100644
|
||||
- return this.clone();
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
index f5c9b97d5..d121ad4f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
|
||||
@@ -0,0 +0,0 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
|
||||
return this.a(i);
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagIntArray clone() { // Paper - decompile fix
|
||||
return this.c();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index b3c944d70..e56d4836d 100644
|
||||
index b3c944d70..a8280acf9 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -0,0 +0,0 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -425,7 +511,11 @@ index b3c944d70..e56d4836d 100644
|
||||
|
||||
public NBTTagList() {}
|
||||
@@ -0,0 +0,0 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
public NBTBase clone() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
- public NBTBase clone() {
|
||||
+ public NBTTagList clone() {
|
||||
return this.c();
|
||||
}
|
||||
-
|
||||
@@ -446,7 +536,7 @@ index b3c944d70..e56d4836d 100644
|
||||
- }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index fa4a7fa63..749be86fe 100644
|
||||
index 2fb86aa19..6f21b01a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
@@ -462,4 +552,72 @@ index fa4a7fa63..749be86fe 100644
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index ef332d651..7cc7eb773 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -0,0 +0,0 @@ import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
-public class RegistryBlockID<T> implements Registry<T> {
|
||||
+public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
||||
|
||||
private int a;
|
||||
private final IdentityHashMap<T, Integer> b;
|
||||
@@ -0,0 +0,0 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
this.b.put(t0, Integer.valueOf(i));
|
||||
|
||||
while (this.c.size() <= i) {
|
||||
- this.c.add((Object) null);
|
||||
+ this.c.add(null); // Paper - decompile fix
|
||||
}
|
||||
|
||||
this.c.set(i, t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
index 2179664a0..d7e1ecc03 100644
|
||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||
@@ -0,0 +0,0 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerData object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerData) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +0,0 @@ public class ServerPing {
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
||||
return this.a((ServerPing.ServerPingPlayerSample) object, type, jsonserializationcontext);
|
||||
}
|
||||
|
||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||
}
|
||||
}
|
||||
--
|
||||
@@ -7,7 +7,7 @@ I don't know why upstream made only the minimum height configurable but
|
||||
whatever
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 49f282332..d80cd60ab 100644
|
||||
index 703642c0b..a33c55f41 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] Make shield blocking delay configurable
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 5a9c68e4f..650addb84 100644
|
||||
index f1db4becd..ef4bfb480 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
|
||||
@@ -5,7 +5,7 @@ Subject: [PATCH] More informative vehicle moved wrongly message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index d61ce6461..e4f28b8ac 100644
|
||||
index 79fddc866..32cef8e30 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
|
||||
Remove hashMap lookup every check, simplify code to remove ternary
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 70f2dcc9e..be6205275 100644
|
||||
index ed714c2cc..ca169e113 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -0,0 +0,0 @@ public final class ItemStack {
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
|
||||
Reduce method invocations for World.isLoaded(BlockPosition)Z
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3b2de1f31..0ba99bcbc 100644
|
||||
index 04b5521cd..ca7c23f54 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -25,7 +25,7 @@ index dccccbf5b..3626aa717 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index e30219258..ddbf667c4 100644
|
||||
index 6b9f6c956..8fdcd52b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -0,0 +0,0 @@ public class Explosion {
|
||||
|
||||
@@ -31,7 +31,7 @@ index e2a7b4be2..58f8b4b72 100644
|
||||
public BaseBlockPosition(int i, int j, int k) {
|
||||
this.a = i;
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 80cdf5528..39252ad9a 100644
|
||||
index 70a7edf57..fff08f09d 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -0,0 +0,0 @@ public class BlockPosition extends BaseBlockPosition {
|
||||
@@ -96,7 +96,7 @@ index 7c6308dbe..880058a9e 100644
|
||||
private NibbleArray skyLight;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 1c939e523..9e56b046f 100644
|
||||
index d3785f73b..f8e4cd14c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -5,12 +5,12 @@ Subject: [PATCH] Option for maximum exp value when merging orbs
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 6344537ec..33743f8fd 100644
|
||||
index c80d84b9b..605e84173 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -0,0 +0,0 @@ public class PaperWorldConfig {
|
||||
replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList((Object) "stone", "planks"));
|
||||
log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius);
|
||||
disableCreeperLingeringEffect = getBoolean("disable-creeper-lingering-effect", false);
|
||||
log("Creeper lingering effect: " + disableCreeperLingeringEffect);
|
||||
}
|
||||
+
|
||||
+ public int expMergeMaxValue;
|
||||
@@ -20,7 +20,7 @@ index 6344537ec..33743f8fd 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index b9472dddb..d28d4a9a7 100644
|
||||
index 56292fad9..d5c509733 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -25,7 +25,7 @@ index 9f586774d..1c2209270 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 9e56b046f..c9d0c22d5 100644
|
||||
index f8e4cd14c..11012360b 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -0,0 +0,0 @@ public abstract class World implements GeneratorAccess, IIBlockAccess, AutoClose
|
||||
|
||||
@@ -31,7 +31,7 @@ index c37c46e71..88092d823 100644
|
||||
public ScoreboardTeamBase be() {
|
||||
if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 553011d88..65fa09a01 100644
|
||||
index a3486bd46..79fddc866 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -0,0 +0,0 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||
|
||||
@@ -32,7 +32,7 @@ index 38de48ebc..321da3be3 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 509254b35..1aa4519a6 100644
|
||||
index 70694c8e5..51b42933d 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -0,0 +0,0 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
@@ -48,7 +48,7 @@ index 02bbb0d1d..e73b07f42 100644
|
||||
uniqueId = i.getId();
|
||||
// Paper end
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c2cd5ac4b..12af78209 100644
|
||||
index 7021a81be..c0b484177 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -0,0 +0,0 @@
|
||||
|
||||
@@ -51,7 +51,7 @@ index 1e6ea3084..9145401bc 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 063d53f1c..071e8a196 100644
|
||||
index e70c2184c..20aa20a98 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -0,0 +0,0 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||
|
||||
51
Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch
Normal file
51
Spigot-Server-Patches/Prevent-Fire-from-loading-chunks.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 17 Apr 2016 17:27:09 -0400
|
||||
Subject: [PATCH] Prevent Fire from loading chunks
|
||||
|
||||
This causes the nether to spam unload/reload chunks, plus overall
|
||||
bad behavior.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
|
||||
index b6caf4c8a..f3a278c0b 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockFire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockFire.java
|
||||
@@ -0,0 +0,0 @@ public class BlockFire extends Block {
|
||||
}
|
||||
|
||||
blockposition_mutableblockposition.g(blockposition).d(l, j1, i1);
|
||||
+ if (!world.isLoaded(blockposition_mutableblockposition)) continue; // Paper
|
||||
int l1 = this.a((IWorldReader) world, (BlockPosition) blockposition_mutableblockposition);
|
||||
|
||||
if (l1 > 0) {
|
||||
@@ -0,0 +0,0 @@ public class BlockFire extends Block {
|
||||
}
|
||||
|
||||
private void a(World world, BlockPosition blockposition, int i, Random random, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
|
||||
- int k = this.f(world.getType(blockposition).getBlock());
|
||||
+ // Paper start
|
||||
+ final IBlockData iblockdata = world.getTypeIfLoaded(blockposition);
|
||||
+ if (iblockdata == null) return;
|
||||
+ int k = this.f(iblockdata.getBlock());
|
||||
+ // Paper end
|
||||
|
||||
if (random.nextInt(i) < k) {
|
||||
- IBlockData iblockdata = world.getType(blockposition);
|
||||
+ //IBlockData iblockdata = world.getType(blockposition); // Paper
|
||||
|
||||
// CraftBukkit start
|
||||
org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
@@ -0,0 +0,0 @@ public class BlockFire extends Block {
|
||||
for (int k = 0; k < j; ++k) {
|
||||
EnumDirection enumdirection = aenumdirection[k];
|
||||
|
||||
- i = Math.max(this.g(iworldreader.getType(blockposition.shift(enumdirection)).getBlock()), i);
|
||||
+ // Paper start
|
||||
+ final IBlockData type = ((World)iworldreader).getTypeIfLoaded(blockposition.shift(enumdirection));
|
||||
+ if (type == null) continue;
|
||||
+ i = Math.max(this.g(type.getBlock()), i);
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
return i;
|
||||
--
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user