more 1.14 stuffs yay!

This commit is contained in:
William Blake Galbreath 2019-05-05 06:12:32 -05:00
parent 997e1c2ad3
commit 9673aebba1
57 changed files with 363 additions and 390 deletions

View file

@ -1,4 +1,4 @@
From 83261d909e36f226f2043582f2bcadd3e89dd068 Mon Sep 17 00:00:00 2001 From ccfeb7d5bd45b718398cc2c8109b25b5a8a8af38 Mon Sep 17 00:00:00 2001
From: miclebrick <miclebrick@outlook.com> From: miclebrick <miclebrick@outlook.com>
Date: Thu, 23 Aug 2018 11:45:32 -0400 Date: Thu, 23 Aug 2018 11:45:32 -0400
Subject: [PATCH] Optimize CraftBlockData Creation Subject: [PATCH] Optimize CraftBlockData Creation

View file

@ -1,4 +1,4 @@
From 3d39c0e93184b77724106a9b6911d53179a61ce2 Mon Sep 17 00:00:00 2001 From 3465b81fb8e52e9e126ab9bb25eeaf5501b5db8b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 23 Aug 2018 09:25:30 -0500 Date: Thu, 23 Aug 2018 09:25:30 -0500
Subject: [PATCH] Fix MC-124320 Subject: [PATCH] Fix MC-124320

View file

@ -1,4 +1,4 @@
From ed723934e9e628f2d975d03730c391c2e27e3452 Mon Sep 17 00:00:00 2001 From b404af9e2429ef6ad5f66c1c700e280fa30682e2 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 08:18:42 -0500 Date: Fri, 24 Aug 2018 08:18:42 -0500
Subject: [PATCH] Slime Pathfinder Events Subject: [PATCH] Slime Pathfinder Events

View file

@ -1,4 +1,4 @@
From d7b2ad128b02dce9fcda0b35a8a76f01e2bc0614 Mon Sep 17 00:00:00 2001 From 813ce11240c5780bc34e1e1a80d7828848a138cb Mon Sep 17 00:00:00 2001
From: Byteflux <byte@byteflux.net> From: Byteflux <byte@byteflux.net>
Date: Wed, 8 Aug 2018 16:33:21 -0600 Date: Wed, 8 Aug 2018 16:33:21 -0600
Subject: [PATCH] Configurable speed for water flowing over lava Subject: [PATCH] Configurable speed for water flowing over lava

View file

@ -1,4 +1,4 @@
From feb037bcc438e450631048b1bb2d45785ecc9ea8 Mon Sep 17 00:00:00 2001 From 9fd5fca0c60c4f4a8db49680bedf51d26a9d46a5 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 26 Aug 2018 20:49:50 -0400 Date: Sun, 26 Aug 2018 20:49:50 -0400
Subject: [PATCH] Optimize RegistryMaterials Subject: [PATCH] Optimize RegistryMaterials

View file

@ -1,4 +1,4 @@
From 5ce2bea107f64d47592ed33ceddbfcc2b04ee2fc Mon Sep 17 00:00:00 2001 From 81def067fdd714521f4c34842ca8b5eadb860e0b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 25 Aug 2018 19:56:51 -0500 Date: Sat, 25 Aug 2018 19:56:51 -0500
Subject: [PATCH] Add PhantomPreSpawnEvent Subject: [PATCH] Add PhantomPreSpawnEvent

View file

@ -1,4 +1,4 @@
From da041de23ba213f90f6d7fe6b5c3eb49cb53ab16 Mon Sep 17 00:00:00 2001 From dce76a0f98ccdcd0159b2091497e3afba404a4ef Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 11:50:26 -0500 Date: Fri, 24 Aug 2018 11:50:26 -0500
Subject: [PATCH] Add More Creeper API Subject: [PATCH] Add More Creeper API

View file

@ -1,4 +1,4 @@
From 69a8e55d0ea65cb255d8a2a37b03596f352afeac Mon Sep 17 00:00:00 2001 From b4216d70077ebc9773c56edb7a5c0e3658c4c1e1 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 28 Aug 2018 23:04:15 -0400 Date: Tue, 28 Aug 2018 23:04:15 -0400
Subject: [PATCH] Inventory#removeItemAnySlot Subject: [PATCH] Inventory#removeItemAnySlot

View file

@ -1,4 +1,4 @@
From a54679a5585f693e6c222b3413ef1b5156892466 Mon Sep 17 00:00:00 2001 From 5ed707772fcd0f0522c260292194b869021bd93d Mon Sep 17 00:00:00 2001
From: Spottedleaf <Spottedleaf@users.noreply.github.com> From: Spottedleaf <Spottedleaf@users.noreply.github.com>
Date: Sun, 2 Sep 2018 19:34:33 -0700 Date: Sun, 2 Sep 2018 19:34:33 -0700
Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted

View file

@ -1,4 +1,4 @@
From 78b79db41419aab24fd685e01aa02dc7d9de02d4 Mon Sep 17 00:00:00 2001 From 3ea3ceaa9c5e78e04925ad8da3bad86657ea8c92 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 3 Sep 2018 18:20:03 -0500 Date: Mon, 3 Sep 2018 18:20:03 -0500
Subject: [PATCH] Add ray tracing methods to LivingEntity Subject: [PATCH] Add ray tracing methods to LivingEntity

View file

@ -1,4 +1,4 @@
From 2f9d171741fcd9eeaca82f3592ae2ea1dbf5a9c7 Mon Sep 17 00:00:00 2001 From 07d91651d9146cb2b0f7ec854170bdd189d206b3 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Tue, 4 Sep 2018 15:02:00 -0500 Date: Tue, 4 Sep 2018 15:02:00 -0500
Subject: [PATCH] Expose attack cooldown methods for Player Subject: [PATCH] Expose attack cooldown methods for Player

View file

