Update to Minecraft 1.15

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2019-12-11 09:00:00 +11:00
parent 1400103b2f
commit 0e142c7f03
293 changed files with 2875 additions and 2648 deletions

View File

@@ -1,28 +1,19 @@
--- a/net/minecraft/server/PersistentRaid.java
+++ b/net/minecraft/server/PersistentRaid.java
@@ -9,7 +9,7 @@
public class PersistentRaid extends PersistentBase {
- private final Map<Integer, Raid> a = Maps.newHashMap();
+ public final Map<Integer, Raid> a = Maps.newHashMap(); // PAIL rename raids, private -> public
private final WorldServer b;
private int c;
private int d;
@@ -92,19 +92,33 @@
boolean flag = false;
if (!raid.j()) {
if (!raid.isStarted()) {
+ /* CraftBukkit - moved down
if (!this.a.containsKey(raid.u())) {
this.a.put(raid.u(), raid);
if (!this.raids.containsKey(raid.getId())) {
this.raids.put(raid.getId(), raid);
}
+ */
flag = true;
- } else if (raid.m() < raid.l()) {
- } else if (raid.getBadOmenLevel() < raid.getMaxBadOmenLevel()) {
+ // CraftBukkit start - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished
+ } else if (raid.isInProgress() && raid.m() < raid.l()) {
+ } else if (raid.isInProgress() && raid.getBadOmenLevel() < raid.getMaxBadOmenLevel()) {
flag = true;
+ // CraftBukkit end
} else {
@@ -37,8 +28,8 @@
+ return null;
+ }
+
+ if (!this.a.containsKey(raid.u())) {
+ this.a.put(raid.u(), raid);
+ if (!this.raids.containsKey(raid.getId())) {
+ this.raids.put(raid.getId(), raid);
+ }
+ // CraftBukkit end
raid.a((EntityHuman) entityplayer);