Update CB (#846)

This commit is contained in:
Shane Freeder 2017-08-09 19:44:28 +01:00 committed by Daniel Ennis
parent 6f32c51336
commit 42faa9e529
7 changed files with 25 additions and 49 deletions

View File

@ -1,4 +1,4 @@
From dbcc226d6239952ce5b5db079ef633eada51a50d Mon Sep 17 00:00:00 2001
From e57d4c1008d43b0b3e1aba3764a8336803b24a00 Mon Sep 17 00:00:00 2001
From: Sudzzy <originmc@outlook.com>
Date: Wed, 2 Mar 2016 15:03:53 -0600
Subject: [PATCH] Configurable mob spawner tick rate
@ -19,7 +19,7 @@ index 4fea4b359..1bb956515 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index 796b3e53f..ce1db632d 100644
index e87f90474..0562c6e34 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -19,6 +19,7 @@ public abstract class MobSpawnerAbstract {
@ -30,7 +30,7 @@ index 796b3e53f..ce1db632d 100644
public MobSpawnerAbstract() {}
@@ -43,6 +44,10 @@ public abstract class MobSpawnerAbstract {
@@ -44,6 +45,10 @@ public abstract class MobSpawnerAbstract {
}
public void c() {
@ -41,7 +41,7 @@ index 796b3e53f..ce1db632d 100644
if (!this.h()) {
this.e = this.d;
} else {
@@ -56,18 +61,18 @@ public abstract class MobSpawnerAbstract {
@@ -57,18 +62,18 @@ public abstract class MobSpawnerAbstract {
this.a().addParticle(EnumParticle.SMOKE_NORMAL, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
this.a().addParticle(EnumParticle.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
if (this.spawnDelay > 0) {
@ -64,5 +64,5 @@ index 796b3e53f..ce1db632d 100644
}
--
2.12.2
2.13.4

View File

@ -1,4 +1,4 @@
From 0f4dbfcd170e17ed498637c063566c560264c8f6 Mon Sep 17 00:00:00 2001
From 95cd6fa26664fc8b84bf9eeab47e59d53ef5c627 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 22 Mar 2016 00:55:23 -0400
Subject: [PATCH] Don't teleport dead entities
@ -7,10 +7,10 @@ Had some issue with this in past, and this is the vanilla logic.
Potentially an old CB change that's no longer needed.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 58a882e27..9e0bceea9 100644
index 7e9dbf1a1..7912d05d9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2349,7 +2349,7 @@ public abstract class Entity implements ICommandListener {
@@ -2350,7 +2350,7 @@ public abstract class Entity implements ICommandListener {
}
public Entity teleportTo(Location exit, boolean portal) {
@ -20,5 +20,5 @@ index 58a882e27..9e0bceea9 100644
WorldServer worldserver1 = ((CraftWorld) exit.getWorld()).getHandle();
int i = worldserver1.dimension;
--
2.13.3.windows.1
2.13.4

View File

@ -1,4 +1,4 @@
From cc02e620cc6f56d0590582453284e3a608835d11 Mon Sep 17 00:00:00 2001
From 986ee69978fd3299dd886c2b1c048c903732356c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 22 May 2016 20:20:55 -0500
Subject: [PATCH] Optional TNT doesn't move in water
@ -32,7 +32,7 @@ index fbe769eb3..d2a542354 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 4a6c5ff73..73507cda8 100644
index 25641bafd..47872bf32 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1108,6 +1108,11 @@ public abstract class Entity implements ICommandListener {
@ -47,7 +47,7 @@ index 4a6c5ff73..73507cda8 100644
if (this.bJ() instanceof EntityBoat) {
this.inWater = false;
} else if (this.world.a(this.getBoundingBox().grow(0.0D, -0.4000000059604645D, 0.0D).shrink(0.001D), Material.WATER, this)) {
@@ -2537,6 +2542,11 @@ public abstract class Entity implements ICommandListener {
@@ -2538,6 +2543,11 @@ public abstract class Entity implements ICommandListener {
}
public boolean bo() {
@ -114,5 +114,5 @@ index bb0904f86..50811852a 100644
+ // Paper end
}
--
2.13.3.windows.1
2.13.4

View File

@ -1,11 +1,11 @@
From 24d3562e9c9d1ef311004213c532d73d08e6b175 Mon Sep 17 00:00:00 2001
From bc215bb3bae449d668c2a37c5739d6595919ec25 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 18 Jun 2017 18:17:05 -0500
Subject: [PATCH] Entity#fromMobSpawner()
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index ae3e38102..27c28cfb1 100644
index d744477c9..18eee4944 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -169,6 +169,7 @@ public abstract class Entity implements ICommandListener {
@ -37,10 +37,10 @@ index ae3e38102..27c28cfb1 100644
} catch (Throwable throwable) {
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index dd740276c..a5b5ef0ff 100644
index 0562c6e34..06b064a78 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -106,6 +106,7 @@ public abstract class MobSpawnerAbstract {
@@ -107,6 +107,7 @@ public abstract class MobSpawnerAbstract {
if (this.spawnData.b().d() == 1 && this.spawnData.b().hasKeyOfType("id", 8) && entity instanceof EntityInsentient) {
((EntityInsentient) entity).prepare(world.D(new BlockPosition(entity)), (GroupDataEntity) null);
}
@ -49,7 +49,7 @@ index dd740276c..a5b5ef0ff 100644
if ( entity.world.spigotConfig.nerfSpawnerMobs )
{
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 05f3df4e7..d23a72d66 100644
index 437c3da11..0ada29f4f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -788,5 +788,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
@ -64,5 +64,5 @@ index 05f3df4e7..d23a72d66 100644
// Paper end
}
--
2.13.3
2.13.4

View File

@ -1,24 +0,0 @@
From 8e93845e08efce37a5378c954743a983e142ff05 Mon Sep 17 00:00:00 2001
From: chickeneer <emcchickeneer@gmail.com>
Date: Mon, 7 Aug 2017 23:07:32 -0400
Subject: [PATCH] Fix Nether Portal Creation on cancelled event
Spigot is manipulating the Travel Agents canCreatePortal, but forgot to reset it on cancel
This causes nether portals to not be generated if the event is ever cancelled
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 34ac15d5e..190bda020 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2371,6 +2371,7 @@ public abstract class Entity implements ICommandListener {
event.useTravelAgent(useTravelAgent);
event.getEntity().getServer().getPluginManager().callEvent(event);
if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !this.isAlive()) {
+ agent.setCanCreatePortal(oldCanCreate); // Paper
return null;
}
exit = event.useTravelAgent() ? event.getPortalTravelAgent().findOrCreate(event.getTo()) : event.getTo();
--
2.13.0

View File

@ -1,14 +1,14 @@
From 92617e0faa93936b619afc70bcc11c9f3d5e395e Mon Sep 17 00:00:00 2001
From cf0ed1a251680f2dfc1a50bc98978a395dc910d8 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 31 Jul 2017 01:45:19 -0500
Subject: [PATCH] Reset spawner timer when spawner event is cancelled
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
index a5b5ef0f..b5c9c28a 100644
index 06b064a78..c29df55fa 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
@@ -112,6 +112,9 @@ public abstract class MobSpawnerAbstract {
@@ -113,6 +113,9 @@ public abstract class MobSpawnerAbstract {
{
entity.fromMobSpawner = true;
}
@ -18,7 +18,7 @@ index a5b5ef0f..b5c9c28a 100644
if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
continue;
}
@@ -122,7 +125,7 @@ public abstract class MobSpawnerAbstract {
@@ -123,7 +126,7 @@ public abstract class MobSpawnerAbstract {
entityinsentient.doSpawnEffect();
}
@ -28,5 +28,5 @@ index a5b5ef0f..b5c9c28a 100644
}
--
2.11.0
2.13.4

@ -1 +1 @@
Subproject commit e1f296d115cfd2c517413d122990033fc1eda78d
Subproject commit 27b8bf91169642a61f9cf888432cf018773d7df0