@ -1,4 +1,4 @@
From 31b199c08aabc3bac1268a37ab726e9905d67f3c Mon Sep 17 00:00:00 2001 From 2ad1d2512ac6cb016cdd66e1523ea117e0665599 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv> From: Phoenix616 <mail@moep.tv>
Date: Tue, 21 Aug 2018 01:39:35 +0100 Date: Tue, 21 Aug 2018 01:39:35 +0100
Subject: [PATCH] Improve death events Subject: [PATCH] Improve death events
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
internal code. internal code.
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
index bbd5e2b2a8..19750ceed1 100644 index 20db76abd..a148cd437 100644
--- a/src/main/java/net/minecraft/server/CombatTracker.java --- a/src/main/java/net/minecraft/server/CombatTracker.java
+++ b/src/main/java/net/minecraft/server/CombatTracker.java +++ b/src/main/java/net/minecraft/server/CombatTracker.java
@@ -175,6 +175,7 @@ public class CombatTracker { @@ -175,6 +175,7 @@ public class CombatTracker {
@ -27,10 +27,10 @@ index bbd5e2b2a8..19750ceed1 100644
int i = this.f ? 300 : 100; int i = this.f ? 300 : 100;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 90e0d9d453..c4d4775627 100644 index 2dfa7d251..03e0e9e26 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1556,6 +1556,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1459,6 +1459,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return false; return false;
} }
@ -38,29 +38,21 @@ index 90e0d9d453..c4d4775627 100644
public void a(Entity entity, int i, DamageSource damagesource) { public void a(Entity entity, int i, DamageSource damagesource) {
if (entity instanceof EntityPlayer) { if (entity instanceof EntityPlayer) {
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource); CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
@@ -2408,6 +2409,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2340,6 +2341,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.fallDistance = 0.0F; this.fallDistance = 0.0F;
} }
+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER + public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER
public void b(EntityLiving entityliving) {} public void b(EntityLiving entityliving) {}
protected boolean i(double d0, double d1, double d2) { protected void i(double d0, double d1, double d2) {
@@ -3072,6 +3074,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return EnumPistonReaction.NORMAL;
}
+ public SoundCategory getDeathSoundCategory() { return bV();} // Paper - OBFHELPER
public SoundCategory bV() {
return SoundCategory.NEUTRAL;
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 2c54e3e34a..a5cc5e2842 100644 index 7031dd0e4..f6dc96434 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java --- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java +++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -659,7 +659,8 @@ public class EntityArmorStand extends EntityLiving { @@ -675,7 +675,8 @@ public class EntityArmorStand extends EntityLiving {
}
@Override
public void killEntity() { public void killEntity() {
- org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event - org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
+ org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable + org.bukkit.event.entity.EntityDeathEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event // Paper - make cancellable
@ -69,27 +61,28 @@ index 2c54e3e34a..a5cc5e2842 100644
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 6367fdd469..3d1cdd6271 100644 index 064703afe..bd8385cd5 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -76,14 +76,14 @@ public abstract class EntityLiving extends Entity { @@ -77,7 +77,7 @@ public abstract class EntityLiving extends Entity {
public float aU; public float aN;
public float aO;
public EntityHuman killer; public EntityHuman killer;
public int lastDamageByPlayerTime; // Paper - public - protected int lastDamageByPlayerTime;
- protected boolean killed; + public int lastDamageByPlayerTime; // Paper - public
+ protected boolean killed; protected void setDying(boolean dying) { this.killed = dying; } protected boolean isDying() { return this.killed; } // Paper - OBFHELPER protected boolean killed;
protected int ticksFarFromPlayer; protected int ticksFarFromPlayer;
protected float aZ; protected float aT;
protected float ba; @@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
protected float bb; protected float aV;
protected float bc; protected float aW;
protected float bd; protected float aX;
- protected int be; - protected int aY;
+ protected int be; protected int getKillCount() { return this.be; } // Paper - OBFHELPER + protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER
public float lastDamage; public float lastDamage;
protected boolean bg; protected boolean jumping;
public float bh; public float bb;
@@ -124,6 +124,7 @@ public abstract class EntityLiving extends Entity { @@ -128,6 +128,7 @@ public abstract class EntityLiving extends Entity {
public boolean collides = true; public boolean collides = true;
public boolean canPickUpLoot; public boolean canPickUpLoot;
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
@ -97,19 +90,19 @@ index 6367fdd469..3d1cdd6271 100644
@Override @Override
public float getBukkitYaw() { public float getBukkitYaw() {
@@ -1071,13 +1072,17 @@ public abstract class EntityLiving extends Entity { @@ -1179,13 +1180,17 @@ public abstract class EntityLiving extends Entity {
if (this.getHealth() <= 0.0F) { if (this.getHealth() <= 0.0F) {
if (!this.e(damagesource)) { if (!this.f(damagesource)) {
- SoundEffect soundeffect = this.cs(); - SoundEffect soundeffect = this.getSoundDeath();
+ // Paper start - moved into CraftEventFactory event caller for cancellable death event + // Paper start - moved into CraftEventFactory event caller for cancellable death event
+ //SoundEffect soundeffect = this.cs(); + //SoundEffect soundeffect = this.getSoundDeath();
- if (flag1 && soundeffect != null) { - if (flag1 && soundeffect != null) {
- this.a(soundeffect, this.cD(), this.cE()); - this.a(soundeffect, this.getSoundVolume(), this.cU());
- } - }
+ //if (flag1 && soundeffect != null) { + //if (flag1 && soundeffect != null) {
+ // this.a(soundeffect, this.cD(), this.cE()); + // this.a(soundeffect, this.getSoundVolume(), this.cU());
+ //} + //}
+ this.silentDeath = !flag1; // mark entity as dying silently + this.silentDeath = !flag1; // mark entity as dying silently
+ // Paper end + // Paper end
@ -119,97 +112,110 @@ index 6367fdd469..3d1cdd6271 100644
} }
} else if (flag1) { } else if (flag1) {
this.c(damagesource); this.c(damagesource);
@@ -1205,16 +1210,20 @@ public abstract class EntityLiving extends Entity { @@ -1323,22 +1328,40 @@ public abstract class EntityLiving extends Entity {
Entity entity = damagesource.getEntity(); Entity entity = damagesource.getEntity();
EntityLiving entityliving = this.cv(); EntityLiving entityliving = this.getKillingEntity();
- if (this.be >= 0 && entityliving != null) { - if (this.aY >= 0 && entityliving != null) {
- entityliving.a(this, this.be, damagesource); - entityliving.a(this, this.aY, damagesource);
- } - }
+ // Paper start - move down to make death event cancellable -
+ //if (this.be >= 0 && entityliving != null) {
+ // entityliving.a(this, this.be, damagesource);
+ //}
- if (entity != null) { - if (entity != null) {
- entity.b(this); - entity.b(this);
- } - }
-
- if (this.isSleeping()) {
- this.dy();
- }
-
+ // Paper start - move down to make death event cancellable
+ //if (this.aY >= 0 && entityliving != null) {
+ // entityliving.a(this, this.aY, damagesource);
+ //}
+ //
+ //if (entity != null) { + //if (entity != null) {
+ // entity.b(this); + // entity.b(this);
+ //} + //}
+ //
+ //if (this.isSleeping()) {
+ // this.dy();
+ //}
+ //
this.killed = true; this.killed = true;
- this.getCombatTracker().g(); - this.getCombatTracker().g();
+ //this.getCombatTracker().g(); + //this.getCombatTracker().g();
+
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null;
+ // Paper end
if (!this.world.isClientSide) { if (!this.world.isClientSide) {
int i = 0; - this.d(damagesource);
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = this.d(damagesource);
@@ -1227,15 +1236,33 @@ public abstract class EntityLiving extends Entity { + if (deathEvent == null || deathEvent.isCancelled()) {
+ if (this.getKillCount() >= 0 && entityliving != null) {
this.a(flag, i, damagesource); + entityliving.runKillTrigger(this, this.getKillCount(), damagesource);
// CraftBukkit start - Call death event + }
- CraftEventFactory.callEntityDeathEvent(this, this.drops); + if (entity != null) {
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper - cancellable death event + entity.onKill(this);
this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); + }
} else { + if (this.isSleeping()) {
- CraftEventFactory.callEntityDeathEvent(this); + this.dy();
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper - cancellable death event + }
// CraftBukkit end + this.getCombatTracker().reset();
} + } else {
} + this.killed = false;
+ this.setHealth((float) deathEvent.getReviveHealth());
- this.world.broadcastEntityEffect(this, (byte) 3);
+ // Paper start - cancellable death event
+ if (deathEvent == null || !deathEvent.isCancelled()) {
+ // triggers and stats got moved down
+ if (this.getKillCount() >= 0 && entityliving != null) {
+ entityliving.runKillTrigger(this, this.getKillCount(), damagesource);
+ } + }
+ // Paper end
+ +
+ if (entity != null) { boolean flag = false;
+ entity.onKill(this);
+ } if (entityliving instanceof EntityWither) {
+ @@ -1365,7 +1388,8 @@ public abstract class EntityLiving extends Entity {
+ this.getCombatTracker().reset();
+ this.setDying(true);
+ this.world.broadcastEntityEffect(this, (byte) 3);
+ } else {
+ this.setDying(false); // Paper - reset if cancelled
+ this.setHealth((float) deathEvent.getReviveHealth());
+ }
+ // Paper end
} }
} }
@@ -1289,6 +1316,7 @@ public abstract class EntityLiving extends Entity { - protected void d(DamageSource damagesource) {
return SoundEffects.ENTITY_GENERIC_HURT; + protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); }
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
Entity entity = damagesource.getEntity();
int i;
@@ -1376,19 +1400,20 @@ public abstract class EntityLiving extends Entity {
}
boolean flag = this.lastDamageByPlayerTime > 0;
-
+ org.bukkit.event.entity.EntityDeathEvent deathEvent = null; // Paper
if (this.isDropExperience() && this.world.getGameRules().getBoolean("doMobLoot")) {
this.a(damagesource, flag);
this.dropDeathLoot(damagesource, i, flag);
// CraftBukkit start - Call death event
- CraftEventFactory.callEntityDeathEvent(this, this.drops);
- this.drops = new ArrayList<org.bukkit.inventory.ItemStack>();
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this, this.drops); // Paper
+ if (!deathEvent.isCancelled()) this.drops = new ArrayList<org.bukkit.inventory.ItemStack>(); // Paper
} else {
- CraftEventFactory.callEntityDeathEvent(this);
+ deathEvent = CraftEventFactory.callEntityDeathEvent(this); // Paper
// CraftBukkit end
}
- this.cE();
+ if (!deathEvent.isCancelled()) this.cE(); // Paper
+ return deathEvent; // Paper
} }
+ @Nullable public SoundEffect getDeathSoundEffect() { return cs();} // Paper - OBFHELPER protected void cE() {}
@Nullable @@ -1895,6 +1920,7 @@ public abstract class EntityLiving extends Entity {
protected SoundEffect cs() {
return SoundEffects.ENTITY_GENERIC_DEATH;
@@ -1710,10 +1738,12 @@ public abstract class EntityLiving extends Entity {
}
+ public float getDeathSoundVolume() { return cD();} // Paper - OBFHELPER
protected float cD() {
return 1.0F; return 1.0F;
} }
+ public float getDeathSoundPitch() { return cE();} // Paper - OBFHELPER + public float getSoundPitch() { return cU();} // Paper - OBFHELPER
protected float cE() { protected float cU() {
return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F; return this.isBaby() ? (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.5F : (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F;
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index dc72538de6..62feadc8af 100644 index 634c30d93..332515128 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -72,6 +72,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -74,6 +74,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
public int ping; public int ping;
public boolean viewingCredits; public boolean viewingCredits;
private int containerUpdateDelay; // Paper private int containerUpdateDelay; // Paper
@ -220,7 +226,7 @@ index dc72538de6..62feadc8af 100644
// CraftBukkit start // CraftBukkit start
public String displayName; public String displayName;
@@ -506,6 +510,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -524,6 +528,15 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
String deathmessage = defaultMessage.getString(); String deathmessage = defaultMessage.getString();
org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory); org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, loot, deathmessage, keepInventory);
@ -236,7 +242,7 @@ index dc72538de6..62feadc8af 100644
// SPIGOT-943 - only call if they have an inventory open // SPIGOT-943 - only call if they have an inventory open
if (this.activeContainer != this.defaultContainer) { if (this.activeContainer != this.defaultContainer) {
@@ -638,8 +651,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -677,8 +690,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} }
} }
} }
@ -257,10 +263,10 @@ index dc72538de6..62feadc8af 100644
} }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 17fab031b4..ee8219e3ba 100644 index 73cb64e09..9f317ff2e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java --- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -674,6 +674,22 @@ public enum CraftSound { @@ -806,6 +806,22 @@ public enum CraftSound {
WEATHER_RAIN_ABOVE("weather.rain.above"); WEATHER_RAIN_ABOVE("weather.rain.above");
private final String minecraftKey; private final String minecraftKey;
@ -284,10 +290,10 @@ index 17fab031b4..ee8219e3ba 100644
this.minecraftKey = minecraftKey; this.minecraftKey = minecraftKey;
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 7a918ea72f..8d32982c53 100644 index d505af188..5f752784d 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1691,7 +1691,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -1711,7 +1711,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void sendHealthUpdate() { public void sendHealthUpdate() {
@ -305,10 +311,10 @@ index 7a918ea72f..8d32982c53 100644
public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) { public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index e76862ef49..68e30185a2 100644 index 50444ed94..46c05c398 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -600,9 +600,16 @@ public class CraftEventFactory { @@ -706,9 +706,16 @@ public class CraftEventFactory {
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) { public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity(); CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward()); EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
@ -325,7 +331,7 @@ index e76862ef49..68e30185a2 100644
victim.expToDrop = event.getDroppedExp(); victim.expToDrop = event.getDroppedExp();
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) { for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
@@ -618,8 +625,15 @@ public class CraftEventFactory { @@ -724,8 +731,15 @@ public class CraftEventFactory {
CraftPlayer entity = victim.getBukkitEntity(); CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage); PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory); event.setKeepInventory(keepInventory);
@ -341,7 +347,7 @@ index e76862ef49..68e30185a2 100644
victim.keepLevel = event.getKeepLevel(); victim.keepLevel = event.getKeepLevel();
victim.newLevel = event.getNewLevel(); victim.newLevel = event.getNewLevel();
@@ -640,6 +654,31 @@ public class CraftEventFactory { @@ -746,6 +760,31 @@ public class CraftEventFactory {
return event; return event;
} }
@ -374,5 +380,5 @@ index e76862ef49..68e30185a2 100644
* Server methods * Server methods
*/ */
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From d3120098ca824fcf3a86efcd2601976b301f06f8 Mon Sep 17 00:00:00 2001 From 2434b85e839291d0b8e8a41c0455a1f1eaf62131 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 8 Sep 2018 18:43:31 -0500 Date: Sat, 8 Sep 2018 18:43:31 -0500
Subject: [PATCH] Allow chests to be placed with NBT data Subject: [PATCH] Allow chests to be placed with NBT data

View file

@ -1,4 +1,4 @@
From ef8f04a7d876a0e7d3c2d86f7e37b83c0ea49347 Mon Sep 17 00:00:00 2001 From 6645468cad7fa72316b3525dd7b8a65085317dac Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 9 Sep 2018 13:30:00 -0400 Date: Sun, 9 Sep 2018 13:30:00 -0400
Subject: [PATCH] Mob Pathfinding API Subject: [PATCH] Mob Pathfinding API

View file

@ -1,4 +1,4 @@
From 1cef982ae001f8da273de56a99ce6c1ef3d1de9a Mon Sep 17 00:00:00 2001 From 4a85a3d33ce494a5f747f19e585b173cb466b892 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 10 Sep 2018 23:36:16 -0400 Date: Mon, 10 Sep 2018 23:36:16 -0400
Subject: [PATCH] Prevent chunk loading from Fluid Flowing Subject: [PATCH] Prevent chunk loading from Fluid Flowing

View file

@ -1,4 +1,4 @@
From 7e60246a15e8dadda0eaf8c2e4ea5cbb8ee01492 Mon Sep 17 00:00:00 2001 From 9e027a8f92c1ba05ac21926a6abccceffd528577 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu> From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:55 +0300 Date: Wed, 12 Sep 2018 18:53:55 +0300
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values

View file

@ -1,4 +1,4 @@
From e8030d939fc374bbef44bb68ebcaed841c330a7a Mon Sep 17 00:00:00 2001 From 161ab7a647cd41cd92bbcac2f1ced445043771a2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 10 Sep 2018 23:56:36 -0400 Date: Mon, 10 Sep 2018 23:56:36 -0400
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks

View file

@ -1,4 +1,4 @@
From e84f9798c9de10f7cd0fc3c479c72a6bfbec6b0d Mon Sep 17 00:00:00 2001 From 51e5d0ca514e9ffc7f247926a95b6b14d263fbda Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 12 Sep 2018 21:12:57 -0400 Date: Wed, 12 Sep 2018 21:12:57 -0400
Subject: [PATCH] Prevent mob spawning from loading/generating chunks Subject: [PATCH] Prevent mob spawning from loading/generating chunks

View file

@ -1,4 +1,4 @@
From 8d39347a9a9836d2df429831bee64bc016e97c67 Mon Sep 17 00:00:00 2001 From 1f668d899ae49687568d601970c078165abaf3a7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 12 Sep 2018 21:47:01 -0400 Date: Wed, 12 Sep 2018 21:47:01 -0400
Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning

View file

@ -1,4 +1,4 @@
From 79869c22b965698c17bf620cf92b889c075ed027 Mon Sep 17 00:00:00 2001 From cc661371925e5db06d8e2ec448589b026158e786 Mon Sep 17 00:00:00 2001
From: Tassu <git@tassu.me> From: Tassu <git@tassu.me>
Date: Thu, 13 Sep 2018 08:45:21 +0300 Date: Thu, 13 Sep 2018 08:45:21 +0300
Subject: [PATCH] Implement furnace cook speed multiplier API Subject: [PATCH] Implement furnace cook speed multiplier API

View file

@ -1,4 +1,4 @@
From 0a6de7867ec114749ff0cfd6c3c49dcfb14417d5 Mon Sep 17 00:00:00 2001 From 9dc7c60b583e36eca521c9b2f2249d02757527e7 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 17 Sep 2018 23:05:31 -0400 Date: Mon, 17 Sep 2018 23:05:31 -0400
Subject: [PATCH] Support Overriding World Seeds Subject: [PATCH] Support Overriding World Seeds

View file

@ -1,4 +1,4 @@
From cf834d2b80d762e0229edf91987ea48e58767e7e Mon Sep 17 00:00:00 2001 From 671fc3ee15d2bc2981d459dbd9102019854cf27f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Mon, 17 Sep 2018 23:37:31 -0400 Date: Mon, 17 Sep 2018 23:37:31 -0400
Subject: [PATCH] Optimize Server World Map Subject: [PATCH] Optimize Server World Map

View file

@ -1,4 +1,4 @@
From 95706a134f6565e2758e639b360ecfcd7ac9945c Mon Sep 17 00:00:00 2001 From 35d7db6066c6959469ddd243c50a11c095ee7460 Mon Sep 17 00:00:00 2001
From: Phoenix616 <mail@moep.tv> From: Phoenix616 <mail@moep.tv>
Date: Tue, 18 Sep 2018 23:53:23 +0100 Date: Tue, 18 Sep 2018 23:53:23 +0100
Subject: [PATCH] PreSpawnerSpawnEvent Subject: [PATCH] PreSpawnerSpawnEvent

View file

@ -1,4 +1,4 @@
From 51378c11a77da24269914f4f1e15d0905b672b82 Mon Sep 17 00:00:00 2001 From e5eeb481db23231a6285d2c5a467ed942ab37753 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com> From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 22 Sep 2018 15:56:59 -0400 Date: Sat, 22 Sep 2018 15:56:59 -0400
Subject: [PATCH] Catch JsonParseException in Entity and TE names Subject: [PATCH] Catch JsonParseException in Entity and TE names
@ -26,10 +26,10 @@ index 4b7aefb7a..9e568d5d1 100644
if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) { if (nbttagcompound.hasKeyOfType("TrackOutput", 1)) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 2dfa7d251..98d798abd 100644 index 03e0e9e26..c9aa5ae16 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1637,7 +1637,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1638,7 +1638,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.setPosition(this.locX, this.locY, this.locZ); this.setPosition(this.locX, this.locY, this.locZ);
this.setYawPitch(this.yaw, this.pitch); this.setYawPitch(this.yaw, this.pitch);
if (nbttagcompound.hasKeyOfType("CustomName", 8)) { if (nbttagcompound.hasKeyOfType("CustomName", 8)) {

View file

@ -1,4 +1,4 @@
From 2f0f3c789fb42c5ef1b904b0c38919741006640d Mon Sep 17 00:00:00 2001 From 6f94b19a248156022f89d6c5f31cf44c3320db79 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de> From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 25 Sep 2018 06:53:43 +0200 Date: Tue, 25 Sep 2018 06:53:43 +0200
Subject: [PATCH] Avoid dimension id collisions Subject: [PATCH] Avoid dimension id collisions

View file

@ -1,4 +1,4 @@
From 8c7a2d6f219fe6cca184f0cb9f363ca5e02980b5 Mon Sep 17 00:00:00 2001 From 896d92d0fd299a8a6ddd9dfb2c30e100b259e696 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 23 Sep 2018 20:59:53 -0500 Date: Sun, 23 Sep 2018 20:59:53 -0500
Subject: [PATCH] Honor EntityAgeable.ageLock Subject: [PATCH] Honor EntityAgeable.ageLock

View file

@ -1,4 +1,4 @@
From 26828dd84bae00ca74903c8233623d9e19455a23 Mon Sep 17 00:00:00 2001 From 33dac55b42040a29364c8c5662d3faa1173995b6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 27 Sep 2018 00:08:31 -0400 Date: Thu, 27 Sep 2018 00:08:31 -0400
Subject: [PATCH] Ignore Dimension NBT field in Entity data Subject: [PATCH] Ignore Dimension NBT field in Entity data
@ -14,10 +14,10 @@ DimensionManager set to the world it is being placed into.
This fixes corrupt entities breaking chunk saving in custom worlds. This fixes corrupt entities breaking chunk saving in custom worlds.
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 98d798abd..f5625fca3 100644 index c9aa5ae16..464e1d2d9 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1622,7 +1622,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1623,7 +1623,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.setAirTicks(nbttagcompound.getShort("Air")); this.setAirTicks(nbttagcompound.getShort("Air"));
this.onGround = nbttagcompound.getBoolean("OnGround"); this.onGround = nbttagcompound.getBoolean("OnGround");
if (nbttagcompound.hasKey("Dimension")) { if (nbttagcompound.hasKey("Dimension")) {

View file

@ -1,4 +1,4 @@
From 353301bbd8a11960f5b06ffa3eec29bb13b13795 Mon Sep 17 00:00:00 2001 From 4d4c344c62dfec481ac95bfa8bd8cc4eed268968 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 22:27:33 -0400 Date: Fri, 28 Sep 2018 22:27:33 -0400
Subject: [PATCH] Don't recheck type after setting a block Subject: [PATCH] Don't recheck type after setting a block

View file

@ -1,4 +1,4 @@
From b5948f0b7250322cb54dab6aff82ad1c55a8d779 Mon Sep 17 00:00:00 2001 From d7b7b457072fcdc2039703724fed4d51d6f1e032 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Tue, 2 Oct 2018 09:57:50 +0100 Date: Tue, 2 Oct 2018 09:57:50 +0100
Subject: [PATCH] Configurable connection throttle kick message Subject: [PATCH] Configurable connection throttle kick message

View file

@ -1,4 +1,4 @@
From bfbc1f427e79c169269872707cfea2b275a88483 Mon Sep 17 00:00:00 2001 From 7b3e2236c1a1703ead6a034951603590fdb0eb4b Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io> From: Zach Brown <zach@zachbr.io>
Date: Wed, 3 Oct 2018 20:09:18 -0400 Date: Wed, 3 Oct 2018 20:09:18 -0400
Subject: [PATCH] Hook into CB plugin rewrites Subject: [PATCH] Hook into CB plugin rewrites

View file

@ -1,4 +1,4 @@
From 4f0debfaae841ff5458c87e8c16808c54d1ece2e Mon Sep 17 00:00:00 2001 From d937237c3e6b37fb71749d0648e38acd8cd15c13 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 6 Oct 2018 21:47:44 -0500 Date: Sat, 6 Oct 2018 21:47:44 -0500
Subject: [PATCH] Allow setting the vex's summoner Subject: [PATCH] Allow setting the vex's summoner

View file

@ -1,4 +1,4 @@
From 783671ae5df4a62f75c3662231e8e8f473c1594c Mon Sep 17 00:00:00 2001 From b588ba389f00390b2f1972896804aeea504d07a7 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 00:54:21 -0500 Date: Sun, 7 Oct 2018 00:54:21 -0500
Subject: [PATCH] Add sun related API Subject: [PATCH] Add sun related API

View file

@ -1,4 +1,4 @@
From 60e5273939e2db036b46509e51a97f05f7025e61 Mon Sep 17 00:00:00 2001 From d79f4a77c0c8fab17a1565c668a1f54cb7b1e924 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Wed, 10 Oct 2018 21:22:44 -0500 Date: Wed, 10 Oct 2018 21:22:44 -0500
Subject: [PATCH] Check Drowned for Villager Aggression Config Subject: [PATCH] Check Drowned for Villager Aggression Config

View file

@ -1,4 +1,4 @@
From 28e15116850717bceba1cd078a32c6519ea3935c Mon Sep 17 00:00:00 2001 From b59ff4e2634c197677db8abddd8a88ec9aee3216 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 01:37:22 -0500 Date: Fri, 12 Oct 2018 01:37:22 -0500
Subject: [PATCH] Here's Johnny! Subject: [PATCH] Here's Johnny!

View file

@ -1,4 +1,4 @@
From f545c659cc4dd700d009f0912c5dc71962c930d4 Mon Sep 17 00:00:00 2001 From 8ca9aa840baa8b73a690492a4e7f8eabbd84459e Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 29 Sep 2018 16:08:23 -0500 Date: Sat, 29 Sep 2018 16:08:23 -0500
Subject: [PATCH] Turtle API Subject: [PATCH] Turtle API

View file

@ -1,4 +1,4 @@
From e448b41d1488e3cff3b4bcda8c2d035cabafe69c Mon Sep 17 00:00:00 2001 From 29e5e87a0972c9cc533998e6e29763b68a59ca90 Mon Sep 17 00:00:00 2001
From: Trigary <trigary0@gmail.com> From: Trigary <trigary0@gmail.com>
Date: Fri, 14 Sep 2018 17:42:08 +0200 Date: Fri, 14 Sep 2018 17:42:08 +0200
Subject: [PATCH] Limit lightning strike effect distance Subject: [PATCH] Limit lightning strike effect distance

View file

@ -1,4 +1,4 @@
From 6a7b1343bfcd0709f7f0a4ba2e6870809c55a138 Mon Sep 17 00:00:00 2001 From b531670a0b37bb42392bcde1581b8d327d017e57 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Wed, 17 Oct 2018 19:17:27 -0400 Date: Wed, 17 Oct 2018 19:17:27 -0400
Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles

View file

@ -1,11 +1,11 @@
From 0c13726aeda1ae50653ac107789455a2a9803a5c Mon Sep 17 00:00:00 2001 From 04b270bf65e102f17b5caed5f4559b0d71b33dac Mon Sep 17 00:00:00 2001
From: Caleb Bassham <caleb.bassham@gmail.com> From: Caleb Bassham <caleb.bassham@gmail.com>
Date: Fri, 28 Sep 2018 02:32:19 -0500 Date: Fri, 28 Sep 2018 02:32:19 -0500
Subject: [PATCH] Call player spectator target events Subject: [PATCH] Call player spectator target events
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 634c30d93..d34daafda 100644 index 332515128..8d18c51c9 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -59,7 +59,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -17,7 +17,7 @@ index 634c30d93..d34daafda 100644
public boolean worldChangeInvuln; public boolean worldChangeInvuln;
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
private final RecipeBookServer recipeBook; private final RecipeBookServer recipeBook;
@@ -1525,15 +1525,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1547,15 +1547,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity); return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
} }

View file

@ -1,4 +1,4 @@
From 98329c0298e555bd0b4bc87f00ac49c7bc210d85 Mon Sep 17 00:00:00 2001 From 8b7d846baf05001d3dc4f47696a5bfad03ffb815 Mon Sep 17 00:00:00 2001
From: Andrew Steinborn <git@steinborn.me> From: Andrew Steinborn <git@steinborn.me>
Date: Mon, 8 Oct 2018 14:36:14 -0400 Date: Mon, 8 Oct 2018 14:36:14 -0400
Subject: [PATCH] Add Velocity IP Forwarding Support Subject: [PATCH] Add Velocity IP Forwarding Support

View file

@ -1,4 +1,4 @@
From 00346e25360ac12c7efe575695f6781ef3f9af20 Mon Sep 17 00:00:00 2001 From 81f186827ee2be062515c87b8479ee7c0b3f815b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 12 Oct 2018 14:10:46 -0500 Date: Fri, 12 Oct 2018 14:10:46 -0500
Subject: [PATCH] Add more Witch API Subject: [PATCH] Add more Witch API

View file

@ -1,4 +1,4 @@
From 86e08f09cb0cd4d89a438048bff83a1af9fe398b Mon Sep 17 00:00:00 2001 From 9e908a08ca6718a04ffe3655804b6458527b8ce4 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 19 Oct 2018 19:38:45 -0500 Date: Fri, 19 Oct 2018 19:38:45 -0500
Subject: [PATCH] Fix MC-93764 Subject: [PATCH] Fix MC-93764

View file

@ -1,4 +1,4 @@
From 92cb3409be8524f1e5684352cd18fc5737491707 Mon Sep 17 00:00:00 2001 From 6a3e3c116ef3c503203adc5a18c85c637f57729c Mon Sep 17 00:00:00 2001
From: Gabriele C <sgdc3.mail@gmail.com> From: Gabriele C <sgdc3.mail@gmail.com>
Date: Mon, 22 Oct 2018 17:34:10 +0200 Date: Mon, 22 Oct 2018 17:34:10 +0200
Subject: [PATCH] Add option to prevent players from moving into unloaded Subject: [PATCH] Add option to prevent players from moving into unloaded
@ -6,12 +6,12 @@ Subject: [PATCH] Add option to prevent players from moving into unloaded
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 2a912286b2..61ad2cef7b 100644 index fb44fccc9..ad793ffa3 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -583,4 +583,9 @@ public class PaperWorldConfig { @@ -434,4 +434,9 @@ public class PaperWorldConfig {
replacementBlocks = getList("anti-xray.replacement-blocks", Arrays.asList("stone", "planks")); this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
log("Anti-Xray: " + (antiXray ? "enabled" : "disabled") + " / Engine Mode: " + engineMode.getDescription() + " / Chunk Edge Mode: " + chunkEdgeMode.getDescription() + " / Up to " + ((maxChunkSectionIndex + 1) * 16) + " blocks / Update Radius: " + updateRadius); log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
} }
+ +
+ public boolean preventMovingIntoUnloadedChunks = false; + public boolean preventMovingIntoUnloadedChunks = false;
@ -20,24 +20,24 @@ index 2a912286b2..61ad2cef7b 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 9a96078004..4705dd2c68 100644 index e59037211..16a7aba49 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -341,6 +341,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -348,6 +348,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
} }
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
+ // Paper start - Prevent moving into unloaded chunks + // Paper start - Prevent moving into unloaded chunks
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4, false)) { + if (player.world.paperConfig.preventMovingIntoUnloadedChunks && !worldserver.isChunkLoaded((int) Math.floor(packetplayinvehiclemove.getX()) >> 4, (int) Math.floor(packetplayinvehiclemove.getZ()) >> 4)) {
+ this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity)); + this.networkManager.sendPacket(new PacketPlayOutVehicleMove(entity));
+ return; + return;
+ } + }
+ // Paper end + // Paper end
+ +
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) { if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
// CraftBukkit end // CraftBukkit end
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8); PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
@@ -849,9 +856,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -889,9 +896,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
double d1 = this.player.locY; double d1 = this.player.locY;
double d2 = this.player.locZ; double d2 = this.player.locZ;
double d3 = this.player.locY; double d3 = this.player.locY;
@ -49,20 +49,20 @@ index 9a96078004..4705dd2c68 100644
float f = packetplayinflying.a(this.player.yaw); float f = packetplayinflying.a(this.player.yaw);
float f1 = packetplayinflying.b(this.player.pitch); float f1 = packetplayinflying.b(this.player.pitch);
double d7 = d4 - this.l; double d7 = d4 - this.l;
@@ -891,6 +898,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -931,6 +938,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
speed = player.abilities.walkSpeed * 10f; speed = player.abilities.walkSpeed * 10f;
} }
+ // Paper start - Prevent moving into unloaded chunks + // Paper start - Prevent moving into unloaded chunks
+ if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4, false)) { + if (player.world.paperConfig.preventMovingIntoUnloadedChunks && (this.player.locX != toX || this.player.locZ != toZ) && !worldserver.isChunkLoaded((int) Math.floor(toX) >> 4, (int) Math.floor(toZ) >> 4)) {
+ this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet()); + this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet());
+ return; + return;
+ } + }
+ // Paper end + // Paper end
+ +
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.dc())) { if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean("disableElytraMovementCheck") || !this.player.isGliding())) {
float f2 = this.player.dc() ? 300.0F : 100.0F; float f2 = this.player.isGliding() ? 300.0F : 100.0F;
-- --
2.21.0 2.20.1

View file

@ -1,27 +1,27 @@
From 80169c2065257040205b6544a51cdb3975c14bdb Mon Sep 17 00:00:00 2001 From ff8fcdaf3f1adc48192221444997caa6ec33574c Mon Sep 17 00:00:00 2001
From: GreenMeanie <GreenMeanieMC@gmail.com> From: GreenMeanie <GreenMeanieMC@gmail.com>
Date: Sat, 20 Oct 2018 22:34:02 -0400 Date: Sat, 20 Oct 2018 22:34:02 -0400
Subject: [PATCH] Reset players airTicks on respawn Subject: [PATCH] Reset players airTicks on respawn
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index de45e3c7a8..f745ed8fee 100644 index 464e1d2d9..4bdeba399 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2335,7 +2335,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2253,7 +2253,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
- public int bf() { - public int bo() {
+ public int getMaxAirTicks() { return bf(); } public int bf() { // Paper - OBF HELPER + public int getMaxAirTicks() { return bo(); } public int bo() {
return 300; return 300;
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index f1b7353cf8..5b1bbc7724 100644 index 8d18c51c9..c71e4dfbe 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1633,6 +1633,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -1835,6 +1835,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} }
this.setHealth(this.getMaxHealth()); this.setHealth(this.getMaxHealth());
@ -30,5 +30,5 @@ index f1b7353cf8..5b1bbc7724 100644
this.fallDistance = 0; this.fallDistance = 0;
this.foodData = new FoodMetaData(this); this.foodData = new FoodMetaData(this);
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 9cf28103bd677d93deb8ea8a0adf3c095a6e3b73 Mon Sep 17 00:00:00 2001 From ed6837e75e4cd01666c7a616ef7e2dd087dc6536 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach@zachbr.io> From: Zach Brown <zach@zachbr.io>
Date: Tue, 23 Oct 2018 20:53:43 -0400 Date: Tue, 23 Oct 2018 20:53:43 -0400
Subject: [PATCH] Strip private area unicode characters from signs Subject: [PATCH] Strip private area unicode characters from signs
@ -20,12 +20,12 @@ think of no reason to use it.
Fixes GH-1571 Fixes GH-1571
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
index 458d1561d0..c2bcbbbab9 100644 index 9de03a24c..4165c6d11 100644
--- a/src/main/java/net/minecraft/server/TileEntitySign.java --- a/src/main/java/net/minecraft/server/TileEntitySign.java
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java +++ b/src/main/java/net/minecraft/server/TileEntitySign.java
@@ -11,6 +11,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -14,6 +14,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
private EntityHuman g; private final String[] k = new String[4];
private final String[] h = new String[4]; private EnumColor l;
+ // Paper start - Strip invalid unicode from signs on load + // Paper start - Strip invalid unicode from signs on load
+ private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it + private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it
@ -34,11 +34,12 @@ index 458d1561d0..c2bcbbbab9 100644
+ +
public TileEntitySign() { public TileEntitySign() {
super(TileEntityTypes.SIGN); super(TileEntityTypes.SIGN);
} this.l = EnumColor.BLACK;
@@ -30,6 +35,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -36,6 +41,13 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
}
// CraftBukkit end // CraftBukkit end
nbttagcompound.setString("Color", this.l.b());
+
+ // Paper start - Only remove private area unicode once + // Paper start - Only remove private area unicode once
+ if (this.privateUnicodeRemoved) { + if (this.privateUnicodeRemoved) {
+ nbttagcompound.setBoolean("Paper.RemovedPrivateUnicode", true); + nbttagcompound.setBoolean("Paper.RemovedPrivateUnicode", true);
@ -48,9 +49,9 @@ index 458d1561d0..c2bcbbbab9 100644
return nbttagcompound; return nbttagcompound;
} }
@@ -37,6 +48,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -45,6 +57,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
this.isEditable = false;
super.load(nbttagcompound); super.load(nbttagcompound);
this.l = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK);
+ // Paper start - Keep track, only do it once per sign + // Paper start - Keep track, only do it once per sign
+ this.privateUnicodeRemoved = nbttagcompound.getBoolean("Paper.RemovedPrivateUnicode"); + this.privateUnicodeRemoved = nbttagcompound.getBoolean("Paper.RemovedPrivateUnicode");
@ -60,7 +61,7 @@ index 458d1561d0..c2bcbbbab9 100644
// CraftBukkit start - Add an option to convert signs correctly // CraftBukkit start - Add an option to convert signs correctly
// This is done with a flag instead of all the time because // This is done with a flag instead of all the time because
// we have no way to tell whether a sign is from 1.7.10 or 1.8 // we have no way to tell whether a sign is from 1.7.10 or 1.8
@@ -49,6 +65,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -57,6 +74,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
s = "\"\""; s = "\"\"";
} }
@ -80,8 +81,8 @@ index 458d1561d0..c2bcbbbab9 100644
try { try {
//IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error //IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s); // Paper - move down - the old format might throw a json error
@@ -75,6 +104,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { @@ -83,6 +113,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
this.h[i] = null; this.k[i] = null;
} }
+ if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT + if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT
@ -89,5 +90,5 @@ index 458d1561d0..c2bcbbbab9 100644
public void a(int i, IChatBaseComponent ichatbasecomponent) { public void a(int i, IChatBaseComponent ichatbasecomponent) {
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 36a9e372200a64be4ebbc59acf474aa3e4ac0eff Mon Sep 17 00:00:00 2001 From 3cfdf00b7cfe3250bc84a34afffaebe84929043e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 23 Oct 2018 20:25:05 -0400 Date: Tue, 23 Oct 2018 20:25:05 -0400
Subject: [PATCH] Don't sleep after profile lookups if not needed Subject: [PATCH] Don't sleep after profile lookups if not needed
@ -7,7 +7,7 @@ Mojang was sleeping even if we had no more requests to go after
the current one finished, resulting in 100ms lost per profile lookup the current one finished, resulting in 100ms lost per profile lookup
diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java diff --git a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
index 71e48e87b4..23f1447cfc 100644 index 71e48e87b..23f1447cf 100644
--- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java --- a/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
+++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java +++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
@@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository { @@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository {
@ -32,5 +32,5 @@ index 71e48e87b4..23f1447cfc 100644
try { try {
Thread.sleep(DELAY_BETWEEN_PAGES); Thread.sleep(DELAY_BETWEEN_PAGES);
-- --
2.21.0 2.20.1

View file

@ -1,22 +1,22 @@
From 1a60b5dbb30c2608e2af7833c00aa29dbb141e20 Mon Sep 17 00:00:00 2001 From 47c19a59b47215cd29d1789020aa626fa841c681 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Tue, 23 Oct 2018 23:14:38 -0400 Date: Tue, 23 Oct 2018 23:14:38 -0400
Subject: [PATCH] Use more reasonable thread count default for bootstrap Subject: [PATCH] Use more reasonable thread count default for bootstrap
diff --git a/src/main/java/net/minecraft/server/DataConverterRegistry.java b/src/main/java/net/minecraft/server/DataConverterRegistry.java diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
index ee40bccf63..db9af361d6 100644 index 706040212..d5d8f7eb8 100644
--- a/src/main/java/net/minecraft/server/DataConverterRegistry.java --- a/src/main/java/net/minecraft/server/SystemUtils.java
+++ b/src/main/java/net/minecraft/server/DataConverterRegistry.java +++ b/src/main/java/net/minecraft/server/SystemUtils.java
@@ -21,7 +21,7 @@ public class DataConverterRegistry { @@ -66,7 +66,7 @@ public class SystemUtils {
}
a(datafixerbuilder); private static ExecutorService k() {
// CraftBukkit start - int i = MathHelper.clamp(Runtime.getRuntime().availableProcessors() - 1, 1, 7);
- ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(Runtime.getRuntime().availableProcessors(), 2))); + int i = Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads
+ ForkJoinPool pool = new ForkJoinPool(Integer.getInteger("net.minecraft.server.DataConverterRegistry.bootstrapThreads", Math.min(6, Math.max(Runtime.getRuntime().availableProcessors() - 2, 2)))); // Paper - use more reasonable default - 2 is hard minimum to avoid using unlimited threads Object object;
DataFixer fixer = datafixerbuilder.build(pool);
pool.shutdown(); if (i <= 0) {
return fixer;
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 20db885a920ddae1dc283c0c906b2b226739ae89 Mon Sep 17 00:00:00 2001 From d158145e22e63dcaf1eec50e93de0a9a8b81f2b3 Mon Sep 17 00:00:00 2001
From: MisterVector <whizkid3000@hotmail.com> From: MisterVector <whizkid3000@hotmail.com>
Date: Thu, 1 Nov 2018 14:50:05 -0700 Date: Thu, 1 Nov 2018 14:50:05 -0700
Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block
@ -13,10 +13,10 @@ keep the clone of the item used to a non empty value so it represents
the item used. the item used.
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index 22378b6bc8..5e595b62e5 100644 index f692da609..5bc8bd7cd 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java --- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java +++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -380,10 +380,11 @@ public class PlayerInteractManager { @@ -354,10 +354,11 @@ public class PlayerInteractManager {
ItemStack itemstack1 = this.player.getItemInMainHand(); ItemStack itemstack1 = this.player.getItemInMainHand();
boolean flag1 = this.player.hasBlock(iblockdata); boolean flag1 = this.player.hasBlock(iblockdata);
@ -30,5 +30,5 @@ index 22378b6bc8..5e595b62e5 100644
iblockdata.getBlock().a(this.world, this.player, blockposition, iblockdata, tileentity, itemstack2); iblockdata.getBlock().a(this.world, this.player, blockposition, iblockdata, tileentity, itemstack2);
} }
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 42871ad2d0b7b9bd4d5ecfafc8b03e532384ff11 Mon Sep 17 00:00:00 2001 From 5cf3baddf895999083a82dc77734d0298d5d542a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 2 Nov 2018 23:11:51 -0400 Date: Fri, 2 Nov 2018 23:11:51 -0400
Subject: [PATCH] Optimize World Time Updates Subject: [PATCH] Optimize World Time Updates
@ -8,12 +8,12 @@ the updates per world, so that we can re-use the same packet
object for every player unless they have per-player time enabled. object for every player unless they have per-player time enabled.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 236fbafeb5..ce39ea09e8 100644 index e6054dddb..e90cf0629 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1033,12 +1033,24 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati @@ -1101,12 +1101,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
// Send time updates to everyone, it will get the right time from the world the player is in. // Send time updates to everyone, it will get the right time from the world the player is in.
- if (this.ticks % 20 == 0) { - if (this.ticks % 20 == 0) {
- for (int i = 0; i < this.getPlayerList().players.size(); ++i) { - for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
@ -25,7 +25,7 @@ index 236fbafeb5..ce39ea09e8 100644
+ final long dayTime = world.getDayTime(); + final long dayTime = world.getDayTime();
+ long worldTime = world.getTime(); + long worldTime = world.getTime();
+ final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight); + final PacketPlayOutUpdateTime worldPacket = new PacketPlayOutUpdateTime(worldTime, dayTime, doDaylight);
+ for (EntityHuman entityhuman : world.players) { + for (EntityHuman entityhuman : world.getPlayers()) {
+ if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) { + if (!(entityhuman instanceof EntityPlayer) || (ticks + entityhuman.getId()) % 20 != 0) {
+ continue; + continue;
+ } + }
@ -37,9 +37,9 @@ index 236fbafeb5..ce39ea09e8 100644
} }
} }
+ // Paper end + // Paper end
MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot MinecraftTimings.timeUpdateTimer.stopTiming(); // Spigot // Paper
// WorldServer worldserver; // CraftBukkit - dropped down // WorldServer worldserver; // CraftBukkit - dropped down
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 54bbc25ce96d023b76be2fa5c280bf2d6d8015f3 Mon Sep 17 00:00:00 2001 From 6caf1aae5228cf7cac288de7e5e2a743cb1ddd5a Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Mon, 5 Nov 2018 04:23:51 +0000 Date: Mon, 5 Nov 2018 04:23:51 +0000
Subject: [PATCH] Restore custom InventoryHolder support Subject: [PATCH] Restore custom InventoryHolder support
@ -17,10 +17,10 @@ will always work as intended in the past, those without will create implementati
based inventories. based inventories.
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
index 23389743d5..d25928e094 100644 index 9957ed040..ae280dd40 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java --- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
@@ -31,10 +31,20 @@ public final class CraftInventoryCreator { @@ -39,10 +39,20 @@ public final class CraftInventoryCreator {
} }
public Inventory createInventory(InventoryHolder holder, InventoryType type) { public Inventory createInventory(InventoryHolder holder, InventoryType type) {
@ -42,5 +42,5 @@ index 23389743d5..d25928e094 100644
} }
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From f84c15041538210bd0cde5c8296beb9d207518ce Mon Sep 17 00:00:00 2001 From 47c534c81bcd0b82efbafdff594dbee5e5c2547e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Thu, 8 Nov 2018 21:33:09 -0500 Date: Thu, 8 Nov 2018 21:33:09 -0500
Subject: [PATCH] Use Vanilla Minecart Speeds Subject: [PATCH] Use Vanilla Minecart Speeds
@ -6,10 +6,10 @@ Subject: [PATCH] Use Vanilla Minecart Speeds
CraftBukkit changed the values on flying speed, restore back to vanilla CraftBukkit changed the values on flying speed, restore back to vanilla
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 0f531e7d42..8e773edc54 100644 index 6fc332dbf..828a8711d 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java --- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -37,9 +37,9 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT @@ -35,9 +35,9 @@ public abstract class EntityMinecartAbstract extends Entity {
private double derailedX = 0.5; private double derailedX = 0.5;
private double derailedY = 0.5; private double derailedY = 0.5;
private double derailedZ = 0.5; private double derailedZ = 0.5;
@ -23,5 +23,5 @@ index 0f531e7d42..8e773edc54 100644
// CraftBukkit end // CraftBukkit end
-- --
2.21.0 2.20.1

View file

@ -1,44 +1,41 @@
From ce9234ee5d3532f7e454a0033d4420c8cdbd6f6c Mon Sep 17 00:00:00 2001 From 8f317e9ad1d4711329821c5c254cf41e31d3a86b Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sat, 10 Nov 2018 05:15:21 +0000 Date: Sat, 10 Nov 2018 05:15:21 +0000
Subject: [PATCH] Fix SpongeAbsortEvent handling Subject: [PATCH] Fix SpongeAbsortEvent handling
Only process drops when the block is actually going to be removed Only process drops when the block is actually going to be removed
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index 549c50de7..5e6609944 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -465,7 +465,7 @@ public class Block implements IMaterial {
iblockdata.dropNaturally(world, blockposition, ItemStack.a);
}
-
+ public static void dropNaturally(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) { a(iblockdata, world, blockposition, tileentity); }
public static void a(IBlockData iblockdata, World world, BlockPosition blockposition, @Nullable TileEntity tileentity) {
if (world instanceof WorldServer) {
a(iblockdata, (WorldServer) world, blockposition, tileentity).forEach((itemstack) -> {
diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java diff --git a/src/main/java/net/minecraft/server/BlockSponge.java b/src/main/java/net/minecraft/server/BlockSponge.java
index cbc8e8d139..cda6f2b732 100644 index 4e281ce6d..6a64af71b 100644
--- a/src/main/java/net/minecraft/server/BlockSponge.java --- a/src/main/java/net/minecraft/server/BlockSponge.java
+++ b/src/main/java/net/minecraft/server/BlockSponge.java +++ b/src/main/java/net/minecraft/server/BlockSponge.java
@@ -106,7 +106,11 @@ public class BlockSponge extends Block { @@ -113,8 +113,11 @@ public class BlockSponge extends Block {
} else if (iblockdata.getBlock() instanceof BlockFluids) {
// NOP // NOP
} else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) { } else if (material == Material.WATER_PLANT || material == Material.REPLACEABLE_WATER_PLANT) {
- iblockdata.a(world, blockposition2, 0); TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? world.getTileEntity(blockposition2) : null;
-
- a(iblockdata, world, blockposition2, tileentity);
+ // Paper start + // Paper start
+ if (block.getHandle().getMaterial() == Material.AIR) { + if (block.getHandle().getMaterial() == Material.AIR) {
+ iblockdata.dropNaturally(world, blockposition2, 0); + dropNaturally(iblockdata, world, blockposition2, tileentity);
+ } + }
+ // Paper end + // Paper end
} }
} }
world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag()); world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
@@ -117,3 +121,4 @@ public class BlockSponge extends Block {
return i > 0;
}
}
+
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
index 08a5acb0ac..aa3547690a 100644
--- a/src/main/java/net/minecraft/server/IBlockData.java
+++ b/src/main/java/net/minecraft/server/IBlockData.java
@@ -236,6 +236,7 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
this.getBlock().a(this, world, blockposition, entity);
}
+ default void dropNaturally(World world, BlockPosition blockPosition, int i) { a(world, blockPosition, i);} // Paper - OBFHELPER
default void a(World world, BlockPosition blockposition, int i) {
this.dropNaturally(world, blockposition, 1.0F, i);
}
-- --
2.21.0 2.20.1

View file

@ -1,14 +1,14 @@
From c9b3d48edee5c67f2d1af7bd247e6ec5b634446f Mon Sep 17 00:00:00 2001 From 14f33763163441956bf08dd3414a25d0f222afe3 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 11 Nov 2018 21:01:09 +0000 Date: Sun, 11 Nov 2018 21:01:09 +0000
Subject: [PATCH] Don't allow digging into unloaded chunks Subject: [PATCH] Don't allow digging into unloaded chunks
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 4705dd2c68..0467a8feab 100644 index 16a7aba49..8d2b02894 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1207,6 +1207,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -1246,6 +1246,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
case START_DESTROY_BLOCK: case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK: case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK: case STOP_DESTROY_BLOCK:
@ -21,5 +21,5 @@ index 4705dd2c68..0467a8feab 100644
double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D; double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D;
double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D); double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D);
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From 6e73e08568141499f1c97c1574d249495b32a2cf Mon Sep 17 00:00:00 2001 From 666bfc88b5bd606367c2be958ccffd57c0b25300 Mon Sep 17 00:00:00 2001
From: theosib <millerti@172.16.221.1> From: theosib <millerti@172.16.221.1>
Date: Thu, 27 Sep 2018 01:43:35 -0600 Date: Thu, 27 Sep 2018 01:43:35 -0600
Subject: [PATCH] Optimize redstone algorithm Subject: [PATCH] Optimize redstone algorithm
@ -19,10 +19,10 @@ Aside from making the obvious class/function renames and obfhelpers I didn't nee
Just added Bukkit's event system and took a few liberties with dead code and comment misspellings. Just added Bukkit's event system and took a few liberties with dead code and comment misspellings.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 61ad2cef7b..a70a64070e 100644 index ad793ffa3..ef882b897 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -588,4 +588,14 @@ public class PaperWorldConfig { @@ -439,4 +439,14 @@ public class PaperWorldConfig {
private void preventMovingIntoUnloadedChunks() { private void preventMovingIntoUnloadedChunks() {
preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false); preventMovingIntoUnloadedChunks = getBoolean("prevent-moving-into-unloaded-chunks", false);
} }
@ -39,7 +39,7 @@ index 61ad2cef7b..a70a64070e 100644
} }
diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
new file mode 100644 new file mode 100644
index 0000000000..21d9d6d7ed index 000000000..21d9d6d7e
--- /dev/null --- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java +++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java
@@ -0,0 +1,910 @@ @@ -0,0 +1,910 @@
@ -954,7 +954,7 @@ index 0000000000..21d9d6d7ed
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 2e30270bb7..72d2617071 100644 index da903f74b..f8dfc91f2 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java --- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java +++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
@ -966,18 +966,18 @@ index 2e30270bb7..72d2617071 100644
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.google.common.collect.Maps; import com.google.common.collect.Maps;
@@ -22,7 +24,10 @@ public class BlockRedstoneWire extends Block { @@ -22,7 +24,10 @@ public class BlockRedstoneWire extends Block {
public static final BlockStateInteger POWER = BlockProperties.al; public static final BlockStateInteger POWER = BlockProperties.as;
public static final Map<EnumDirection, BlockStateEnum<BlockPropertyRedstoneSide>> q = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST)); public static final Map<EnumDirection, BlockStateEnum<BlockPropertyRedstoneSide>> f = Maps.newEnumMap(ImmutableMap.of(EnumDirection.NORTH, BlockRedstoneWire.NORTH, EnumDirection.EAST, BlockRedstoneWire.EAST, EnumDirection.SOUTH, BlockRedstoneWire.SOUTH, EnumDirection.WEST, BlockRedstoneWire.WEST));
protected static final VoxelShape[] r = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)}; protected static final VoxelShape[] g = new VoxelShape[] { Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 13.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 3.0D, 16.0D, 1.0D, 16.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(3.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 13.0D), Block.a(0.0D, 0.0D, 0.0D, 16.0D, 1.0D, 16.0D)};
+ public boolean canProvidePower() { return this.s; } // Paper - OBFHELPER + public boolean canProvidePower() { return this.h; } // Paper - OBFHELPER
+ public void setCanProvidePower(boolean value) { this.s = value; } // Paper - OBFHELPER + public void setCanProvidePower(boolean value) { this.h = value; } // Paper - OBFHELPER
private boolean s = true; private boolean h = true;
+ private Set<BlockPosition> getBlocksNeedingUpdate() { return this.t; } // Paper - OBFHELPER + private Set<BlockPosition> getBlocksNeedingUpdate() { return this.i; } // Paper - OBFHELPER
private final Set<BlockPosition> t = Sets.newHashSet(); private final Set<BlockPosition> i = Sets.newHashSet();
public BlockRedstoneWire(Block.Info block_info) { public BlockRedstoneWire(Block.Info block_info) {
@@ -154,6 +159,117 @@ public class BlockRedstoneWire extends Block { @@ -157,6 +162,117 @@ public class BlockRedstoneWire extends Block {
return iblockdata1.q() || iblockdata1.getBlock() == Blocks.GLOWSTONE; return Block.d(iblockdata1, iworldreader, blockposition1, EnumDirection.UP) || iblockdata1.getBlock() == Blocks.HOPPER;
} }
+ // Paper start - Optimize redstone + // Paper start - Optimize redstone
@ -1093,17 +1093,17 @@ index 2e30270bb7..72d2617071 100644
+ // Paper end + // Paper end
private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) { private IBlockData a(World world, BlockPosition blockposition, IBlockData iblockdata) {
iblockdata = this.b(world, blockposition, iblockdata); iblockdata = this.b(world, blockposition, iblockdata);
List<BlockPosition> list = Lists.newArrayList(this.t); List<BlockPosition> list = Lists.newArrayList(this.i);
@@ -264,7 +380,7 @@ public class BlockRedstoneWire extends Block { @@ -255,7 +371,7 @@ public class BlockRedstoneWire extends Block {
@Override
public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1) { public void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) { if (iblockdata1.getBlock() != iblockdata.getBlock() && !world.isClientSide) {
- this.a(world, blockposition, iblockdata); - this.a(world, blockposition, iblockdata);
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone + this.updateSurroundingRedstone(world, blockposition, iblockdata, null); // Paper - Optimize redstone
Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator(); Iterator iterator = EnumDirection.EnumDirectionLimit.VERTICAL.iterator();
EnumDirection enumdirection; EnumDirection enumdirection;
@@ -310,7 +426,7 @@ public class BlockRedstoneWire extends Block { @@ -302,7 +418,7 @@ public class BlockRedstoneWire extends Block {
world.applyPhysics(blockposition.shift(enumdirection), this); world.applyPhysics(blockposition.shift(enumdirection), this);
} }
@ -1112,20 +1112,20 @@ index 2e30270bb7..72d2617071 100644
Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator(); Iterator iterator = EnumDirection.EnumDirectionLimit.HORIZONTAL.iterator();
EnumDirection enumdirection1; EnumDirection enumdirection1;
@@ -350,7 +466,7 @@ public class BlockRedstoneWire extends Block { @@ -343,7 +459,7 @@ public class BlockRedstoneWire extends Block {
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) { public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
if (!world.isClientSide) { if (!world.isClientSide) {
if (iblockdata.canPlace(world, blockposition)) { if (iblockdata.canPlace(world, blockposition)) {
- this.a(world, blockposition, iblockdata); - this.a(world, blockposition, iblockdata);
+ this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone + this.updateSurroundingRedstone(world, blockposition, iblockdata, blockposition1); // Paper - Optimize redstone
} else { } else {
iblockdata.a(world, blockposition, 0); c(iblockdata, world, blockposition);
world.setAir(blockposition); world.a(blockposition, false);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 027bb64acc..645af17a58 100644 index c917c39b9..17401ea28 100644
--- a/src/main/java/net/minecraft/server/World.java --- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java +++ b/src/main/java/net/minecraft/server/World.java
@@ -648,6 +648,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -545,6 +545,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
} }
@ -1133,14 +1133,14 @@ index 027bb64acc..645af17a58 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) { public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) { if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition); IBlockData iblockdata = this.getType(blockposition);
@@ -2593,6 +2594,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc @@ -1306,6 +1307,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0)))); return this.getBlockFacePower(blockposition.down(), EnumDirection.DOWN) > 0 ? true : (this.getBlockFacePower(blockposition.up(), EnumDirection.UP) > 0 ? true : (this.getBlockFacePower(blockposition.north(), EnumDirection.NORTH) > 0 ? true : (this.getBlockFacePower(blockposition.south(), EnumDirection.SOUTH) > 0 ? true : (this.getBlockFacePower(blockposition.west(), EnumDirection.WEST) > 0 ? true : this.getBlockFacePower(blockposition.east(), EnumDirection.EAST) > 0))));
} }
+ public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return u(pos); } // Paper - OBFHELPER + public int isBlockIndirectlyGettingPowered(BlockPosition pos) { return r(pos); } // Paper - OBFHELPER
public int u(BlockPosition blockposition) { public int r(BlockPosition blockposition) {
int i = 0; int i = 0;
EnumDirection[] aenumdirection = World.a; EnumDirection[] aenumdirection = World.a;
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From e5b4fd7a68006fa22e4d6efea4893026f03e284e Mon Sep 17 00:00:00 2001 From cba797992e47d77d2fa6ba776d3bead0800c43cd Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 15 Nov 2018 13:38:37 +0000 Date: Thu, 15 Nov 2018 13:38:37 +0000
Subject: [PATCH] force entity dismount during teleportation Subject: [PATCH] force entity dismount during teleportation
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
Improvements/suggestions welcome! Improvements/suggestions welcome!
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index f745ed8fee..a678dc89c8 100644 index 4bdeba399..dec531ab7 100644
--- a/src/main/java/net/minecraft/server/Entity.java --- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java +++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2097,12 +2097,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -1981,12 +1981,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
@ -41,7 +41,7 @@ index f745ed8fee..a678dc89c8 100644
} }
} }
@@ -2147,7 +2150,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2037,7 +2040,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return true; // CraftBukkit return true; // CraftBukkit
} }
@ -53,7 +53,7 @@ index f745ed8fee..a678dc89c8 100644
if (entity.getVehicle() == this) { if (entity.getVehicle() == this) {
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)"); throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
} else { } else {
@@ -2157,7 +2163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2047,7 +2053,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) { if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
VehicleExitEvent event = new VehicleExitEvent( VehicleExitEvent event = new VehicleExitEvent(
(Vehicle) getBukkitEntity(), (Vehicle) getBukkitEntity(),
@ -62,7 +62,7 @@ index f745ed8fee..a678dc89c8 100644
); );
Bukkit.getPluginManager().callEvent(event); Bukkit.getPluginManager().callEvent(event);
CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle(); CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
@@ -2168,7 +2174,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke @@ -2058,7 +2064,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
} }
// CraftBukkit end // CraftBukkit end
// Spigot start // Spigot start
@ -72,56 +72,59 @@ index f745ed8fee..a678dc89c8 100644
if (event.isCancelled()) { if (event.isCancelled()) {
return false; return false;
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 4bbf577523..f5d9b4abc2 100644 index f17c1c54b..e811a2917 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java --- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java +++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -991,8 +991,11 @@ public abstract class EntityHuman extends EntityLiving { @@ -937,9 +937,11 @@ public abstract class EntityHuman extends EntityLiving {
return -0.35D; return -0.35D;
} }
- @Override
- public void stopRiding() { - public void stopRiding() {
- super.stopRiding(); - super.stopRiding();
+ // Paper start + // Paper start
+ public void stopRiding() { stopRiding(false); } + @Override public void stopRiding() { stopRiding(false); }
+ public void stopRiding(boolean suppressCancellation) { + @Override public void stopRiding(boolean suppressCancellation) {
+ // Paper end + // Paper end
+ super.stopRiding(suppressCancellation); // Paper - suppress + super.stopRiding(suppressCancellation); // Paper - suppress
this.k = 0; this.j = 0;
} }
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 14f1029687..4d5459d24f 100644 index bd8385cd5..868b44a4b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2479,10 +2479,13 @@ public abstract class EntityLiving extends Entity { @@ -2659,11 +2659,13 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.aw) & 4) != 0; return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0;
} }
- @Override
- public void stopRiding() { - public void stopRiding() {
+ // Paper start + // Paper start
+ public void stopRiding() { stopRiding(false); } + @Override public void stopRiding() { stopRiding(false); }
+ public void stopRiding(boolean suppressCancellation) { + @Override public void stopRiding(boolean suppressCancellation) {
+ // Paper end + // Paper end
Entity entity = this.getVehicle(); Entity entity = this.getVehicle();
- super.stopRiding(); - super.stopRiding();
+ super.stopRiding(suppressCancellation); // Paper - suppress + super.stopRiding(suppressCancellation); // Paper - suppress
if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) { if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) {
this.A(entity); this.B(entity);
} }
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 5b1bbc7724..57c6455bd8 100644 index c71e4dfbe..71ad35f71 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java --- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java +++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -784,10 +784,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting { @@ -981,11 +981,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
} }
} }
- @Override
- public void stopRiding() { - public void stopRiding() {
+ // Paper start + // Paper start
+ public void stopRiding() { stopRiding(false); } + @Override public void stopRiding() { stopRiding(false); }
+ public void stopRiding(boolean suppressCancellation) { + @Override public void stopRiding(boolean suppressCancellation) {
+ // paper end + // paper end
Entity entity = this.getVehicle(); Entity entity = this.getVehicle();
- super.stopRiding(); - super.stopRiding();
@ -130,5 +133,5 @@ index 5b1bbc7724..57c6455bd8 100644
if (entity1 != entity && this.playerConnection != null) { if (entity1 != entity && this.playerConnection != null) {
-- --
2.21.0 2.20.1

View file

@ -1,4 +1,4 @@
From e2d85e74d938a2486d48169b69af45ffb70eb811 Mon Sep 17 00:00:00 2001 From da0362d759be7bd323ea133f351c5de56dafccce Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Fri, 16 Nov 2018 23:08:50 -0500 Date: Fri, 16 Nov 2018 23:08:50 -0500
Subject: [PATCH] Book Size Limits Subject: [PATCH] Book Size Limits
@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
Puts some limits on the size of books. Puts some limits on the size of books.
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index cac79686d8..c5b8354fa7 100644 index ee282cb35..3d6101c4d 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -449,4 +449,11 @@ public class PaperConfig { @@ -372,4 +372,11 @@ public class PaperConfig {
velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8); velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8);
} }
} }
@ -22,21 +22,20 @@ index cac79686d8..c5b8354fa7 100644
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 0467a8feab..5c041c48fa 100644 index 8d2b02894..15fb7ed60 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java --- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -12,6 +12,8 @@ import java.util.Collections; @@ -14,6 +14,7 @@ import java.util.Iterator;
import java.util.Iterator; import java.util.Optional;
import java.util.Set; import java.util.Set;
import javax.annotation.Nullable; import javax.annotation.Nullable;
+
+import org.apache.commons.lang3.StringEscapeUtils; +import org.apache.commons.lang3.StringEscapeUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@@ -748,6 +750,42 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable { @@ -784,6 +785,42 @@ public class PlayerConnection implements PacketListenerPlayIn {
}
@Override
public void a(PacketPlayInBEdit packetplayinbedit) { public void a(PacketPlayInBEdit packetplayinbedit) {
+ // Paper start + // Paper start
+ ItemStack testStack = packetplayinbedit.b(); + ItemStack testStack = packetplayinbedit.b();
@ -78,5 +77,5 @@ index 0467a8feab..5c041c48fa 100644
PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer()); PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer());
if (this.lastBookTick + 20 > MinecraftServer.currentTick) { if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
-- --
2.21.0 2.20.1

View file

@ -1,11 +1,11 @@
From b9b889e4ac8118cc7aaeba6c4dd296f767002436 Mon Sep 17 00:00:00 2001 From b1cb08688d24eb143d7b026617267c6d063d88c1 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com> From: Shane Freeder <theboyetronic@gmail.com>
Date: Sun, 18 Nov 2018 19:49:56 +0000 Date: Sun, 18 Nov 2018 19:49:56 +0000
Subject: [PATCH] Make the default permission message configurable Subject: [PATCH] Make the default permission message configurable
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index c5b8354fa7..9f240c35d6 100644 index 3d6101c4d..010d2a796 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -21,6 +21,7 @@ import java.util.regex.Pattern; @@ -21,6 +21,7 @@ import java.util.regex.Pattern;
@ -16,7 +16,7 @@ index c5b8354fa7..9f240c35d6 100644
import org.bukkit.command.Command; import org.bukkit.command.Command;
import org.bukkit.configuration.ConfigurationSection; import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.InvalidConfigurationException; import org.bukkit.configuration.InvalidConfigurationException;
@@ -302,6 +303,11 @@ public class PaperConfig { @@ -278,6 +279,11 @@ public class PaperConfig {
connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage); connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
} }
@ -29,20 +29,21 @@ index c5b8354fa7..9f240c35d6 100644
private static void savePlayerData() { private static void savePlayerData() {
savePlayerData = getBoolean("settings.save-player-data", savePlayerData); savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index af065bd705..9c5b79920f 100644 index 15756014a..b05d7b0e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2188,6 +2188,10 @@ public final class CraftServer implements Server { @@ -2118,6 +2118,11 @@ public final class CraftServer implements Server {
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions; return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
} }
+ @Override
+ public String getPermissionMessage() { + public String getPermissionMessage() {
+ return com.destroystokyo.paper.PaperConfig.noPermissionMessage; + return com.destroystokyo.paper.PaperConfig.noPermissionMessage;
+ } + }
+ +
@Override
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) { public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
return createProfile(uuid, null); return createProfile(uuid, null);
}
-- --
2.21.0 2.20.1

View file

@ -1,33 +1,22 @@
From 71f4a80d0a3fa035ed1bee5c0539f65f0a4b9639 Mon Sep 17 00:00:00 2001 From 690ee0b9cbb926fcb9509eb8877402930a77a9d4 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com> From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sun, 7 Oct 2018 04:29:59 -0500 Date: Sun, 7 Oct 2018 04:29:59 -0500
Subject: [PATCH] Add more Zombie API Subject: [PATCH] Add more Zombie API
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 81cc0c3b33..24bc3e0f08 100644 index 92d1cd851..f8baaea03 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java --- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java +++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -21,8 +21,8 @@ public class EntityZombie extends EntityMonster { @@ -31,6 +31,7 @@ public class EntityZombie extends EntityMonster {
private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable private int bF;
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); public int drownedConversionTime;
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
- private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
- public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
+ private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> armsRaised = bE; // Paper - OBFHELPER
+ public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i); private static final DataWatcherObject<Boolean> drowning = DROWN_CONVERTING; // Paper - OBFHELPER
private final PathfinderGoalBreakDoor bG;
private boolean bH;
private int bI;
@@ -30,6 +30,7 @@ public class EntityZombie extends EntityMonster {
private float bK;
private float bL;
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
+ private boolean shouldBurnInDay = true; // Paper + private boolean shouldBurnInDay = true; // Paper
public EntityZombie(EntityTypes<?> entitytypes, World world) { public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
super(entitytypes, world); super(entitytypes, world);
@@ -78,14 +79,22 @@ public class EntityZombie extends EntityMonster { @@ -78,6 +79,7 @@ public class EntityZombie extends EntityMonster {
this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false); this.getDataWatcher().register(EntityZombie.DROWN_CONVERTING, false);
} }
@ -35,43 +24,28 @@ index 81cc0c3b33..24bc3e0f08 100644
public boolean isDrownConverting() { public boolean isDrownConverting() {
return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING); return (Boolean) this.getDataWatcher().get(EntityZombie.DROWN_CONVERTING);
} }
@@ -209,6 +211,13 @@ public class EntityZombie extends EntityMonster {
+ public void setArmsRaised(boolean raised) { s(raised); } // Paper - OBFHELPER
public void s(boolean flag) {
this.getDataWatcher().set(EntityZombie.bE, flag);
}
+ // Paper start
+ public boolean isArmsRaised() {
+ return ((Boolean) this.getDataWatcher().get(EntityZombie.armsRaised)).booleanValue();
+ }
+ // Paper end
+
public boolean dH() {
return this.bH;
}
@@ -207,6 +216,13 @@ public class EntityZombie extends EntityMonster {
this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true); this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, true);
} }
+ // Paper start + // Paper start
+ public void stopDrowning() { + public void stopDrowning() {
+ this.drownedConversionTime = -1; + this.drownedConversionTime = -1;
+ this.getDataWatcher().set(EntityZombie.drowning, Boolean.valueOf(false)); + this.getDataWatcher().set(EntityZombie.DROWN_CONVERTING, false);
+ } + }
+ // Paper end + // Paper end
+ +
protected void dE() { protected void eb() {
this.a((EntityZombie) EntityTypes.DROWNED.create(world)); // Paper this.b(EntityTypes.DROWNED);
this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0); this.world.a((EntityHuman) null, 1040, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0);
@@ -245,10 +261,17 @@ public class EntityZombie extends EntityMonster { @@ -253,10 +262,17 @@ public class EntityZombie extends EntityMonster {
} }
} }
+ public boolean shouldBurnInDay() { return L_(); } // Paper - OBFHELPER + public boolean shouldBurnInDay() { return J_(); } // Paper - OBFHELPER
protected boolean L_() { protected boolean J_() {
- return true; - return true;
+ return shouldBurnInDay; // Paper + return shouldBurnInDay;
} }
+ // Paper start + // Paper start
@ -80,18 +54,18 @@ index 81cc0c3b33..24bc3e0f08 100644
+ } + }
+ // Paper end + // Paper end
+ +
@Override
public boolean damageEntity(DamageSource damagesource, float f) { public boolean damageEntity(DamageSource damagesource, float f) {
if (super.damageEntity(damagesource, f)) { if (super.damageEntity(damagesource, f)) {
EntityLiving entityliving = this.getGoalTarget(); @@ -374,6 +390,7 @@ public class EntityZombie extends EntityMonster {
@@ -361,6 +384,7 @@ public class EntityZombie extends EntityMonster { nbttagcompound.setBoolean("CanBreakDoors", this.ef());
nbttagcompound.setBoolean("CanBreakDoors", this.dH()); nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1);
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bI : -1);
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1); nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
+ nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper + nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper
} }
public void a(NBTTagCompound nbttagcompound) { @Override
@@ -374,7 +398,11 @@ public class EntityZombie extends EntityMonster { @@ -388,7 +405,11 @@ public class EntityZombie extends EntityMonster {
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) { if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime")); this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
} }
@ -103,12 +77,12 @@ index 81cc0c3b33..24bc3e0f08 100644
+ // Paper end + // Paper end
} }
public void b(EntityLiving entityliving) { @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
index e93ecb076b..c516d34759 100644 index c28ccd0d9..442befba8 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
@@ -77,4 +77,34 @@ public class CraftZombie extends CraftMonster implements Zombie { @@ -76,4 +76,26 @@ public class CraftZombie extends CraftMonster implements Zombie {
getHandle().startDrownedConversion(time); getHandle().startDrownedConversion(time);
} }
} }
@ -126,14 +100,6 @@ index e93ecb076b..c516d34759 100644
+ getHandle().stopDrowning(); + getHandle().stopDrowning();
+ } + }
+ +
+ public void setArmsRaised(boolean raised) {
+ getHandle().setArmsRaised(raised);
+ }
+
+ public boolean isArmsRaised() {
+ return getHandle().isArmsRaised();
+ }
+
+ public boolean shouldBurnInDay() { + public boolean shouldBurnInDay() {
+ return getHandle().shouldBurnInDay(); + return getHandle().shouldBurnInDay();
+ } + }
@ -144,5 +110,5 @@ index e93ecb076b..c516d34759 100644
+ // Paper end + // Paper end
} }
-- --
2.21.0 2.20.1