Skip to content

Commit

Permalink
Update Paper to MC 1.12-pre5
Browse files Browse the repository at this point in the history
  • Loading branch information
Zach Brown committed May 21, 2017
1 parent 7ff16c0 commit c1d0b4b
Show file tree
Hide file tree
Showing 56 changed files with 356 additions and 380 deletions.
8 changes: 4 additions & 4 deletions Spigot-API-Patches/0001-POM-changes.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From fb47b4cfb2bfb00c13f0555b516be68a789659f6 Mon Sep 17 00:00:00 2001
From fb5f733cfceb51c30b4ccc0c63e82c715882c042 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 17:16:08 -0600
Subject: [PATCH] POM changes


diff --git a/pom.xml b/pom.xml
index e7891169..067d30e8 100644
index 66bb7a12..ea6a710e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,35 +4,37 @@
Expand All @@ -24,7 +24,7 @@ index e7891169..067d30e8 100644
- <artifactId>spigot-api</artifactId>
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper-api</artifactId>
<version>1.12-pre2-SNAPSHOT</version>
<version>1.12-pre5-SNAPSHOT</version>
<packaging>jar</packaging>

- <name>Spigot-API</name>
Expand Down Expand Up @@ -133,5 +133,5 @@ index e7891169..067d30e8 100644
<shadedArtifactAttached>true</shadedArtifactAttached>
</configuration>
--
2.11.0
2.13.0.windows.1

Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
From eabf0ce918f79ef14c00b9d9c69ba3ddba349feb Mon Sep 17 00:00:00 2001
From bd06f97c046b55140b8feb68b622844e96dc395a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 15 May 2017 10:11:42 -0500
Subject: [PATCH] 1.12-pre2 versioning change and warning
Subject: [PATCH] 1.12 prerelease versioning change and warning

Remove when merged to master

diff --git a/src/main/java/org/bukkit/command/defaults/VersionCommand.java b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
index aae605e9..d7e3d7f4 100644
index aae605e9..2319d6b5 100644
--- a/src/main/java/org/bukkit/command/defaults/VersionCommand.java
+++ b/src/main/java/org/bukkit/command/defaults/VersionCommand.java
@@ -48,6 +48,7 @@ public class VersionCommand extends BukkitCommand {
if (!testPermission(sender)) return true;

if (args.length == 0) {
+ sender.sendMessage("This is pre-release software, and is not necessarily of the same quality as a full release"); // TODO: Remove during merge into master
+ sender.sendMessage("This is pre-release software"); // TODO: Remove during merge into master
sender.sendMessage("This server is running " + Bukkit.getName() + " version " + Bukkit.getVersion() + " (Implementing API version " + Bukkit.getBukkitVersion() + ")");
sendVersion(sender);
} else {
Expand All @@ -27,5 +27,5 @@ index aae605e9..d7e3d7f4 100644
try {
HttpURLConnection connection = (HttpURLConnection) new URL("https://api.github.com/repos/" + repo + "/compare/" + BRANCH + "..." + hash).openConnection();
--
2.13.0
2.13.0.windows.1

8 changes: 4 additions & 4 deletions Spigot-Server-Patches/0001-POM-Changes.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From 617559d05de68cd645b17492c511e62ae593de4b Mon Sep 17 00:00:00 2001
From f89b79a21ed04e7a9e81ecc8108f808f659927c0 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes


diff --git a/pom.xml b/pom.xml
index 4f14d6f41..a833892e3 100644
index 31cb11194..167bc0ac2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,12 @@
Expand All @@ -17,7 +17,7 @@ index 4f14d6f41..a833892e3 100644
+ <groupId>com.destroystokyo.paper</groupId>
+ <artifactId>paper</artifactId>
<packaging>jar</packaging>
<version>1.12-pre2-SNAPSHOT</version>
<version>1.12-pre5-SNAPSHOT</version>
- <name>Spigot</name>
- <url>http://www.spigotmc.org</url>
+ <name>Paper</name>
Expand Down Expand Up @@ -159,5 +159,5 @@ index 93046379d..674096cab 100644

if (stream != null) {
--
2.13.0
2.13.0.windows.1

76 changes: 38 additions & 38 deletions Spigot-Server-Patches/0006-Timings-v2.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
From 0c6f1973af82e9c39ffe0242f525d1011bbeeff5 Mon Sep 17 00:00:00 2001
From 749d5785a1e24e67652d8abe029784fd73635c4d Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2


diff --git a/pom.xml b/pom.xml
index 33bbeb2bd..0cbe47cb6 100644
index 167bc0ac2..6b73c55f9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -65,6 +65,12 @@
Expand Down Expand Up @@ -441,7 +441,7 @@ index 5ab2cf6ee..b5795b6d3 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 0ee47df3f..ba3913667 100644
index 7c39edca8..6c1c5e566 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -35,6 +35,15 @@ public class Block {
Expand Down Expand Up @@ -531,7 +531,7 @@ index 9dcab42de..c1b0d6cea 100644
this.chunkLoader.a(this.world, chunk);
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index fe387e218..6550686ee 100644
index b23de7663..fe64ee4aa 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -388,7 +388,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
Expand Down Expand Up @@ -571,7 +571,7 @@ index fe387e218..6550686ee 100644
// return chunk; // CraftBukkit
}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 30538d8ec..840ffeb93 100644
index 70fde368f..c56aa5c19 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -24,7 +24,7 @@ import java.io.PrintStream;
Expand Down Expand Up @@ -624,7 +624,7 @@ index 30538d8ec..840ffeb93 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index bae717b18..c6b7d6c22 100644
index ef63b5d3b..0e70cdf6f 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -25,7 +25,8 @@ import org.bukkit.block.BlockFace;
Expand All @@ -646,15 +646,15 @@ index bae717b18..c6b7d6c22 100644
// Spigot start
public final byte activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState;
@@ -525,7 +526,6 @@ public abstract class Entity implements ICommandListener {
@@ -524,7 +525,6 @@ public abstract class Entity implements ICommandListener {
}

public void move(EnumMoveType enummovetype, double d0, double d1, double d2) {
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.startTiming(); // Spigot
if (this.noclip) {
this.a(this.getBoundingBox().d(d0, d1, d2));
this.recalcPosition();
@@ -919,7 +919,6 @@ public abstract class Entity implements ICommandListener {
@@ -918,7 +918,6 @@ public abstract class Entity implements ICommandListener {

this.world.methodProfiler.b();
}
Expand All @@ -663,7 +663,7 @@ index bae717b18..c6b7d6c22 100644

public void recalcPosition() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 3a92c468c..2c22b6ca2 100644
index bf2761d53..5a2dbe5ff 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -31,7 +31,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
Expand Down Expand Up @@ -765,7 +765,7 @@ index c840f6761..14504cbcc 100644
}

diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 39318aaf1..e847f3f1a 100644
index 249fccce9..3629cbc47 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -47,8 +47,8 @@ import org.bukkit.Bukkit;
Expand Down Expand Up @@ -1012,7 +1012,7 @@ index eeac34998..e4ed2e991 100644

}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1dbdcfa57..63ea04fb4 100644
index 3bcabb195..7c4fe706a 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -56,6 +56,7 @@ import org.bukkit.inventory.CraftingInventory;
Expand All @@ -1023,7 +1023,7 @@ index 1dbdcfa57..63ea04fb4 100644
// CraftBukkit end

public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1346,7 +1347,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1359,7 +1360,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end

private void handleCommand(String s) {
Expand All @@ -1032,7 +1032,7 @@ index 1dbdcfa57..63ea04fb4 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1357,22 +1358,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1370,22 +1371,22 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);

if (event.isCancelled()) {
Expand All @@ -1056,7 +1056,7 @@ index 1dbdcfa57..63ea04fb4 100644
}
- org.bukkit.craftbukkit.SpigotTimings.playerCommandTimer.stopTiming(); // Spigot
+ MinecraftTimings.playerCommandTimer.stopTiming(); // Paper
// this.minecraftServer.getCommandHandler().b(this.player, s);
// this.minecraftServer.getCommandHandler().a(this.player, s);
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
Expand Down Expand Up @@ -1090,7 +1090,7 @@ index f74b06794..1fc632e0c 100644
+ // Paper end
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index f79683a60..4aaf287ae 100644
index 35f421164..4a8927798 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
Expand Down Expand Up @@ -1176,7 +1176,7 @@ index 591f4ad7f..e02f0c442 100644
private static final RegistryMaterials<MinecraftKey, Class<? extends TileEntity>> f = new RegistryMaterials();
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a366b2d70..eafb76003 100644
index 41f0ac2bf..919f041d9 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -18,11 +18,11 @@ import com.google.common.collect.Maps;
Expand Down Expand Up @@ -1256,33 +1256,33 @@ index a366b2d70..eafb76003 100644
this.methodProfiler.b();
this.methodProfiler.b();
}
@@ -1621,7 +1626,6 @@ public abstract class World implements IBlockAccess {
entity.ticksLived++;
entity.inactiveTick();
} else {
- entity.tickTimer.startTiming(); // Spigot
// CraftBukkit end
entity.M = entity.locX;
entity.N = entity.locY;
@@ -1630,6 +1634,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper
if (entity.isPassenger()) {
entity.leaveVehicle();
} else {
@@ -1689,8 +1694,6 @@ public abstract class World implements IBlockAccess {
}
@@ -1623,7 +1628,6 @@ public abstract class World implements IBlockAccess {
}
// CraftBukkit end

- entity.tickTimer.startTiming(); // Spigot
entity.M = entity.locX;
entity.N = entity.locY;
entity.O = entity.locZ;
@@ -1631,6 +1635,7 @@ public abstract class World implements IBlockAccess {
entity.lastPitch = entity.pitch;
if (flag && entity.aa) {
++entity.ticksLived;
+ ++co.aikar.timings.TimingHistory.activatedEntityTicks; // Paper
if (entity.isPassenger()) {
entity.leaveVehicle();
} else {
@@ -1690,8 +1695,6 @@ public abstract class World implements IBlockAccess {
}
}
-
- entity.tickTimer.stopTiming(); // Spigot
}
- entity.tickTimer.stopTiming(); // Spigot
-
}

public boolean b(AxisAlignedBB axisalignedbb) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index d91de898f..af722bd00 100644
index b924dad97..63c7d4402 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -256,13 +256,13 @@ public class WorldServer extends World implements IAsyncTaskHandler {
Expand Down Expand Up @@ -1935,5 +1935,5 @@ index be23631b2..9eb36f3e9 100644
}
}
--
2.13.0
2.13.0.windows.1

50 changes: 40 additions & 10 deletions Spigot-Server-Patches/0011-Allow-nerfed-mobs-to-jump.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
From a2b70ad6f16f9f9ed468870ddc0e36ad7200ed59 Mon Sep 17 00:00:00 2001
From 2f4bb5350f76ae64af9b869da3322c0726eed973 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
Expand Down Expand Up @@ -30,8 +30,20 @@ index 4f2fa59ac..8af52a61f 100644
public void b() {
this.b.l(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 0e70cdf6f..8a61c2369 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -109,6 +109,7 @@ public abstract class Entity implements ICommandListener {
public boolean noclip;
public float R;
protected Random random;
+ public boolean fromMobSpawner; // Paper
public int ticksLived;
public int fireTicks;
public boolean inWater; // Spigot - protected -> public // PAIL
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 254955156..09e5408ac 100644
index 67f26bd62..6adb38de0 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -44,6 +44,7 @@ public abstract class EntityInsentient extends EntityLiving {
Expand All @@ -42,19 +54,24 @@ index 254955156..09e5408ac 100644

public EntityInsentient(World world) {
super(world);
@@ -641,6 +642,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@@ -638,6 +639,17 @@ public abstract class EntityInsentient extends EntityLiving {
this.world.methodProfiler.a("checkDespawn");
this.L();
this.world.methodProfiler.b();
+ // Paper start - Re-add so we can allow them to float in water
+ if (this.fromMobSpawner) {
+ // Paper start - Allow nerfed mobs to jump and float
+ if (goalFloat != null) {
+ if (goalFloat.validConditions()) goalFloat.update();
+ this.getControllerJump().jumpIfSet();
+ }
+ // Paper end
return;
}
// Spigot End
+ return;
+ }
+ // Spigot End
this.world.methodProfiler.a("sensing");
this.bw.a();
this.world.methodProfiler.b();
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index b3b303b3b..fc8be86fd 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
Expand All @@ -80,6 +97,19 @@ index b3b303b3b..fc8be86fd 100644
public void e() {
if (this.a.getRandom().nextFloat() < 0.8F) {
this.a.getControllerJump().a();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 825ca9346..2f409fe1e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -557,7 +557,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {

@Override
public boolean hasAI() {
- return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAI(): false;
+ return this.getHandle() instanceof EntityInsentient && (!((EntityInsentient) this.getHandle()).isNoAI() || this.getHandle().getWorld().spigotConfig.nerfSpawnerMobs && ((EntityInsentient) this.getHandle()).fromMobSpawner); // Paper
}

@Override
--
2.13.0
2.13.0.windows.1

Loading

0 comments on commit c1d0b4b

Please sign in to comment.