Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 12:30:06 +01:00
Houston, we got a patch (#2731)
* Houston, we got a patch * is this the end of the beginning or the beginning of the end
Dieser Commit ist enthalten in:
Ursprung
806e192e26
Commit
44d032f1e9
@ -1,4 +1,4 @@
|
||||
From eda073002e6ae458f54b520c7b6c600ab5bdad3a Mon Sep 17 00:00:00 2001
|
||||
From 2d9fdd1cb99d883bc8c08484c733055f154d8b8d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 24 Feb 2018 01:14:55 -0500
|
||||
Subject: [PATCH] Tameable#getOwnerUniqueId API
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a6322d454a796a41b41c58f049dcbcda5ace0fcf Mon Sep 17 00:00:00 2001
|
||||
From 7b45772c16bd065ecea3697a44803236cf706216 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 21 Aug 2018 01:39:35 +0100
|
||||
Subject: [PATCH] Improve death events
|
||||
@ -15,7 +15,7 @@ items and experience which is otherwise only properly possible by using
|
||||
internal code.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CombatTracker.java b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
index 84c3ea9d00..f563a7b630 100644
|
||||
index 6daa400d2..38fe29f8a 100644
|
||||
--- a/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
+++ b/src/main/java/net/minecraft/server/CombatTracker.java
|
||||
@@ -175,6 +175,7 @@ public class CombatTracker {
|
||||
@ -27,10 +27,10 @@ index 84c3ea9d00..f563a7b630 100644
|
||||
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
|
||||
index 7811beb807..f9b097fd6f 100644
|
||||
index 75343a438..b03316bc8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1517,6 +1517,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1503,6 +1503,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -38,19 +38,19 @@ index 7811beb807..f9b097fd6f 100644
|
||||
public void a(Entity entity, int i, DamageSource damagesource) {
|
||||
if (entity instanceof EntityPlayer) {
|
||||
CriterionTriggers.c.a((EntityPlayer) entity, this, damagesource);
|
||||
@@ -2410,6 +2411,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2413,6 +2414,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fallDistance = 0.0F;
|
||||
}
|
||||
|
||||
+ public void onKill(EntityLiving entityLiving) { this.b(entityLiving); } // Paper - OBFHELPER
|
||||
public void b(EntityLiving entityliving) {}
|
||||
|
||||
protected void i(double d0, double d1, double d2) {
|
||||
protected void k(double d0, double d1, double d2) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
index 85fc48371d..02595cfccd 100644
|
||||
index b51662ee9..e6032e3ed 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
|
||||
@@ -690,7 +690,8 @@ public class EntityArmorStand extends EntityLiving {
|
||||
@@ -706,7 +706,8 @@ public class EntityArmorStand extends EntityLiving {
|
||||
|
||||
@Override
|
||||
public void killEntity() {
|
||||
@ -61,10 +61,10 @@ index 85fc48371d..02595cfccd 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFox.java b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
index e22e99df38..ca38ccf768 100644
|
||||
index ac8eaffb9..7495af8e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFox.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFox.java
|
||||
@@ -597,15 +597,25 @@ public class EntityFox extends EntityAnimal {
|
||||
@@ -571,15 +571,25 @@ public class EntityFox extends EntityAnimal {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -94,7 +94,7 @@ index e22e99df38..ca38ccf768 100644
|
||||
|
||||
public static boolean a(EntityFox entityfox, EntityLiving entityliving) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
index 2483cfd28a..2a988366cd 100644
|
||||
index 80717ad9a..53aac5bcc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHorseChestedAbstract.java
|
||||
@@ -55,11 +55,19 @@ public abstract class EntityHorseChestedAbstract extends EntityHorseAbstract {
|
||||
@ -119,19 +119,19 @@ index 2483cfd28a..2a988366cd 100644
|
||||
public void b(NBTTagCompound nbttagcompound) {
|
||||
super.b(nbttagcompound);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index b09712ca91..1e53af2cce 100644
|
||||
index ac85a5d23..c6bd68919 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -85,7 +85,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -89,7 +89,7 @@ public abstract class EntityLiving extends Entity {
|
||||
protected float aT;
|
||||
protected float aU;
|
||||
protected float aV;
|
||||
protected float aW;
|
||||
protected float aX;
|
||||
- protected int aY;
|
||||
+ protected int aY; protected int getKillCount() { return this.aY; } // Paper - OBFHELPER
|
||||
- protected int aW;
|
||||
+ protected int aW; protected int getKillCount() { return this.aW; } // Paper - OBFHELPER
|
||||
public float lastDamage;
|
||||
protected boolean jumping;
|
||||
public float bb;
|
||||
@@ -128,6 +128,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public float aZ;
|
||||
@@ -131,6 +131,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public boolean collides = true;
|
||||
public boolean canPickUpLoot;
|
||||
public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
|
||||
@ -139,7 +139,7 @@ index b09712ca91..1e53af2cce 100644
|
||||
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
@@ -1185,13 +1186,17 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1137,13 +1138,17 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
if (this.getHealth() <= 0.0F) {
|
||||
if (!this.f(damagesource)) {
|
||||
@ -148,11 +148,11 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ //SoundEffect soundeffect = this.getSoundDeath();
|
||||
|
||||
- if (flag1 && soundeffect != null) {
|
||||
- this.a(soundeffect, this.getSoundVolume(), this.cV());
|
||||
- this.a(soundeffect, this.getSoundVolume(), this.dn());
|
||||
- }
|
||||
+ //if (flag1 && soundeffect != null) {
|
||||
+ // this.a(soundeffect, this.getSoundVolume(), this.cV());
|
||||
+ //}
|
||||
+// if (flag1 && soundeffect != null) {
|
||||
+// this.a(soundeffect, this.getSoundVolume(), this.dn());
|
||||
+// }
|
||||
+ this.silentDeath = !flag1; // mark entity as dying silently
|
||||
+ // Paper end
|
||||
|
||||
@ -161,17 +161,17 @@ index b09712ca91..1e53af2cce 100644
|
||||
}
|
||||
} else if (flag1) {
|
||||
this.c(damagesource);
|
||||
@@ -1329,6 +1334,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1281,6 +1286,7 @@ public abstract class EntityLiving extends Entity {
|
||||
Entity entity = damagesource.getEntity();
|
||||
EntityLiving entityliving = this.getKillingEntity();
|
||||
|
||||
+ /* // Paper - move down to make death event cancellable
|
||||
if (this.aY >= 0 && entityliving != null) {
|
||||
entityliving.a(this, this.aY, damagesource);
|
||||
if (this.aW >= 0 && entityliving != null) {
|
||||
entityliving.a(this, this.aW, damagesource);
|
||||
}
|
||||
@@ -1340,14 +1346,32 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1292,16 +1298,36 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.isSleeping()) {
|
||||
this.dy();
|
||||
this.entityWakeup();
|
||||
}
|
||||
+ */ // Paper
|
||||
|
||||
@ -198,15 +198,7 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
boolean flag = false;
|
||||
|
||||
- if (entityliving instanceof EntityWither) {
|
||||
+ if (this.killed && entityliving instanceof EntityWither) {
|
||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
BlockPosition blockposition = new BlockPosition(this.locX, this.locY, this.locZ);
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
|
||||
@@ -1366,12 +1390,15 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
this.f(entityliving);
|
||||
}
|
||||
|
||||
+ if (this.killed) { // Paper
|
||||
@ -216,16 +208,29 @@ index b09712ca91..1e53af2cce 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1309,7 +1335,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (!this.world.isClientSide) {
|
||||
boolean flag = false;
|
||||
|
||||
- if (entityliving instanceof EntityWither) {
|
||||
+ if (this.killed && entityliving instanceof EntityWither) { // Paper
|
||||
if (this.world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) {
|
||||
BlockPosition blockposition = new BlockPosition(this);
|
||||
IBlockData iblockdata = Blocks.WITHER_ROSE.getBlockData();
|
||||
@@ -1330,7 +1356,8 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
- protected void d(DamageSource damagesource) {
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent processDeath(DamageSource damagesource) { return d(damagesource); } // Paper - OBFHELPER
|
||||
+ protected org.bukkit.event.entity.EntityDeathEvent d(DamageSource damagesource) { // Paper
|
||||
Entity entity = damagesource.getEntity();
|
||||
int i;
|
||||
|
||||
@@ -1384,21 +1411,24 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1343,22 +1370,25 @@ public abstract class EntityLiving extends Entity {
|
||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||
|
||||
this.cF(); // CraftBukkit - from below // PAIL
|
||||
this.dropInventory(); // CraftBukkit - from below
|
||||
+ org.bukkit.event.entity.EntityDeathEvent deathEvent; // Paper
|
||||
if (this.isDropExperience() && this.world.getGameRules().getBoolean(GameRules.DO_MOB_LOOT)) {
|
||||
this.a(damagesource, flag);
|
||||
@ -242,16 +247,17 @@ index b09712ca91..1e53af2cce 100644
|
||||
+ this.postDeathDropItems(deathEvent); // Paper
|
||||
+ this.drops = new ArrayList<>(); // Paper
|
||||
|
||||
- // this.cF();// CraftBukkit - moved up
|
||||
// this.dropInventory();// CraftBukkit - moved up
|
||||
- this.dropExperience();
|
||||
+ return deathEvent; // Paper
|
||||
}
|
||||
|
||||
protected void cF() {}
|
||||
protected void dropInventory() {}
|
||||
+ protected void postDeathDropItems(org.bukkit.event.entity.EntityDeathEvent event) {} // Paper - method for post death logic that cannot be ran before the event is potentially cancelled
|
||||
|
||||
protected void dropDeathLoot(DamageSource damagesource, int i, boolean flag) {}
|
||||
|
||||
@@ -1449,6 +1479,7 @@ public abstract class EntityLiving extends Entity {
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
@@ -1437,6 +1467,7 @@ public abstract class EntityLiving extends Entity {
|
||||
return SoundEffects.ENTITY_GENERIC_HURT;
|
||||
}
|
||||
|
||||
@ -259,7 +265,7 @@ index b09712ca91..1e53af2cce 100644
|
||||
@Nullable
|
||||
protected SoundEffect getSoundDeath() {
|
||||
return SoundEffects.ENTITY_GENERIC_DEATH;
|
||||
@@ -1898,10 +1929,12 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1919,10 +1950,12 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
}
|
||||
|
||||
@ -268,12 +274,12 @@ index b09712ca91..1e53af2cce 100644
|
||||
return 1.0F;
|
||||
}
|
||||
|
||||
+ public float getSoundPitch() { return cV();} // Paper - OBFHELPER
|
||||
protected float cV() {
|
||||
+ public float getSoundPitch() { return dn();} // Paper - OBFHELPER
|
||||
protected float dn() {
|
||||
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
|
||||
index 7e37164c0e..1b35e6c478 100644
|
||||
index bb2a0b7e6..26096afbe 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,10 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -303,7 +309,7 @@ index 7e37164c0e..1b35e6c478 100644
|
||||
|
||||
// SPIGOT-943 - only call if they have an inventory open
|
||||
if (this.activeContainer != this.defaultContainer) {
|
||||
@@ -686,8 +699,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -669,8 +682,17 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -324,10 +330,10 @@ index 7e37164c0e..1b35e6c478 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
index 73cb64e09d..9f317ff2e8 100644
|
||||
index 90fdf89c8..b761a41dc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftSound.java
|
||||
@@ -806,6 +806,22 @@ public enum CraftSound {
|
||||
@@ -821,6 +821,22 @@ public enum CraftSound {
|
||||
WEATHER_RAIN_ABOVE("weather.rain.above");
|
||||
private final String minecraftKey;
|
||||
|
||||
@ -351,10 +357,10 @@ index 73cb64e09d..9f317ff2e8 100644
|
||||
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
|
||||
index 2c99a1e9df..e9458dc65f 100644
|
||||
index 9e0be10d7..ad70bd5ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1722,7 +1722,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1706,7 +1706,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void sendHealthUpdate() {
|
||||
@ -372,10 +378,10 @@ index 2c99a1e9df..e9458dc65f 100644
|
||||
|
||||
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
|
||||
index 84c292168e..dc15703fd4 100644
|
||||
index 844781f4e..4fb1092ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -745,9 +745,16 @@ public class CraftEventFactory {
|
||||
@@ -744,9 +744,16 @@ public class CraftEventFactory {
|
||||
public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, List<org.bukkit.inventory.ItemStack> drops) {
|
||||
CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
|
||||
EntityDeathEvent event = new EntityDeathEvent(entity, drops, victim.getExpReward());
|
||||
@ -392,7 +398,7 @@ index 84c292168e..dc15703fd4 100644
|
||||
victim.expToDrop = event.getDroppedExp();
|
||||
|
||||
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
|
||||
@@ -763,8 +770,15 @@ public class CraftEventFactory {
|
||||
@@ -762,8 +769,15 @@ public class CraftEventFactory {
|
||||
CraftPlayer entity = victim.getBukkitEntity();
|
||||
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
|
||||
event.setKeepInventory(keepInventory);
|
||||
@ -408,7 +414,7 @@ index 84c292168e..dc15703fd4 100644
|
||||
|
||||
victim.keepLevel = event.getKeepLevel();
|
||||
victim.newLevel = event.getNewLevel();
|
||||
@@ -781,6 +795,31 @@ public class CraftEventFactory {
|
||||
@@ -780,6 +794,31 @@ public class CraftEventFactory {
|
||||
return event;
|
||||
}
|
||||
|
||||
@ -441,5 +447,5 @@ index 84c292168e..dc15703fd4 100644
|
||||
* Server methods
|
||||
*/
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From d59739ffc3b8c3667e141de7d76a1a1d8ea6c478 Mon Sep 17 00:00:00 2001
|
||||
From 4b88c16c6b5fde287c99a5871c991940d9da6e34 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 8 Sep 2018 18:43:31 -0500
|
||||
Subject: [PATCH] Allow chests to be placed with NBT data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index 1e23d77e72..0e164840fd 100644
|
||||
index 627fa465c..df85f9df0 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -235,6 +235,7 @@ public final class ItemStack {
|
||||
@@ -240,6 +240,7 @@ public final class ItemStack {
|
||||
enuminteractionresult = EnumInteractionResult.FAIL; // cancel placement
|
||||
// PAIL: Remove this when MC-99075 fixed
|
||||
placeEvent.getPlayer().updateInventory();
|
||||
@ -17,10 +17,10 @@ index 1e23d77e72..0e164840fd 100644
|
||||
for (BlockState blockstate : blocks) {
|
||||
blockstate.update(true, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
index 387e366130..6c10f0eb89 100644
|
||||
index c4766f729..b22bd06e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||
@@ -309,7 +309,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
@@ -292,7 +292,7 @@ public class TileEntityChest extends TileEntityLootable { // Paper - Remove ITic
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isFilteredNBT() {
|
||||
@ -30,5 +30,5 @@ index 387e366130..6c10f0eb89 100644
|
||||
// CraftBukkit end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 704ea2a6a85fe0adb3aced77df21d1a6407b8ffc Mon Sep 17 00:00:00 2001
|
||||
From 04757b158488f08a5246b3278c20ab84447ce9f5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 9 Sep 2018 13:30:00 -0400
|
||||
Subject: [PATCH] Mob Pathfinding API
|
||||
@ -7,7 +7,7 @@ Implements Pathfinding API for mobs
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
|
||||
new file mode 100644
|
||||
index 0000000000..f68a07cb96
|
||||
index 000000000..f68a07cb9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java
|
||||
@@ -0,0 +1,111 @@
|
||||
@ -123,10 +123,10 @@ index 0000000000..f68a07cb96
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
index be6aa59749..66e10108d6 100644
|
||||
index bdd092e49..1cb03d464 100644
|
||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||
@@ -72,7 +72,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -80,7 +80,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -135,7 +135,7 @@ index be6aa59749..66e10108d6 100644
|
||||
return this.a(new BlockPosition(d0, d1, d2), i);
|
||||
}
|
||||
|
||||
@@ -92,7 +92,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -100,7 +100,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@ -144,7 +144,7 @@ index be6aa59749..66e10108d6 100644
|
||||
return this.a(ImmutableSet.of(new BlockPosition(entity)), entity, 16, true, i); // Paper
|
||||
}
|
||||
|
||||
@@ -156,6 +156,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -164,6 +164,7 @@ public abstract class NavigationAbstract {
|
||||
return pathentity != null && this.a(pathentity, d0);
|
||||
}
|
||||
|
||||
@ -152,17 +152,17 @@ index be6aa59749..66e10108d6 100644
|
||||
public boolean a(@Nullable PathEntity pathentity, double d0) {
|
||||
if (pathentity == null) {
|
||||
this.c = null;
|
||||
@@ -179,7 +180,7 @@ public abstract class NavigationAbstract {
|
||||
@@ -191,7 +192,7 @@ public abstract class NavigationAbstract {
|
||||
}
|
||||
}
|
||||
|
||||
- @Nullable
|
||||
+ @Nullable public PathEntity getPathEntity() { return l(); } @Nullable // Paper - OBFHELPER
|
||||
public PathEntity l() {
|
||||
public PathEntity k() {
|
||||
return this.c;
|
||||
}
|
||||
@@ -265,6 +266,7 @@ public abstract class NavigationAbstract {
|
||||
return this.c == null || this.c.b();
|
||||
@@ -281,6 +282,7 @@ public abstract class NavigationAbstract {
|
||||
return !this.m();
|
||||
}
|
||||
|
||||
+ public void stopPathfinding() { o(); } // Paper - OBFHELPER
|
||||
@ -170,7 +170,7 @@ index be6aa59749..66e10108d6 100644
|
||||
this.c = null;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PathEntity.java b/src/main/java/net/minecraft/server/PathEntity.java
|
||||
index 312352ef84..dcb4e25080 100644
|
||||
index 312352ef8..dcb4e2508 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathEntity.java
|
||||
@@ -5,13 +5,14 @@ import javax.annotation.Nullable;
|
||||
@ -210,7 +210,7 @@ index 312352ef84..dcb4e25080 100644
|
||||
|
||||
return new Vec3D((double) pathpoint.a, (double) pathpoint.b, (double) pathpoint.c);
|
||||
diff --git a/src/main/java/net/minecraft/server/PathPoint.java b/src/main/java/net/minecraft/server/PathPoint.java
|
||||
index b1db95daa9..18cdd2a6f2 100644
|
||||
index b1db95daa..18cdd2a6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathPoint.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathPoint.java
|
||||
@@ -2,9 +2,9 @@ package net.minecraft.server;
|
||||
@ -227,7 +227,7 @@ index b1db95daa9..18cdd2a6f2 100644
|
||||
public int d = -1;
|
||||
public float e;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 5bf1cd06fa..53c2d154ed 100644
|
||||
index 5bf1cd06f..53c2d154e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -12,8 +12,11 @@ import org.bukkit.loot.LootTable;
|
||||
@ -243,5 +243,5 @@ index 5bf1cd06fa..53c2d154ed 100644
|
||||
public void setTarget(LivingEntity target) {
|
||||
EntityInsentient entity = getHandle();
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 9a0285ff8bc70129a1256d0813806e88022e95da Mon Sep 17 00:00:00 2001
|
||||
From 7600f648eac18172b02d46255fb5b67062c99bba Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 10 Sep 2018 23:36:16 -0400
|
||||
Subject: [PATCH] Prevent chunk loading from Fluid Flowing
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/FluidTypeFlowing.java b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
index 3e9433e283..4660b95389 100644
|
||||
index 3099a5e65..376dca188 100644
|
||||
--- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
+++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
|
||||
@@ -178,7 +178,8 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@ -25,10 +25,10 @@ index 3e9433e283..4660b95389 100644
|
||||
- IBlockData iblockdata1 = iworldreader.getType(blockposition1);
|
||||
+ IBlockData iblockdata1 = iworldreader.getTypeIfLoaded(blockposition1); // Paper
|
||||
+ if (iblockdata1 == null) continue; // Paper
|
||||
Fluid fluid = iblockdata1.p();
|
||||
Fluid fluid = iblockdata1.getFluid();
|
||||
|
||||
if (fluid.getType().a((FluidType) this) && this.a(enumdirection, (IBlockAccess) iworldreader, blockposition, iblockdata, blockposition1, iblockdata1)) {
|
||||
@@ -322,11 +324,19 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -322,11 +324,18 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
if (enumdirection1 != enumdirection) {
|
||||
BlockPosition blockposition2 = blockposition.shift(enumdirection1);
|
||||
short short0 = a(blockposition1, blockposition2);
|
||||
@ -42,24 +42,23 @@ index 3e9433e283..4660b95389 100644
|
||||
+ continue;
|
||||
+ }
|
||||
|
||||
- return Pair.of(iblockdata1, iblockdata1.p());
|
||||
- return Pair.of(iblockdata1, iblockdata1.getFluid());
|
||||
- });
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.p());
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.getFluid());
|
||||
+ short2objectmap.put(short0, pair);
|
||||
+
|
||||
+ }
|
||||
+ // Paper end
|
||||
IBlockData iblockdata1 = (IBlockData) pair.getFirst();
|
||||
Fluid fluid = (Fluid) pair.getSecond();
|
||||
|
||||
@@ -398,11 +408,16 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
@@ -398,11 +407,16 @@ public abstract class FluidTypeFlowing extends FluidType {
|
||||
EnumDirection enumdirection = (EnumDirection) iterator.next();
|
||||
BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
||||
short short0 = a(blockposition, blockposition1);
|
||||
- Pair<IBlockData, Fluid> pair = (Pair) short2objectmap.computeIfAbsent(short0, (j) -> {
|
||||
- IBlockData iblockdata1 = iworldreader.getType(blockposition1);
|
||||
-
|
||||
- return Pair.of(iblockdata1, iblockdata1.p());
|
||||
- return Pair.of(iblockdata1, iblockdata1.getFluid());
|
||||
- });
|
||||
+ // Paper start
|
||||
+ Pair pair = (Pair) short2objectmap.get(short0);
|
||||
@ -67,7 +66,7 @@ index 3e9433e283..4660b95389 100644
|
||||
+ IBlockData iblockdatax = iworldreader.getTypeIfLoaded(blockposition1);
|
||||
+ if (iblockdatax == null) continue;
|
||||
+
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.p());
|
||||
+ pair = Pair.of(iblockdatax, iblockdatax.getFluid());
|
||||
+ short2objectmap.put(short0, pair);
|
||||
+ }
|
||||
+ // Paper end
|
||||
@ -75,5 +74,5 @@ index 3e9433e283..4660b95389 100644
|
||||
Fluid fluid = (Fluid) pair.getSecond();
|
||||
Fluid fluid1 = this.a(iworldreader, blockposition1, iblockdata1);
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 34de30524211d83dc0fd34cab29214ee64d1e9a5 Mon Sep 17 00:00:00 2001
|
||||
From 35dce37a959e9f4b9b98f03437efbc13ac47a19c Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||
Date: Wed, 12 Sep 2018 18:53:55 +0300
|
||||
Subject: [PATCH] Implement an API for CanPlaceOn and CanDestroy NBT values
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ArgumentBlock.java b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||
index 005ebec266..97d85f8451 100644
|
||||
index 005ebec26..97d85f845 100644
|
||||
--- a/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/ArgumentBlock.java
|
||||
@@ -43,7 +43,7 @@ public class ArgumentBlock {
|
||||
@ -32,7 +32,7 @@ index 005ebec266..97d85f8451 100644
|
||||
this.s = this::l;
|
||||
if (this.i.canRead() && this.i.peek() == '#') {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 6a6b80b5bd..dbb4e5258c 100644
|
||||
index 1eede4bcc..8a9a48bb8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -87,6 +87,12 @@ import org.bukkit.persistence.PersistentDataContainer;
|
||||
@ -283,10 +283,10 @@ index 6a6b80b5bd..dbb4e5258c 100644
|
||||
// Paper end
|
||||
));
|
||||
}
|
||||
@@ -1482,4 +1626,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return spigot;
|
||||
@@ -1460,4 +1604,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
// Spigot end
|
||||
// Paper end
|
||||
|
||||
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values
|
||||
+ @Override
|
||||
+ @SuppressWarnings("deprecation")
|
||||
@ -432,5 +432,5 @@ index 6a6b80b5bd..dbb4e5258c 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From a52dd455c6715e7f965b20e0a7fc6eb099534676 Mon Sep 17 00:00:00 2001
|
||||
From 98a6492a6e15d8b51e48189c1d71aa7f1dbf34f7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 10 Sep 2018 23:56:36 -0400
|
||||
Subject: [PATCH] Prevent Mob AI Rules from Loading Chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
index bf8ca9b32a..7ccb3d5c06 100644
|
||||
index bf8ca9b32..7ccb3d5c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
|
||||
@@ -12,11 +12,13 @@ public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
|
||||
@ -52,26 +52,27 @@ index bf8ca9b32a..7ccb3d5c06 100644
|
||||
return ichunkaccess == null ? false : ichunkaccess.getType(blockposition).getBlock() == this.g && ichunkaccess.getType(blockposition.up()).isAir() && ichunkaccess.getType(blockposition.up(2)).isAir();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RandomPositionGenerator.java b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
index 6e4da70b7e..643dc0241d 100644
|
||||
index d4cd50918..d6a3b9933 100644
|
||||
--- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
|
||||
@@ -99,6 +99,7 @@ public class RandomPositionGenerator {
|
||||
@@ -109,6 +109,7 @@ public class RandomPositionGenerator {
|
||||
}
|
||||
|
||||
blockposition2 = new BlockPosition((double) l + entitycreature.locX, (double) i1 + entitycreature.locY, (double) j1 + entitycreature.locZ);
|
||||
blockposition2 = new BlockPosition((double) k1 + entitycreature.locX(), (double) l1 + entitycreature.locY(), (double) i2 + entitycreature.locZ());
|
||||
+ if (!entitycreature.world.isLoaded(blockposition2)) continue; // Paper
|
||||
if ((!flag1 || entitycreature.a(blockposition2)) && navigationabstract.a(blockposition2)) {
|
||||
if (!flag) {
|
||||
blockposition2 = a(blockposition2, entitycreature);
|
||||
@@ -165,6 +166,7 @@ public class RandomPositionGenerator {
|
||||
if (blockposition2.getY() >= 0 && blockposition2.getY() <= entitycreature.world.getBuildHeight() && (!flag3 || entitycreature.a(blockposition2)) && (!flag2 || navigationabstract.a(blockposition2))) {
|
||||
if (flag1) {
|
||||
blockposition2 = a(blockposition2, random.nextInt(l + 1) + i1, entitycreature.world.getBuildHeight(), (blockposition3) -> {
|
||||
@@ -116,7 +117,8 @@ public class RandomPositionGenerator {
|
||||
});
|
||||
}
|
||||
|
||||
private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) {
|
||||
- return entitycreature.world.getFluid(blockposition).a(TagsFluid.WATER);
|
||||
+ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition); // Paper
|
||||
+ return fluid != null && fluid.a(TagsFluid.WATER); // Paper
|
||||
}
|
||||
}
|
||||
- if (flag || !entitycreature.world.getFluid(blockposition2).a(TagsFluid.WATER)) {
|
||||
+ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition2); // Paper
|
||||
+ if (flag || (fluid != null && !fluid.a(TagsFluid.WATER))) { // Paper
|
||||
PathType pathtype = PathfinderNormal.b(entitycreature.world, blockposition2.getX(), blockposition2.getY(), blockposition2.getZ());
|
||||
|
||||
if (entitycreature.a(pathtype) == 0.0F) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f7605c9bff97df59f2c1358da42b9323c190506f Mon Sep 17 00:00:00 2001
|
||||
From 9df1428b0a73a35c6958d1019b4c4c85fbf503ff Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 12 Sep 2018 21:12:57 -0400
|
||||
Subject: [PATCH] Prevent mob spawning from loading/generating chunks
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Prevent mob spawning from loading/generating chunks
|
||||
also prevents if out of world border bounds
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
index 30da877d53..c6ea37ffbd 100644
|
||||
index 487114367..bcca7faed 100644
|
||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||
@@ -25,9 +25,9 @@ public final class SpawnerCreature {
|
||||
@ -23,13 +23,13 @@ index 30da877d53..c6ea37ffbd 100644
|
||||
|
||||
@@ -55,7 +55,7 @@ public final class SpawnerCreature {
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.e((double) f, (double) k, (double) f1);
|
||||
double d0 = entityhuman.g((double) f, (double) k, (double) f1);
|
||||
|
||||
- if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D)) {
|
||||
+ if (d0 > 576.0D && !blockposition.a((IPosition) (new Vec3D((double) f, (double) k, (double) f1)), 24.0D) && world.isLoadedAndInBounds(blockposition_mutableblockposition)) { // Paper - don't load chunks for mob spawn
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition_mutableblockposition);
|
||||
|
||||
if (Objects.equals(chunkcoordintpair, chunk.getPos()) || world.getChunkProvider().a(chunkcoordintpair)) {
|
||||
if (Objects.equals(chunkcoordintpair, chunk.getPos()) || worldserver.getChunkProvider().a(chunkcoordintpair)) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a1855af5bfbd26f05e23c83c4c1c8accd9b8aa08 Mon Sep 17 00:00:00 2001
|
||||
From 91a26f5f31fbdf3cf220efe39c89eb72e51ecbf2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 12 Sep 2018 21:47:01 -0400
|
||||
Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
|
||||
@ -6,28 +6,28 @@ Subject: [PATCH] Optimize Biome Mob Lookups for Mob Spawning
|
||||
Uses an EnumMap as well as a Set paired List for O(1) contains calls.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index 65daa76bc1..a86ece8344 100644
|
||||
index 253890e53..0102a170d 100644
|
||||
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
@@ -39,7 +39,7 @@ public abstract class BiomeBase {
|
||||
protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureConfigured<?>>> r = Maps.newHashMap();
|
||||
protected final List<WorldGenFeatureConfigured<?>> s = Lists.newArrayList();
|
||||
@@ -40,7 +40,7 @@ public abstract class BiomeBase {
|
||||
protected final Map<WorldGenStage.Decoration, List<WorldGenFeatureConfigured<?, ?>>> r = Maps.newHashMap();
|
||||
protected final List<WorldGenFeatureConfigured<?, ?>> s = Lists.newArrayList();
|
||||
protected final Map<StructureGenerator<?>, WorldGenFeatureConfiguration> t = Maps.newHashMap();
|
||||
- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> u = Maps.newHashMap();
|
||||
+ private final java.util.EnumMap<EnumCreatureType, List<BiomeBase.BiomeMeta>> u = Maps.newEnumMap(EnumCreatureType.class); // Paper
|
||||
private final ThreadLocal<Long2FloatLinkedOpenHashMap> v = ThreadLocal.withInitial(() -> {
|
||||
- private final Map<EnumCreatureType, List<BiomeBase.BiomeMeta>> v = Maps.newHashMap();
|
||||
+ private final java.util.EnumMap<EnumCreatureType, List<BiomeBase.BiomeMeta>> v = Maps.newEnumMap(EnumCreatureType.class); // Paper
|
||||
private final ThreadLocal<Long2FloatLinkedOpenHashMap> w = ThreadLocal.withInitial(() -> {
|
||||
return (Long2FloatLinkedOpenHashMap) SystemUtils.a(() -> {
|
||||
Long2FloatLinkedOpenHashMap long2floatlinkedopenhashmap = new Long2FloatLinkedOpenHashMap(1024, 0.25F) {
|
||||
@@ -96,7 +96,7 @@ public abstract class BiomeBase {
|
||||
@@ -92,7 +92,7 @@ public abstract class BiomeBase {
|
||||
for (j = 0; j < i; ++j) {
|
||||
EnumCreatureType enumcreaturetype = aenumcreaturetype[j];
|
||||
|
||||
- this.u.put(enumcreaturetype, Lists.newArrayList());
|
||||
+ this.u.put(enumcreaturetype, new MobList()); // Paper
|
||||
- this.v.put(enumcreaturetype, Lists.newArrayList());
|
||||
+ this.v.put(enumcreaturetype, new MobList()); // Paper
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -324,6 +324,38 @@ public abstract class BiomeBase {
|
||||
@@ -327,6 +327,38 @@ public abstract class BiomeBase {
|
||||
return this.m;
|
||||
}
|
||||
|
||||
@ -67,5 +67,5 @@ index 65daa76bc1..a86ece8344 100644
|
||||
|
||||
@Nullable
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5015d83a985138b9e361b014247e9b1ba72ff012 Mon Sep 17 00:00:00 2001
|
||||
From 253390f4641cc1babe1d2d77815a1308708f91c3 Mon Sep 17 00:00:00 2001
|
||||
From: Tassu <git@tassu.me>
|
||||
Date: Thu, 13 Sep 2018 08:45:21 +0300
|
||||
Subject: [PATCH] Implement furnace cook speed multiplier API
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Implement furnace cook speed multiplier API
|
||||
Signed-off-by: Tassu <git@tassu.me>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
||||
index 2bbd3663a7..55b5646103 100644
|
||||
index 0419aea92..04849c3da 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
|
||||
@@ -8,6 +8,7 @@ import java.util.Map;
|
||||
@ -57,7 +57,7 @@ index 2bbd3663a7..55b5646103 100644
|
||||
this.cookTimeTotal = this.getRecipeCookingTime();
|
||||
this.burn(irecipe);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
|
||||
index 9cc67915ca..1ce10ea049 100644
|
||||
index 9cc67915c..1ce10ea04 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
|
||||
@@ -63,4 +63,18 @@ public class CraftFurnace<T extends TileEntityFurnace> extends CraftContainer<T>
|
||||
@ -80,5 +80,5 @@ index 9cc67915ca..1ce10ea049 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 044c8aa6b91e58d8fc010647b88818f4b52ec6d7 Mon Sep 17 00:00:00 2001
|
||||
From 0eed64a0b976bed022de7e3687e5ba6b90175684 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 17 Sep 2018 23:05:31 -0400
|
||||
Subject: [PATCH] Support Overriding World Seeds
|
||||
@ -15,7 +15,7 @@ This seed will end up being saved to the world data file, so it is
|
||||
a permanent change in that it won't go back if you remove it from paper.yml
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index a13c8c68b6..ea3695b021 100644
|
||||
index 214b577b3..559e6b42b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -11,6 +11,7 @@ import java.lang.reflect.Modifier;
|
||||
@ -25,8 +25,8 @@ index a13c8c68b6..ea3695b021 100644
|
||||
+import java.util.Set;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -20,6 +21,7 @@ import com.google.common.collect.Lists;
|
||||
import java.util.regex.Pattern;
|
||||
@@ -19,6 +20,7 @@ import com.google.common.collect.Lists;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.Command;
|
||||
@ -34,7 +34,7 @@ index a13c8c68b6..ea3695b021 100644
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
import org.bukkit.configuration.file.YamlConfiguration;
|
||||
import co.aikar.timings.Timings;
|
||||
@@ -334,4 +336,23 @@ public class PaperConfig {
|
||||
@@ -310,4 +312,23 @@ public class PaperConfig {
|
||||
}
|
||||
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
|
||||
}
|
||||
@ -59,10 +59,10 @@ index a13c8c68b6..ea3695b021 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 8b08ebb7d5..ab72e5cd36 100644
|
||||
index 206a4ad64..ec575bc8f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -372,7 +372,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -377,7 +377,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.convertWorld(name); // Run conversion now
|
||||
|
||||
org.bukkit.generator.ChunkGenerator gen = this.server.getGenerator(name);
|
||||
@ -72,10 +72,10 @@ index 8b08ebb7d5..ab72e5cd36 100644
|
||||
|
||||
if (j == 0) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldData.java b/src/main/java/net/minecraft/server/WorldData.java
|
||||
index cbf10c0bce..ca4c314589 100644
|
||||
index 2d4691b7b..4e35846a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldData.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldData.java
|
||||
@@ -115,7 +115,7 @@ public class WorldData {
|
||||
@@ -116,7 +116,7 @@ public class WorldData {
|
||||
this.d = nbttagcompound2.getBoolean("Snapshot");
|
||||
}
|
||||
|
||||
@ -85,10 +85,10 @@ index cbf10c0bce..ca4c314589 100644
|
||||
String s = nbttagcompound.getString("generatorName");
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 74cf88f8f0..b0f4ef1b48 100644
|
||||
index 8636283fd..1ca9a7724 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -990,7 +990,7 @@ public final class CraftServer implements Server {
|
||||
@@ -991,7 +991,7 @@ public final class CraftServer implements Server {
|
||||
WorldSettings worldSettings;
|
||||
// See MinecraftServer.a(String, String, long, WorldType, JsonElement)
|
||||
if (worlddata == null) {
|
||||
@ -98,5 +98,5 @@ index 74cf88f8f0..b0f4ef1b48 100644
|
||||
if (parsedSettings.isJsonObject()) {
|
||||
worldSettings.setGeneratorSettings(parsedSettings.getAsJsonObject());
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7fca1b3434f57de370ca948b5d846262a058c9bb Mon Sep 17 00:00:00 2001
|
||||
From 1f1b2b4fe376c15fb7fb86336dea14e707193662 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 17 Sep 2018 23:37:31 -0400
|
||||
Subject: [PATCH] Optimize Server World Map
|
||||
@ -21,7 +21,7 @@ known NMS used methods, but we can add more if naughty plugins are found later.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldMap.java b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java
|
||||
new file mode 100644
|
||||
index 0000000000..6bb2f98b45
|
||||
index 000000000..6bb2f98b4
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldMap.java
|
||||
@@ -0,0 +1,191 @@
|
||||
@ -217,7 +217,7 @@ index 0000000000..6bb2f98b45
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index de423de63b..a5447c6501 100644
|
||||
index ec575bc8f..3120f91de 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -88,7 +88,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@ -229,7 +229,7 @@ index de423de63b..a5447c6501 100644
|
||||
private PlayerList playerList;
|
||||
private volatile boolean isRunning = true;
|
||||
private volatile boolean isRestarting = false; // Paper - flag to signify we're attempting to restart
|
||||
@@ -451,7 +451,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -458,7 +458,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
}
|
||||
this.a(this.getDifficulty(), true);
|
||||
@ -238,7 +238,7 @@ index de423de63b..a5447c6501 100644
|
||||
this.loadSpawn(worldserver.getChunkProvider().playerChunkMap.worldLoadListener, worldserver);
|
||||
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
|
||||
}
|
||||
@@ -598,7 +598,6 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -606,7 +606,6 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// this.nextTick = SystemUtils.getMonotonicMillis() + 10L;
|
||||
this.executeModerately();
|
||||
// Iterator iterator = DimensionManager.a().iterator();
|
||||
@ -247,5 +247,5 @@ index de423de63b..a5447c6501 100644
|
||||
DimensionManager dimensionmanager = worldserver.worldProvider.getDimensionManager();
|
||||
ForcedChunk forcedchunk = (ForcedChunk) worldserver.getWorldPersistentData().b(ForcedChunk::new, "chunks");
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ddb688632f12d31fd2699f1af36ad123f4a0a153 Mon Sep 17 00:00:00 2001
|
||||
From bf51abc6cd8762190a3fdfd17d8812ad2678002f Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Tue, 18 Sep 2018 23:53:23 +0100
|
||||
Subject: [PATCH] PreSpawnerSpawnEvent
|
||||
@ -9,10 +9,10 @@ SpawnerSpawnEvent gets called instead of the CreatureSpawnEvent for
|
||||
spawners.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 6f5d8b0315..079099e308 100644
|
||||
index fe8bc7f75..90ca1ee14 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -110,11 +110,11 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -111,11 +111,11 @@ public abstract class MobSpawnerAbstract {
|
||||
|
||||
org.bukkit.entity.EntityType type = org.bukkit.entity.EntityType.fromName(key);
|
||||
if (type != null) {
|
||||
@ -28,5 +28,5 @@ index 6f5d8b0315..079099e308 100644
|
||||
if (!event.callEvent()) {
|
||||
flag = true;
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a58127d969be71a3373e822df2131aa53a36b9c1 Mon Sep 17 00:00:00 2001
|
||||
From d0753d8956404e8627cbd646846915a2d24b124c Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Sat, 22 Sep 2018 15:56:59 -0400
|
||||
Subject: [PATCH] Catch JsonParseException in Entity and TE names
|
||||
@ -13,24 +13,24 @@ Shulkers) may need to be changed in order for it to re-save properly
|
||||
No more crashing though.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
index 6d85cd508e..23a69ba571 100644
|
||||
index e6bf34ab0..c447cf1ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/CommandBlockListenerAbstract.java
|
||||
@@ -56,7 +56,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
@@ -59,7 +59,7 @@ public abstract class CommandBlockListenerAbstract implements ICommandListener {
|
||||
this.command = nbttagcompound.getString("Command");
|
||||
this.successCount = nbttagcompound.getInt("SuccessCount");
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
- this.customName = IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName"));
|
||||
+ this.customName = MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound); // Paper - Catch ParseException
|
||||
- this.setName(IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")));
|
||||
+ this.setName(MCUtil.getBaseComponentFromNbt("CustomName", nbttagcompound)); // Paper - Catch ParseException
|
||||
}
|
||||
|
||||
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
|
||||
index f9b097fd6f..4833a9652a 100644
|
||||
index b03316bc8..5d31068d7 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1701,7 +1701,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.setPosition(this.locX, this.locY, this.locZ);
|
||||
@@ -1679,7 +1679,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.Z();
|
||||
this.setYawPitch(this.yaw, this.pitch);
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
- this.setCustomName(IChatBaseComponent.ChatSerializer.a(nbttagcompound.getString("CustomName")));
|
||||
@ -39,7 +39,7 @@ index f9b097fd6f..4833a9652a 100644
|
||||
|
||||
this.setCustomNameVisible(nbttagcompound.getBoolean("CustomNameVisible"));
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
index 6d278a0da5..ec3732193f 100644
|
||||
index 6d278a0da..ec3732193 100644
|
||||
--- a/src/main/java/net/minecraft/server/MCUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -339,4 +339,19 @@ public final class MCUtil {
|
||||
@ -63,10 +63,10 @@ index 6d278a0da5..ec3732193f 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityBanner.java b/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
index 560330ba05..bfc58a7754 100644
|
||||
index 21a2415fb..7a911c5a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityBanner.java
|
||||
@@ -57,7 +57,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity {
|
||||
@@ -59,7 +59,7 @@ public class TileEntityBanner extends TileEntity implements INamableTileEntity {
|
||||
public void load(NBTTagCompound nbttagcompound) {
|
||||
super.load(nbttagcompound);
|
||||
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
|
||||
@ -76,7 +76,7 @@ index 560330ba05..bfc58a7754 100644
|
||||
|
||||
if (this.hasWorld()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntityContainer.java b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
index 473ec2cbde..ab6b86e4e9 100644
|
||||
index 473ec2cbd..ab6b86e4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityContainer.java
|
||||
@@ -17,7 +17,7 @@ public abstract class TileEntityContainer extends TileEntity implements IInvento
|
||||
@ -89,5 +89,5 @@ index 473ec2cbde..ab6b86e4e9 100644
|
||||
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 40b719adffacc70145b5dbf5d85a72ae16cb3ab3 Mon Sep 17 00:00:00 2001
|
||||
From dee157487f5d414b061a794695a77f9a9b7d608a Mon Sep 17 00:00:00 2001
|
||||
From: Brokkonaut <hannos17@gmx.de>
|
||||
Date: Tue, 25 Sep 2018 06:53:43 +0200
|
||||
Subject: [PATCH] Avoid dimension id collisions
|
||||
@ -8,10 +8,10 @@ we would reuse an existing dimension id, if some other dimension was
|
||||
unloaded before.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b0f4ef1b48..d0834ecaab 100644
|
||||
index 1ca9a7724..e1c9a9e12 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -976,7 +976,7 @@ public final class CraftServer implements Server {
|
||||
@@ -977,7 +977,7 @@ public final class CraftServer implements Server {
|
||||
boolean used = false;
|
||||
do {
|
||||
for (WorldServer server : console.getWorlds()) {
|
||||
@ -21,5 +21,5 @@ index b0f4ef1b48..d0834ecaab 100644
|
||||
dimension++;
|
||||
break;
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From eb84a6f42dcb8f78011c1ee226fccf9b8b0de9af Mon Sep 17 00:00:00 2001
|
||||
From ea4806f775effd2a9c1215f777d111d66136048f Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 23 Sep 2018 20:59:53 -0500
|
||||
Subject: [PATCH] Honor EntityAgeable.ageLock
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityAgeable.java b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
index da9740a99e..e87754ef33 100644
|
||||
index cec938436..3d27f0964 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityAgeable.java
|
||||
@@ -85,6 +85,7 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||
@@ -101,6 +101,7 @@ public abstract class EntityAgeable extends EntityCreature {
|
||||
}
|
||||
|
||||
public void setAge(int i, boolean flag) {
|
||||
@ -17,5 +17,5 @@ index da9740a99e..e87754ef33 100644
|
||||
int k = j;
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From d68529932751226e348fd0d0a70944b5d377471c Mon Sep 17 00:00:00 2001
|
||||
From c8494207b2d8832450cbc1ffcdef06b06b67b764 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Tue, 2 Oct 2018 09:57:50 +0100
|
||||
Subject: [PATCH] Configurable connection throttle kick message
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index ea3695b021..d2c039ea2f 100644
|
||||
index 559e6b42b..092bff78a 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -275,6 +275,11 @@ public class PaperConfig {
|
||||
@@ -274,6 +274,11 @@ public class PaperConfig {
|
||||
authenticationServersDownKickMessage = Strings.emptyToNull(getString("messages.kick.authentication-servers-down", authenticationServersDownKickMessage));
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ index ea3695b021..d2c039ea2f 100644
|
||||
private static void savePlayerData() {
|
||||
savePlayerData = getBoolean("settings.save-player-data", savePlayerData);
|
||||
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
index 740c8d2728..9a8e5e1213 100644
|
||||
index 8928d93e4..0532f975b 100644
|
||||
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
|
||||
@@ -38,7 +38,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
|
||||
@ -34,5 +34,5 @@ index 740c8d2728..9a8e5e1213 100644
|
||||
this.b.close(chatmessage);
|
||||
return;
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 02060c548e5b7d6bf496c45852af3eb2e5b68aed Mon Sep 17 00:00:00 2001
|
||||
From c1dff6a365bdb99e77f4a3368d97154e430f6eb8 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Wed, 3 Oct 2018 20:09:18 -0400
|
||||
Subject: [PATCH] Hook into CB plugin rewrites
|
||||
@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
||||
debugging in an IDE pre-relocate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 467b2d9385..61f1023557 100644
|
||||
index 467b2d938..61f102355 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -6,7 +6,9 @@ import java.io.FileOutputStream;
|
||||
@ -187,5 +187,5 @@ index 467b2d9385..61f1023557 100644
|
||||
{
|
||||
if ( owner.equals( "org/bukkit/Material" ) )
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From ee9f9908fd798f679cf6abb2f07048c9a24ac6c5 Mon Sep 17 00:00:00 2001
|
||||
From f0c8d8c630bd407f3a3d028b5482d0c73fe1e0d6 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 6 Oct 2018 21:47:44 -0500
|
||||
Subject: [PATCH] Allow setting the vex's summoner
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVex.java b/src/main/java/net/minecraft/server/EntityVex.java
|
||||
index 25aea53150..51c05376da 100644
|
||||
index a46730460..cf274666c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVex.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVex.java
|
||||
@@ -133,6 +133,7 @@ public class EntityVex extends EntityMonster {
|
||||
@ -17,7 +17,7 @@ index 25aea53150..51c05376da 100644
|
||||
this.c = entityinsentient;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||
index 169c951ec3..2f7df3074f 100644
|
||||
index 169c951ec..2f7df3074 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
|
||||
@@ -23,6 +23,10 @@ public class CraftVex extends CraftMonster implements Vex {
|
||||
@ -32,5 +32,5 @@ index 169c951ec3..2f7df3074f 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,38 +1,38 @@
|
||||
From 0c04ae960b9a3046050c46705f321599882c1353 Mon Sep 17 00:00:00 2001
|
||||
From 97dd941a53daeecad5edbeb9e55cd4d5c858e6b3 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 Oct 2018 00:54:21 -0500
|
||||
Subject: [PATCH] Add sun related API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index a14d490ade..09112a8b0e 100644
|
||||
index eadac07f6..cbaed08f5 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -1327,6 +1327,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1334,6 +1334,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
return flag;
|
||||
}
|
||||
|
||||
+ public boolean isInDaylight() { return this.dS(); } // Paper - OBFHELPER
|
||||
protected boolean dS() {
|
||||
+ public boolean isInDaylight() { return this.en(); } // Paper - OBFHELPER
|
||||
protected boolean en() {
|
||||
if (this.world.J() && !this.world.isClientSide) {
|
||||
float f = this.aF();
|
||||
float f = this.aI();
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index c60279da8f..1c3285f5c0 100644
|
||||
index 9c23060bb..8e3367435 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -705,6 +705,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -619,6 +619,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean isDayTime() { return J(); } // Paper - OBFHELPER
|
||||
public boolean J() {
|
||||
return this.u < 4;
|
||||
return this.worldProvider.getDimensionManager() == DimensionManager.OVERWORLD && this.c < 4;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index dc0a07c7cd..78a2c47c5a 100644
|
||||
index 182322752..578fe8d19 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -840,6 +840,13 @@ public class CraftWorld implements World {
|
||||
@@ -855,6 +855,13 @@ public class CraftWorld implements World {
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index dc0a07c7cd..78a2c47c5a 100644
|
||||
public boolean createExplosion(double x, double y, double z, float power) {
|
||||
return createExplosion(x, y, z, power, false, true);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
index 53c2d154ed..56c233872b 100644
|
||||
index 53c2d154e..56c233872 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
|
||||
@@ -68,4 +68,11 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
|
||||
@ -63,5 +63,5 @@ index 53c2d154ed..56c233872b 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,22 +1,22 @@
|
||||
From f1045e50a6d0e1f641e87f570c4788665cd991e0 Mon Sep 17 00:00:00 2001
|
||||
From ddc7cc6102fac211c5920f559f1b9262cacdc429 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Wed, 10 Oct 2018 21:22:44 -0500
|
||||
Subject: [PATCH] Check Drowned for Villager Aggression Config
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityDrowned.java b/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
index fd10cf318a..6f0094e6dc 100644
|
||||
index 255b3d0cd..3a1928b22 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityDrowned.java
|
||||
@@ -29,7 +29,7 @@ public class EntityDrowned extends EntityZombie implements IRangedEntity {
|
||||
this.goalSelector.a(7, new PathfinderGoalRandomStroll(this, 1.0D));
|
||||
this.targetSelector.a(1, (new PathfinderGoalHurtByTarget(this, new Class[]{EntityDrowned.class})).a(EntityPigZombie.class));
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::h));
|
||||
this.targetSelector.a(2, new PathfinderGoalNearestAttackableTarget<>(this, EntityHuman.class, 10, true, false, this::i));
|
||||
- this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false));
|
||||
+ if ( world.spigotConfig.zombieAggressiveTowardsVillager ) this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, false)); // Paper
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
|
||||
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bz));
|
||||
this.targetSelector.a(5, new PathfinderGoalNearestAttackableTarget<>(this, EntityTurtle.class, 10, true, false, EntityTurtle.bw));
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,24 +1,24 @@
|
||||
From 186a68036e63b03e928028f0bdd395b904103c7e Mon Sep 17 00:00:00 2001
|
||||
From b2d086efee4196e70746de334a8c1d94383ea371 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 12 Oct 2018 01:37:22 -0500
|
||||
Subject: [PATCH] Here's Johnny!
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index 06918b8c91..ffbd6e9269 100644
|
||||
index 73ecdd22e..c974c02e9 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -11,7 +11,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
private static final Predicate<EnumDifficulty> b = (enumdifficulty) -> {
|
||||
return enumdifficulty == EnumDifficulty.NORMAL || enumdifficulty == EnumDifficulty.HARD;
|
||||
};
|
||||
- private boolean bz;
|
||||
+ private boolean bz; public boolean isJohnny() { return bz; } public void setJohnny(boolean johnny) { bz = johnny; } // Paper - OBFHELPER
|
||||
- private boolean bw;
|
||||
+ private boolean bw; public boolean isJohnny() { return bw; } public void setJohnny(boolean johnny) { bw = johnny; } // Paper - OBFHELPER
|
||||
|
||||
public EntityVindicator(EntityTypes<? extends EntityVindicator> entitytypes, World world) {
|
||||
super(entitytypes, world);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
|
||||
index 951d479298..5ff957ced7 100644
|
||||
index 951d47929..5ff957ced 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
|
||||
@@ -25,4 +25,14 @@ public class CraftVindicator extends CraftIllager implements Vindicator {
|
||||
@ -37,5 +37,5 @@ index 951d479298..5ff957ced7 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,84 +1,84 @@
|
||||
From de12d9eb27172c21844363f2e66700833e43290f Mon Sep 17 00:00:00 2001
|
||||
From 12c4f15acb42676902c300c55bfb56bf8d025f3b Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 29 Sep 2018 16:08:23 -0500
|
||||
Subject: [PATCH] Turtle API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
|
||||
index 594cc70def..0bd80e5623 100644
|
||||
index 76296119a..dd02cb348 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
|
||||
@@ -26,51 +26,63 @@ public class EntityTurtle extends EntityAnimal {
|
||||
this.K = 1.0F;
|
||||
@@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal {
|
||||
this.H = 1.0F;
|
||||
}
|
||||
|
||||
+ public final void setHome(BlockPosition pos) { g(pos); } // Paper - OBFHELPER
|
||||
public void g(BlockPosition blockposition) {
|
||||
this.datawatcher.set(EntityTurtle.bA, blockposition);
|
||||
this.datawatcher.set(EntityTurtle.bx, blockposition);
|
||||
}
|
||||
|
||||
+ public final BlockPosition getHome() { return this.dX(); } // Paper - OBFHELPER
|
||||
private BlockPosition dX() {
|
||||
return (BlockPosition) this.datawatcher.get(EntityTurtle.bA);
|
||||
+ public final BlockPosition getHome() { return this.es(); } // Paper - OBFHELPER
|
||||
private BlockPosition es() {
|
||||
return (BlockPosition) this.datawatcher.get(EntityTurtle.bx);
|
||||
}
|
||||
|
||||
+ public final void setTravelPos(BlockPosition pos) { this.h(pos); } // Paper - OBFHELPER
|
||||
private void h(BlockPosition blockposition) {
|
||||
this.datawatcher.set(EntityTurtle.bD, blockposition);
|
||||
this.datawatcher.set(EntityTurtle.bA, blockposition);
|
||||
}
|
||||
|
||||
+ public final BlockPosition getTravelPos() { return this.dY(); } // Paper - OBFHELPER
|
||||
private BlockPosition dY() {
|
||||
return (BlockPosition) this.datawatcher.get(EntityTurtle.bD);
|
||||
+ public final BlockPosition getTravelPos() { return this.et(); } // Paper - OBFHELPER
|
||||
private BlockPosition et() {
|
||||
return (BlockPosition) this.datawatcher.get(EntityTurtle.bA);
|
||||
}
|
||||
|
||||
+ public final boolean hasEgg() { return this.dV(); } // Paper - OBFHELPER
|
||||
public boolean dV() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bB);
|
||||
+ public final boolean hasEgg() { return this.eq(); } // Paper - OBFHELPER
|
||||
public boolean eq() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.by);
|
||||
}
|
||||
|
||||
+ public final void setHasEgg(boolean hasEgg) { this.r(hasEgg); } // Paper - OBFHELPER
|
||||
private void r(boolean flag) {
|
||||
this.datawatcher.set(EntityTurtle.bB, flag);
|
||||
this.datawatcher.set(EntityTurtle.by, flag);
|
||||
}
|
||||
|
||||
+ public final boolean isDigging() { return this.dW(); } // Paper - OBFHELPER
|
||||
public boolean dW() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bC);
|
||||
+ public final boolean isDigging() { return this.er(); } // Paper - OBFHELPER
|
||||
public boolean er() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bz);
|
||||
}
|
||||
|
||||
+ public final void setDigging(boolean digging) { this.s(digging); } // Paper - OBFHELPER
|
||||
private void s(boolean flag) {
|
||||
this.bG = flag ? 1 : 0;
|
||||
this.datawatcher.set(EntityTurtle.bC, flag);
|
||||
this.bD = flag ? 1 : 0;
|
||||
this.datawatcher.set(EntityTurtle.bz, flag);
|
||||
}
|
||||
|
||||
+ public final boolean isGoingHome() { return this.dZ(); } // Paper - OBFHELPER
|
||||
private boolean dZ() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bE);
|
||||
+ public final boolean isGoingHome() { return this.eu(); } // Paper - OBFHELPER
|
||||
private boolean eu() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bB);
|
||||
}
|
||||
|
||||
+ public final void setGoingHome(boolean goingHome) { this.t(goingHome); } // Paper - OBFHELPER
|
||||
private void t(boolean flag) {
|
||||
this.datawatcher.set(EntityTurtle.bE, flag);
|
||||
this.datawatcher.set(EntityTurtle.bB, flag);
|
||||
}
|
||||
|
||||
+ public final boolean isTravelling() { return this.ee(); } // Paper - OBFHELPER
|
||||
private boolean ee() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bF);
|
||||
+ public final boolean isTravelling() { return this.ez(); } // Paper - OBFHELPER
|
||||
private boolean ez() {
|
||||
return (Boolean) this.datawatcher.get(EntityTurtle.bC);
|
||||
}
|
||||
|
||||
+ public final void setTravelling(boolean travelling) { this.u(travelling); } // Paper - OBFHELPER
|
||||
private void u(boolean flag) {
|
||||
this.datawatcher.set(EntityTurtle.bF, flag);
|
||||
this.datawatcher.set(EntityTurtle.bC, flag);
|
||||
}
|
||||
@@ -441,14 +453,17 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -443,14 +455,17 @@ public class EntityTurtle extends EntityAnimal {
|
||||
|
||||
if (!this.g.isInWater() && this.k()) {
|
||||
if (this.g.bG < 1) {
|
||||
if (this.g.bD < 1) {
|
||||
- this.g.s(true);
|
||||
+ this.g.setDigging(new com.destroystokyo.paper.event.entity.TurtleStartDiggingEvent((org.bukkit.entity.Turtle) this.g.getBukkitEntity(), MCUtil.toLocation(this.g.world, this.e)).callEvent()); // Paper
|
||||
} else if (this.g.bG > 200) {
|
||||
} else if (this.g.bD > 200) {
|
||||
World world = this.g.world;
|
||||
|
||||
// CraftBukkit start
|
||||
@ -93,17 +93,17 @@ index 594cc70def..0bd80e5623 100644
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.g.r(false);
|
||||
@@ -583,7 +598,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
@@ -585,7 +600,7 @@ public class EntityTurtle extends EntityAnimal {
|
||||
|
||||
@Override
|
||||
public boolean a() {
|
||||
- return this.a.isBaby() ? false : (this.a.dV() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dX().a((IPosition) this.a.getPositionVector(), 64.0D)));
|
||||
+ return this.a.isBaby() ? false : (this.a.dW() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.dY().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper
|
||||
- return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D)));
|
||||
+ return this.a.isBaby() ? false : (this.a.eq() ? true : (this.a.getRandom().nextInt(700) != 0 ? false : !this.a.es().a((IPosition) this.a.getPositionVector(), 64.0D))) && new com.destroystokyo.paper.event.entity.TurtleGoHomeEvent((org.bukkit.entity.Turtle) this.a.getBukkitEntity()).callEvent(); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
|
||||
index 123a2c75ca..8edcf7af65 100644
|
||||
index 123a2c75c..8edcf7af6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
|
||||
@@ -1,6 +1,8 @@
|
||||
@ -153,5 +153,5 @@ index 123a2c75ca..8edcf7af65 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,18 +1,17 @@
|
||||
From 14201322b20e2e04e8cd67161dae08b5527b4606 Mon Sep 17 00:00:00 2001
|
||||
From bbf14ec267b75fbde5ce1f4ebc529c36e19c2717 Mon Sep 17 00:00:00 2001
|
||||
From: Trigary <trigary0@gmail.com>
|
||||
Date: Fri, 14 Sep 2018 17:42:08 +0200
|
||||
Subject: [PATCH] Limit lightning strike effect distance
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4a4e9d715..3b24fbdbf 100644
|
||||
index e49318a19..fe3e78f36 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -239,6 +239,28 @@ public class PaperWorldConfig {
|
||||
skeleHorseSpawnChance = 0.01D; // Vanilla value
|
||||
@@ -240,6 +240,28 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
+
|
||||
|
||||
+ public double sqrMaxThunderDistance;
|
||||
+ public double sqrMaxLightningImpactSoundDistance;
|
||||
+ public double maxLightningFlashDistance;
|
||||
@ -34,16 +33,17 @@ index 4a4e9d715..3b24fbdbf 100644
|
||||
+ maxLightningFlashDistance = 512; // Vanilla value
|
||||
+ }
|
||||
+ }
|
||||
|
||||
+
|
||||
public int fixedInhabitedTime;
|
||||
private void fixedInhabitedTime() {
|
||||
if (PaperConfig.version < 16) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLightning.java b/src/main/java/net/minecraft/server/EntityLightning.java
|
||||
index 2ceee79cf..27bf271bb 100644
|
||||
index 7c518983a..0bd67395e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLightning.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLightning.java
|
||||
@@ -64,6 +64,17 @@ public class EntityLightning extends Entity {
|
||||
double deltaX = this.locX - player.locX;
|
||||
double deltaZ = this.locZ - player.locZ;
|
||||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
+ // Paper start - Limit lightning strike effect distance
|
||||
+ if (distanceSquared <= this.world.paperConfig.sqrMaxLightningImpactSoundDistance) {
|
||||
@ -58,29 +58,29 @@ index 2ceee79cf..27bf271bb 100644
|
||||
+ // Paper end
|
||||
if (distanceSquared > viewDistance * viewDistance) {
|
||||
double deltaLength = Math.sqrt(distanceSquared);
|
||||
double relativeX = player.locX + (deltaX / deltaLength) * viewDistance;
|
||||
double relativeX = player.locX() + (deltaX / deltaLength) * viewDistance;
|
||||
@@ -74,7 +85,7 @@ public class EntityLightning extends Entity {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
|
||||
+ //this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop)
|
||||
- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F);
|
||||
+ //this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_LIGHTNING_BOLT_IMPACT, SoundCategory.WEATHER, 2.0F, 0.5F + this.random.nextFloat() * 0.2F); // Paper - Limit lightning strike effect distance (the packet is now sent from inside the loop)
|
||||
}
|
||||
|
||||
--this.lifeTicks;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 8b55879c6..dbd357f1a 100644
|
||||
index a0c714129..ecfcecfdc 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1251,7 +1251,7 @@ public class WorldServer extends World {
|
||||
@@ -1250,7 +1250,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
// CraftBukkit end
|
||||
this.globalEntityList.add(entitylightning);
|
||||
- this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX, entitylightning.locY, entitylightning.locZ, 512.0D, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension
|
||||
+ this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX, entitylightning.locY, entitylightning.locZ, paperConfig.maxLightningFlashDistance, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension, limit lightning strike effect distance
|
||||
- this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), 512.0D, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension
|
||||
+ this.server.getPlayerList().sendPacketNearby((EntityHuman) null, entitylightning.locX(), entitylightning.locY(), entitylightning.locZ(), paperConfig.maxLightningFlashDistance, this, new PacketPlayOutSpawnEntityWeather(entitylightning)); // Paper - use world instead of dimension, limit lightning strike effect distance
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a58314dd18e49eda089384652ff34d7a44979f0e Mon Sep 17 00:00:00 2001
|
||||
From 2712bfcea985f2a16ab20b0bc1ecd45ec8732ee5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 17 Oct 2018 19:17:27 -0400
|
||||
Subject: [PATCH] MC-50319: Check other worlds for shooter of projectiles
|
||||
@ -11,12 +11,12 @@ If the projectile fails to find the shooter in the current world, check
|
||||
other worlds.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
index f2f4b2d929..18d28a151a 100644
|
||||
index 9eed1dce3..6c091b680 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
@@ -213,11 +213,21 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
@@ -209,6 +209,16 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
public EntityLiving getShooter() {
|
||||
if (this.shooter == null && this.shooterId != null && this.world instanceof WorldServer) {
|
||||
if ((this.shooter == null || this.shooter.dead) && this.shooterId != null && this.world instanceof WorldServer) {
|
||||
Entity entity = ((WorldServer) this.world).getEntity(this.shooterId);
|
||||
+ // Paper start - MC-50319 - shooter might be in another world (arrows through portals)
|
||||
+ if (entity == null) {
|
||||
@ -31,12 +31,6 @@ index f2f4b2d929..18d28a151a 100644
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
this.shooter = (EntityLiving) entity;
|
||||
} else {
|
||||
- this.shooterId = null;
|
||||
+ //this.shooterId = null; // Paper - don't unset shooterId
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,23 +1,23 @@
|
||||
From 4d2f78285608aa6230d078f39bb3f4f6a85735b9 Mon Sep 17 00:00:00 2001
|
||||
From c3dbf581a251e2eef711756f72f023013dae9245 Mon Sep 17 00:00:00 2001
|
||||
From: Caleb Bassham <caleb.bassham@gmail.com>
|
||||
Date: Fri, 28 Sep 2018 02:32:19 -0500
|
||||
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
|
||||
index 898089983..ad5dcab78 100644
|
||||
index 26096afbe..bdb73b68a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private EnumChatVisibility ck;
|
||||
private boolean cl = true;
|
||||
private long cm = SystemUtils.getMonotonicMillis();
|
||||
private EnumChatVisibility ch;
|
||||
private boolean ci = true;
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
- private Entity spectatedEntity;
|
||||
+ private Entity spectatedEntity; private void setSpectatorTargetField(Entity e) { this.spectatedEntity = e; } // Paper - OBFHELPER
|
||||
public boolean worldChangeInvuln;
|
||||
private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
||||
private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook;
|
||||
@@ -1581,15 +1581,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1556,15 +1556,35 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
return (Entity) (this.spectatedEntity == null ? this : this.spectatedEntity);
|
||||
}
|
||||
|
||||
@ -29,7 +29,7 @@ index 898089983..ad5dcab78 100644
|
||||
- this.spectatedEntity = (Entity) (entity == null ? this : entity);
|
||||
- if (entity1 != this.spectatedEntity) {
|
||||
- this.playerConnection.sendPacket(new PacketPlayOutCamera(this.spectatedEntity));
|
||||
- this.playerConnection.a(this.spectatedEntity.locX, this.spectatedEntity.locY, this.spectatedEntity.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
- this.playerConnection.a(this.spectatedEntity.locX(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
+ if (newSpectatorTarget == null) {
|
||||
+ newSpectatorTarget = this;
|
||||
}
|
||||
@ -53,11 +53,19 @@ index 898089983..ad5dcab78 100644
|
||||
+ setSpectatorTargetField(newSpectatorTarget);
|
||||
+
|
||||
+ this.playerConnection.sendPacket(new PacketPlayOutCamera(newSpectatorTarget));
|
||||
+ this.playerConnection.a(this.spectatedEntity.locX, this.spectatedEntity.locY, this.spectatedEntity.locZ, this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
+ this.playerConnection.a(this.spectatedEntity.locY(), this.spectatedEntity.locY(), this.spectatedEntity.locZ(), this.yaw, this.pitch, TeleportCause.SPECTATE); // CraftBukkit
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.23.0
|
||||
@@ -1572,7 +1592,6 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
if (this.portalCooldown > 0 && !this.worldChangeInvuln) {
|
||||
--this.portalCooldown;
|
||||
}
|
||||
-
|
||||
}
|
||||
|
||||
@Override
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2a1652d5c16477c05e7937b1df54b8c091267a63 Mon Sep 17 00:00:00 2001
|
||||
From 520dedf2e368085a97f21d0490d96ba949b7c2b4 Mon Sep 17 00:00:00 2001
|
||||
From: Andrew Steinborn <git@steinborn.me>
|
||||
Date: Mon, 8 Oct 2018 14:36:14 -0400
|
||||
Subject: [PATCH] Add Velocity IP Forwarding Support
|
||||
@ -14,7 +14,7 @@ forwarding, and is integrated into the Minecraft login process by using the 1.13
|
||||
login plugin message packet.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index d2c039ea2f..63d8602927 100644
|
||||
index 092bff78a..7e85a0224 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -8,6 +8,7 @@ import java.io.IOException;
|
||||
@ -25,7 +25,7 @@ index d2c039ea2f..63d8602927 100644
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -246,7 +247,7 @@ public class PaperConfig {
|
||||
@@ -245,7 +246,7 @@ public class PaperConfig {
|
||||
}
|
||||
|
||||
public static boolean isProxyOnlineMode() {
|
||||
@ -34,7 +34,7 @@ index d2c039ea2f..63d8602927 100644
|
||||
}
|
||||
|
||||
public static int packetInSpamThreshold = 300;
|
||||
@@ -360,4 +361,18 @@ public class PaperConfig {
|
||||
@@ -336,4 +337,18 @@ public class PaperConfig {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -55,7 +55,7 @@ index d2c039ea2f..63d8602927 100644
|
||||
}
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java
|
||||
new file mode 100644
|
||||
index 0000000000..fdd8708f97
|
||||
index 000000000..fdd8708f9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/proxy/VelocityProxy.java
|
||||
@@ -0,0 +1,67 @@
|
||||
@ -127,7 +127,7 @@ index 0000000000..fdd8708f97
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
index d6befec184..41b2c90c3a 100644
|
||||
index a985ae7ba..c3d57461d 100644
|
||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
@@ -42,6 +42,7 @@ public class LoginListener implements PacketLoginInListener {
|
||||
@ -203,7 +203,7 @@ index d6befec184..41b2c90c3a 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 08e314af7c..046196d54d 100644
|
||||
index 08e314af7..046196d54 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -216,7 +216,7 @@ index 08e314af7c..046196d54d 100644
|
||||
public java.util.UUID spoofedUUID;
|
||||
public com.mojang.authlib.properties.Property[] spoofedProfile;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
index fa2d3ce8cb..dac560c63f 100644
|
||||
index 93ae6dcd7..fb9186b3f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
@@ -140,6 +140,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||
@ -244,7 +244,7 @@ index fa2d3ce8cb..dac560c63f 100644
|
||||
int j = this.i();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
|
||||
index 4d1f441395..c1ca6f9501 100644
|
||||
index 4d1f44139..c1ca6f950 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketLoginInCustomPayload.java
|
||||
@@ -4,8 +4,8 @@ import java.io.IOException;
|
||||
@ -259,7 +259,7 @@ index 4d1f441395..c1ca6f9501 100644
|
||||
public PacketLoginInCustomPayload() {}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
|
||||
index ae74dc9e18..7eb230f1b2 100644
|
||||
index ae74dc9e1..7eb230f1b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketLoginOutCustomPayload.java
|
||||
@@ -10,6 +10,14 @@ public class PacketLoginOutCustomPayload implements Packet<PacketLoginOutListene
|
||||
@ -278,10 +278,10 @@ index ae74dc9e18..7eb230f1b2 100644
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.i();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d0834ecaab..145de4fe6e 100644
|
||||
index e1c9a9e12..7e810e008 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -644,7 +644,7 @@ public final class CraftServer implements Server {
|
||||
@@ -645,7 +645,7 @@ public final class CraftServer implements Server {
|
||||
@Override
|
||||
public long getConnectionThrottle() {
|
||||
// Spigot Start - Automatically set connection throttle for bungee configurations
|
||||
@ -291,5 +291,5 @@ index d0834ecaab..145de4fe6e 100644
|
||||
} else {
|
||||
return this.configuration.getInt("settings.connection-throttle");
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 3673196f9e0ac6580f406a27c9609accf4f8ad3c Mon Sep 17 00:00:00 2001
|
||||
From 049e3869567e166299d0659ee10b1c068b637194 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 12 Oct 2018 14:10:46 -0500
|
||||
Subject: [PATCH] Add more Witch API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWitch.java b/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
index ff4e73fff3..0b849f37c5 100644
|
||||
index be6ecfb08..f1a4c10ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
|
||||
@@ -1,5 +1,11 @@
|
||||
@ -24,26 +24,26 @@ index ff4e73fff3..0b849f37c5 100644
|
||||
public class EntityWitch extends EntityRaider implements IRangedEntity {
|
||||
|
||||
private static final UUID b = UUID.fromString("5CD17E52-A79A-43D3-A529-90FDE04B181E");
|
||||
- private static final AttributeModifier bz = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false);
|
||||
+ private static final AttributeModifier bz = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); private static final AttributeModifier DRINKING_SPEED = bz; // Paper - OBFHELPER
|
||||
private static final DataWatcherObject<Boolean> bA = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i);
|
||||
- private int bB;
|
||||
+ private int bB; public int getPotionUseTimeLeft() { return bB; } public void setPotionUseTimeLeft(int timeLeft) { bB = timeLeft; } // Paper - OBFHELPER
|
||||
private PathfinderGoalNearestHealableRaider<EntityRaider> bC;
|
||||
private PathfinderGoalNearestAttackableTargetWitch<EntityHuman> bD;
|
||||
- private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false);
|
||||
+ private static final AttributeModifier bw = (new AttributeModifier(EntityWitch.b, "Drinking speed penalty", -0.25D, AttributeModifier.Operation.ADDITION)).a(false); private static final AttributeModifier DRINKING_SPEED = bz; // Paper - OBFHELPER
|
||||
private static final DataWatcherObject<Boolean> bx = DataWatcher.a(EntityWitch.class, DataWatcherRegistry.i);
|
||||
- private int by;
|
||||
+ private int by; public int getPotionUseTimeLeft() { return by; } public void setPotionUseTimeLeft(int timeLeft) { by = timeLeft; } // Paper - OBFHELPER
|
||||
private PathfinderGoalNearestHealableRaider<EntityRaider> bz;
|
||||
private PathfinderGoalNearestAttackableTargetWitch<EntityHuman> bA;
|
||||
|
||||
@@ -56,10 +62,12 @@ public class EntityWitch extends EntityRaider implements IRangedEntity {
|
||||
return SoundEffects.ENTITY_WITCH_DEATH;
|
||||
}
|
||||
|
||||
+ public void setDrinkingPotion(boolean drinkingPotion) { s(drinkingPotion); } // Paper - OBFHELPER
|
||||
public void s(boolean flag) {
|
||||
this.getDataWatcher().set(EntityWitch.bA, flag);
|
||||
+ public void setDrinkingPotion(boolean drinkingPotion) { t(drinkingPotion); } // Paper - OBFHELPER
|
||||
public void t(boolean flag) {
|
||||
this.getDataWatcher().set(EntityWitch.bx, flag);
|
||||
}
|
||||
|
||||
+ public boolean isDrinkingPotion() { return l(); } // Paper - OBFHELPER
|
||||
public boolean l() {
|
||||
return (Boolean) this.getDataWatcher().get(EntityWitch.bA);
|
||||
return (Boolean) this.getDataWatcher().get(EntityWitch.bx);
|
||||
}
|
||||
@@ -121,18 +129,20 @@ public class EntityWitch extends EntityRaider implements IRangedEntity {
|
||||
}
|
||||
@ -67,13 +67,13 @@ index ff4e73fff3..0b849f37c5 100644
|
||||
+// attributeinstance.addModifier(EntityWitch.bz);
|
||||
+ this.setDrinkingPotion(PotionUtil.addPotionToItemStack(new ItemStack(Items.POTION), potionregistry));
|
||||
// Paper end
|
||||
- this.bB = this.getItemInMainHand().k();
|
||||
- this.s(true);
|
||||
- this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
- this.by = this.getItemInMainHand().k();
|
||||
- this.t(true);
|
||||
- this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), SoundEffects.ENTITY_WITCH_DRINK, this.getSoundCategory(), 1.0F, 0.8F + this.random.nextFloat() * 0.4F);
|
||||
- AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
-
|
||||
- attributeinstance.removeModifier(EntityWitch.bz);
|
||||
- attributeinstance.addModifier(EntityWitch.bz);
|
||||
- attributeinstance.removeModifier(EntityWitch.bw);
|
||||
- attributeinstance.addModifier(EntityWitch.bw);
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,7 +86,7 @@ index ff4e73fff3..0b849f37c5 100644
|
||||
+ setSlot(EnumItemSlot.MAINHAND, CraftItemStack.asNMSCopy(WitchReadyPotionEvent.process((Witch) getBukkitEntity(), CraftItemStack.asCraftMirror(potion))));
|
||||
+ setPotionUseTimeLeft(getItemInMainHand().getItemUseMaxDuration());
|
||||
+ setDrinkingPotion(true);
|
||||
+ world.sendSoundEffect(null, locX, locY, locZ, SoundEffects.ENTITY_WITCH_DRINK, getSoundCategory(), 1.0F, 0.8F + random.nextFloat() * 0.4F);
|
||||
+ world.sendSoundEffect(null, locX(), locY(), locZ(), SoundEffects.ENTITY_WITCH_DRINK, getSoundCategory(), 1.0F, 0.8F + random.nextFloat() * 0.4F);
|
||||
+ AttributeInstance attributeinstance = getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||
+ attributeinstance.removeModifier(EntityWitch.DRINKING_SPEED);
|
||||
+ attributeinstance.addModifier(EntityWitch.DRINKING_SPEED);
|
||||
@ -94,10 +94,10 @@ index ff4e73fff3..0b849f37c5 100644
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
public SoundEffect dV() {
|
||||
public SoundEffect eq() {
|
||||
return SoundEffects.ENTITY_WITCH_CELEBRATE;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
|
||||
index bae107e76e..b43a2bbd5b 100644
|
||||
index bae107e76..b43a2bbd5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
|
||||
@@ -1,12 +1,18 @@
|
||||
@ -146,5 +146,5 @@ index bae107e76e..b43a2bbd5b 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 2a0f99a82bad43467508e0b49046f76ba3df9e0d Mon Sep 17 00:00:00 2001
|
||||
From b38436d03816c855f097ca257d05d9bf16b7ce93 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Fri, 19 Oct 2018 19:38:45 -0500
|
||||
Subject: [PATCH] Fix MC-93764
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java
|
||||
index 715faef171..b97408cffa 100644
|
||||
index 9d4fcf8bc..4b9760709 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldProviderTheEnd.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldProviderTheEnd.java
|
||||
@@ -27,7 +27,7 @@ public class WorldProviderTheEnd extends WorldProvider {
|
||||
@ -18,5 +18,5 @@ index 715faef171..b97408cffa 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a07c0dd20ed878f0b680301efe4a1389be54f8af Mon Sep 17 00:00:00 2001
|
||||
From 50b3ce124cd8ee5a083bbca9b1dfc9ba2e4e0599 Mon Sep 17 00:00:00 2001
|
||||
From: Gabriele C <sgdc3.mail@gmail.com>
|
||||
Date: Mon, 22 Oct 2018 17:34:10 +0200
|
||||
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
|
||||
index 3b24fbdbf..c7ff264cb 100644
|
||||
index fe3e78f36..4bcba0a2b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -434,4 +434,9 @@ public class PaperWorldConfig {
|
||||
this.armorStandTick = this.getBoolean("armor-stands-tick", this.armorStandTick);
|
||||
log("ArmorStand ticking is " + (this.armorStandTick ? "enabled" : "disabled") + " by default");
|
||||
waterOverLavaFlowSpeed = getInt("water-over-lava-flow-speed", 5);
|
||||
log("Water over lava flow speed: " + waterOverLavaFlowSpeed);
|
||||
}
|
||||
+
|
||||
+ public boolean preventMovingIntoUnloadedChunks = false;
|
||||
@ -20,10 +20,10 @@ index 3b24fbdbf..c7ff264cb 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index a814d8cae..b0fd4d800 100644
|
||||
index 77c375f71..ccad0a601 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -348,6 +348,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -351,6 +351,13 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
|
||||
|
||||
@ -37,25 +37,25 @@ index a814d8cae..b0fd4d800 100644
|
||||
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && !this.isExemptPlayer()) {
|
||||
// CraftBukkit end
|
||||
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
|
||||
@@ -892,9 +899,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
double d1 = this.player.locY;
|
||||
double d2 = this.player.locZ;
|
||||
double d3 = this.player.locY;
|
||||
- double d4 = packetplayinflying.a(this.player.locX);
|
||||
+ double d4 = packetplayinflying.a(this.player.locX);double toX = d4; // Paper - OBFHELPER
|
||||
double d5 = packetplayinflying.b(this.player.locY);
|
||||
- double d6 = packetplayinflying.c(this.player.locZ);
|
||||
+ double d6 = packetplayinflying.c(this.player.locZ);double toZ = d6; // Paper - OBFHELPER
|
||||
@@ -900,9 +907,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
double d1 = this.player.locY();
|
||||
double d2 = this.player.locZ();
|
||||
double d3 = this.player.locY();
|
||||
- double d4 = packetplayinflying.a(this.player.locX());
|
||||
+ double d4 = packetplayinflying.a(this.player.locX());double toX = d4; // Paper - OBFHELPER
|
||||
double d5 = packetplayinflying.b(this.player.locY());
|
||||
- double d6 = packetplayinflying.c(this.player.locZ());
|
||||
+ double d6 = packetplayinflying.c(this.player.locZ());double toZ = d6; // Paper - OBFHELPER
|
||||
float f = packetplayinflying.a(this.player.yaw);
|
||||
float f1 = packetplayinflying.b(this.player.pitch);
|
||||
double d7 = d4 - this.l;
|
||||
@@ -933,6 +940,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -941,6 +948,12 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
} else {
|
||||
speed = player.abilities.walkSpeed * 10f;
|
||||
}
|
||||
+ // 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)) {
|
||||
+ this.internalTeleport(this.player.locX, this.player.locY, this.player.locZ, this.player.yaw, this.player.pitch, Collections.emptySet());
|
||||
+ 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());
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
@ -63,5 +63,5 @@ index a814d8cae..b0fd4d800 100644
|
||||
if (!this.player.H() && (!this.player.getWorldServer().getGameRules().getBoolean(GameRules.DISABLE_ELYTRA_MOVEMENT_CHECK) || !this.player.isGliding())) {
|
||||
float f2 = this.player.isGliding() ? 300.0F : 100.0F;
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,26 +1,26 @@
|
||||
From b6859fecadd83ec887760612d07fdc7b8791df9d Mon Sep 17 00:00:00 2001
|
||||
From fe691a23845cf0576a6a8e257623a97a102876bb Mon Sep 17 00:00:00 2001
|
||||
From: GreenMeanie <GreenMeanieMC@gmail.com>
|
||||
Date: Sat, 20 Oct 2018 22:34:02 -0400
|
||||
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
|
||||
index 4833a9652..19bbcc043 100644
|
||||
index 5d31068d7..365984bb8 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2323,6 +2323,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2326,6 +2326,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
}
|
||||
|
||||
+ public int getMaxAirTicks() { return bp(); } // Paper - OBFHELPER
|
||||
public int bp() {
|
||||
+ public int getMaxAirTicks() { return bw(); } // Paper - OBFHELPER
|
||||
public int bw() {
|
||||
return 300;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index ad5dcab78..ff398e5ed 100644
|
||||
index bdb73b68a..c15543a5c 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1869,6 +1869,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1832,6 +1832,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
|
||||
this.setHealth(this.getMaxHealth());
|
||||
@ -29,5 +29,5 @@ index ad5dcab78..ff398e5ed 100644
|
||||
this.fallDistance = 0;
|
||||
this.foodData = new FoodMetaData(this);
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1d67c5e8d1a1d69e96fb7c06a41f3942d5afbb9a Mon Sep 17 00:00:00 2001
|
||||
From 29a2005d88440d66d642aa51165df37c50873f75 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Tue, 23 Oct 2018 20:53:43 -0400
|
||||
Subject: [PATCH] Strip private area unicode characters from signs
|
||||
@ -20,11 +20,11 @@ think of no reason to use it.
|
||||
Fixes GH-1571
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
index 74fede54e1..1b01792730 100644
|
||||
index 03f6ddf00..4c2273497 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
@@ -14,6 +14,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
private final String[] k = new String[4];
|
||||
@@ -11,6 +11,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
private final String[] g = new String[4];
|
||||
private EnumColor color;
|
||||
|
||||
+ // Paper start - Strip invalid unicode from signs on load
|
||||
@ -35,7 +35,7 @@ index 74fede54e1..1b01792730 100644
|
||||
public TileEntitySign() {
|
||||
super(TileEntityTypes.SIGN);
|
||||
this.color = EnumColor.BLACK;
|
||||
@@ -36,6 +41,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -33,6 +38,12 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
// CraftBukkit end
|
||||
|
||||
nbttagcompound.setString("Color", this.color.b());
|
||||
@ -48,7 +48,7 @@ index 74fede54e1..1b01792730 100644
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -45,6 +56,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -42,6 +53,11 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
super.load(nbttagcompound);
|
||||
this.color = EnumColor.a(nbttagcompound.getString("Color"), EnumColor.BLACK);
|
||||
|
||||
@ -60,7 +60,7 @@ index 74fede54e1..1b01792730 100644
|
||||
// CraftBukkit start - Add an option to convert signs correctly
|
||||
// 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
|
||||
@@ -57,6 +73,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -54,6 +70,19 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
s = "\"\"";
|
||||
}
|
||||
|
||||
@ -80,8 +80,8 @@ index 74fede54e1..1b01792730 100644
|
||||
try {
|
||||
//IChatBaseComponent ichatbasecomponent = IChatBaseComponent.ChatSerializer.a(s.isEmpty() ? "\"\"" : s); // Paper - move down - the old format might throw a json error
|
||||
|
||||
@@ -83,6 +112,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
this.k[i] = null;
|
||||
@@ -80,6 +109,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
this.g[i] = null;
|
||||
}
|
||||
|
||||
+ if (ranUnicodeRemoval) this.privateUnicodeRemoved = true; // Paper - Flag to write NBT
|
||||
@ -89,5 +89,5 @@ index 74fede54e1..1b01792730 100644
|
||||
|
||||
public void a(int i, IChatBaseComponent ichatbasecomponent) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2e468b10d36cc2a5c93163aeea1eb27af12ad9be Mon Sep 17 00:00:00 2001
|
||||
From d6d90a38d970a46fe21fb229e52ce11f24fb313c Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 23 Oct 2018 20:25:05 -0400
|
||||
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
|
||||
|
||||
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
|
||||
+++ b/src/main/java/com/mojang/authlib/yggdrasil/YggdrasilGameProfileRepository.java
|
||||
@@ -42,6 +42,7 @@ public class YggdrasilGameProfileRepository implements GameProfileRepository {
|
||||
@ -32,5 +32,5 @@ index 71e48e87b4..23f1447cfc 100644
|
||||
try {
|
||||
Thread.sleep(DELAY_BETWEEN_PAGES);
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From adfe280f2c3a2298566c1977081665f1e032f17c Mon Sep 17 00:00:00 2001
|
||||
From 1d32757ed24265d2a95f3aa707691a352a02b4b2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 23 Oct 2018 23:14:38 -0400
|
||||
Subject: [PATCH] Use more reasonable thread count default for bootstrap
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 538ed5bb9b..35594821ce 100644
|
||||
index 7e224ebef..dc6d03062 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -66,7 +66,7 @@ public class SystemUtils {
|
||||
@ -18,5 +18,5 @@ index 538ed5bb9b..35594821ce 100644
|
||||
|
||||
if (i <= 0) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 1fd27d18045b686f8e5af4caf00cce897e9fb136 Mon Sep 17 00:00:00 2001
|
||||
From 8088dd2c577b40267e6d2beb9c9ed3919b8e19d7 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 2 Nov 2018 23:11:51 -0400
|
||||
Subject: [PATCH] Optimize World Time Updates
|
||||
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
||||
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
|
||||
index 40260dbd48..a7b63ab421 100644
|
||||
index 3120f91de..8fc55d31a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1147,12 +1147,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1155,12 +1155,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
@ -41,5 +41,5 @@ index 40260dbd48..a7b63ab421 100644
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
--
|
||||
2.22.1
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 4a487e8e51c0a91d3122c70728a8445771b2a478 Mon Sep 17 00:00:00 2001
|
||||
From 2990bbb6467411f9fe27a6a8a5c7b064e94f2c94 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 5 Nov 2018 04:23:51 +0000
|
||||
Subject: [PATCH] Restore custom InventoryHolder support
|
||||
@ -17,7 +17,7 @@ will always work as intended in the past, those without will create implementati
|
||||
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
|
||||
index 9957ed0402..ae280dd40b 100644
|
||||
index 9957ed040..ae280dd40 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
|
||||
@@ -39,10 +39,20 @@ public final class CraftInventoryCreator {
|
||||
@ -42,5 +42,5 @@ index 9957ed0402..ae280dd40b 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From afad9f309b019f52a937784669996c434d9d8c0a Mon Sep 17 00:00:00 2001
|
||||
From 0009fc84267605a552dfa51dbc975e2dcb50acea Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 8 Nov 2018 21:33:09 -0500
|
||||
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
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
index e1a684b370..6df2930e2d 100644
|
||||
index 1b64ad824..4388186db 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -35,9 +35,9 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
@@ -59,9 +59,9 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
private double derailedX = 0.5;
|
||||
private double derailedY = 0.5;
|
||||
private double derailedZ = 0.5;
|
||||
@ -23,5 +23,5 @@ index e1a684b370..6df2930e2d 100644
|
||||
// CraftBukkit end
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From baf72ff0e019bc0e5195cebbd153b519f3ed2711 Mon Sep 17 00:00:00 2001
|
||||
From 3446daf325b2c2ee999a5dfc9f7e1f0395d074db Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sat, 10 Nov 2018 05:15:21 +0000
|
||||
Subject: [PATCH] Fix SpongeAbsortEvent handling
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Fix SpongeAbsortEvent handling
|
||||
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 f687e86c4..e077359b0 100644
|
||||
index 2262a8253..46490a943 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -472,7 +472,7 @@ public class Block implements IMaterial {
|
||||
@ -37,5 +37,5 @@ index 685a30f3f..9edf937a6 100644
|
||||
}
|
||||
world.setTypeAndData(blockposition2, block.getHandle(), block.getFlag());
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From df1b6feb04b62e6ff414815fdc5746fec3bd584f Mon Sep 17 00:00:00 2001
|
||||
From 77a88c318a96133abb83de1f3713a713e95039bb Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 11 Nov 2018 21:01:09 +0000
|
||||
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
|
||||
index 9eb6982508..45c2777552 100644
|
||||
index ccad0a601..d263897da 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1259,6 +1259,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1271,6 +1271,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
case START_DESTROY_BLOCK:
|
||||
case ABORT_DESTROY_BLOCK:
|
||||
case STOP_DESTROY_BLOCK:
|
||||
@ -21,5 +21,5 @@ index 9eb6982508..45c2777552 100644
|
||||
return;
|
||||
default:
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0834959b160570b5a53a63d118ae4c460e857aed Mon Sep 17 00:00:00 2001
|
||||
From 96fb816d07d1115f2a2dd941c55277d4c248ff14 Mon Sep 17 00:00:00 2001
|
||||
From: theosib <millerti@172.16.221.1>
|
||||
Date: Thu, 27 Sep 2018 01:43:35 -0600
|
||||
Subject: [PATCH] Optimize redstone algorithm
|
||||
@ -19,7 +19,7 @@ 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.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index c7ff264cb..1ad6d6483 100644
|
||||
index 4bcba0a2b..3b1289099 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -439,4 +439,14 @@ public class PaperWorldConfig {
|
||||
@ -956,7 +956,7 @@ index 000000000..cf5661f1c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||
index cffb8de4f..337c03d1d 100644
|
||||
index 5bf2fc0b3..52a4982ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
|
||||
@@ -1,5 +1,7 @@
|
||||
@ -968,7 +968,7 @@ index cffb8de4f..337c03d1d 100644
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
@@ -22,8 +24,8 @@ public class BlockRedstoneWire extends Block {
|
||||
public static final BlockStateInteger POWER = BlockProperties.as;
|
||||
public static final BlockStateInteger POWER = BlockProperties.at;
|
||||
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[] 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)};
|
||||
- private boolean h = true;
|
||||
@ -1124,10 +1124,10 @@ index cffb8de4f..337c03d1d 100644
|
||||
c(iblockdata, world, 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
|
||||
index dc0d89ee6..6189935bd 100644
|
||||
index 8e3367435..e8f83627c 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -594,6 +594,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -526,6 +526,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
}
|
||||
|
||||
@ -1135,7 +1135,7 @@ index dc0d89ee6..6189935bd 100644
|
||||
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
|
||||
if (!this.isClientSide) {
|
||||
IBlockData iblockdata = this.getType(blockposition);
|
||||
@@ -1358,6 +1359,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -1275,6 +1276,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
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))));
|
||||
}
|
||||
|
||||
@ -1144,5 +1144,5 @@ index dc0d89ee6..6189935bd 100644
|
||||
int i = 0;
|
||||
EnumDirection[] aenumdirection = World.a;
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6e02846e06a944ed0bd1612330a2edee3e68a319 Mon Sep 17 00:00:00 2001
|
||||
From 62b0d0ae1bef673ce8fc4c925dea50a12b56701c Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Thu, 15 Nov 2018 13:38:37 +0000
|
||||
Subject: [PATCH] force entity dismount during teleportation
|
||||
@ -20,10 +20,10 @@ this is going to be the best soultion all around.
|
||||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 19bbcc043..75da08596 100644
|
||||
index 365984bb8..0f2480521 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2045,12 +2045,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2027,12 +2027,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
}
|
||||
|
||||
@ -41,7 +41,7 @@ index 19bbcc043..75da08596 100644
|
||||
}
|
||||
|
||||
}
|
||||
@@ -2101,7 +2104,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2083,7 +2086,10 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return true; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -53,7 +53,7 @@ index 19bbcc043..75da08596 100644
|
||||
if (entity.getVehicle() == this) {
|
||||
throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
|
||||
} else {
|
||||
@@ -2111,7 +2117,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2093,7 +2099,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
|
||||
VehicleExitEvent event = new VehicleExitEvent(
|
||||
(Vehicle) getBukkitEntity(),
|
||||
@ -62,7 +62,7 @@ index 19bbcc043..75da08596 100644
|
||||
);
|
||||
Bukkit.getPluginManager().callEvent(event);
|
||||
CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
|
||||
@@ -2122,7 +2128,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2104,7 +2110,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
// CraftBukkit end
|
||||
// Spigot start
|
||||
@ -72,10 +72,10 @@ index 19bbcc043..75da08596 100644
|
||||
if (event.isCancelled()) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 2342ea481..8a66b1dc5 100644
|
||||
index 78e48f478..4bb24de9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -953,9 +953,11 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
@@ -968,9 +968,11 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
return -0.35D;
|
||||
}
|
||||
|
||||
@ -91,11 +91,11 @@ index 2342ea481..8a66b1dc5 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 1e53af2cc..d23968a7c 100644
|
||||
index c6bd68919..317321395 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -2673,11 +2673,13 @@ public abstract class EntityLiving extends Entity {
|
||||
return ((Byte) this.datawatcher.get(EntityLiving.ar) & 4) != 0;
|
||||
@@ -2732,11 +2732,13 @@ public abstract class EntityLiving extends Entity {
|
||||
return ((Byte) this.datawatcher.get(EntityLiving.ao) & 4) != 0;
|
||||
}
|
||||
|
||||
- @Override
|
||||
@ -109,13 +109,13 @@ index 1e53af2cc..d23968a7c 100644
|
||||
- super.stopRiding();
|
||||
+ super.stopRiding(suppressCancellation); // Paper - suppress
|
||||
if (entity != null && entity != this.getVehicle() && !this.world.isClientSide) {
|
||||
this.B(entity);
|
||||
this.a(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 517bbf602..8eb662cef 100644
|
||||
index c15543a5c..f41fd576d 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1002,11 +1002,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -985,11 +985,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,5 +133,5 @@ index 517bbf602..8eb662cef 100644
|
||||
|
||||
if (entity1 != entity && this.playerConnection != null) {
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 81fc0d1616ca012b5475bedecbe3755cacb579ca Mon Sep 17 00:00:00 2001
|
||||
From af6bf25c3137de313e090306d566b020ac70ef46 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 16 Nov 2018 23:08:50 -0500
|
||||
Subject: [PATCH] Book Size Limits
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Book Size Limits
|
||||
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
|
||||
index 63d8602927..8feb0efdcd 100644
|
||||
index 7e85a0224..30f35304a 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -375,4 +375,11 @@ public class PaperConfig {
|
||||
@@ -351,4 +351,11 @@ public class PaperConfig {
|
||||
velocitySecretKey = secret.getBytes(StandardCharsets.UTF_8);
|
||||
}
|
||||
}
|
||||
@ -22,7 +22,7 @@ index 63d8602927..8feb0efdcd 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 45c2777552..04b3791f36 100644
|
||||
index d263897da..e5db2de26 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -14,6 +14,7 @@ import java.util.Iterator;
|
||||
@ -33,7 +33,7 @@ index 45c2777552..04b3791f36 100644
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
@@ -787,6 +788,42 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -795,6 +796,42 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
@Override
|
||||
public void a(PacketPlayInBEdit packetplayinbedit) {
|
||||
@ -73,9 +73,9 @@ index 45c2777552..04b3791f36 100644
|
||||
+ }
|
||||
+ }
|
||||
+ // Paper end
|
||||
// CraftBukkit start
|
||||
PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer());
|
||||
// CraftBukkit start
|
||||
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,33 +0,0 @@
|
||||
From e8401927cb5951f9f934619dc3b1afa8be467dab Mon Sep 17 00:00:00 2001
|
||||
From: MisterVector <whizkid3000@hotmail.com>
|
||||
Date: Thu, 1 Nov 2018 14:50:05 -0700
|
||||
Subject: [PATCH] MC-136865: Use valid item for enchantment checks on block
|
||||
break
|
||||
|
||||
When an itemstack runs out of durability, the amount is reduced to
|
||||
0 which then marks the item as invalid. This causes the last unit
|
||||
of durability to not apply enchantments as the enchantment level
|
||||
check sees the item as a dud.
|
||||
|
||||
keep the clone of the item used to a non empty value so it represents
|
||||
the item used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index a898535d1b..f953bd7ceb 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -352,9 +352,10 @@ public class PlayerInteractManager {
|
||||
ItemStack itemstack = this.player.getItemInMainHand();
|
||||
boolean flag1 = this.player.hasBlock(iblockdata);
|
||||
|
||||
+ ItemStack itemstack1 = flag && flag1 && event.isDropItems() && !itemstack.isEmpty() ? itemstack.cloneItemStack() : ItemStack.a; // Paper - MC-136865 - clone before use
|
||||
itemstack.a(this.world, iblockdata, blockposition, this.player);
|
||||
if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
|
||||
- ItemStack itemstack1 = itemstack.isEmpty() ? ItemStack.a : itemstack.cloneItemStack();
|
||||
+ //ItemStack itemstack1 = itemstack.isEmpty() ? ItemStack.a : itemstack.cloneItemStack(); // Paper - MC-136865 - move up
|
||||
|
||||
block.a(this.world, this.player, blockposition, iblockdata, tileentity, itemstack1);
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
|
@ -1,14 +1,14 @@
|
||||
From baf1582d76a61343a81f2fb410f50b28e5e74d46 Mon Sep 17 00:00:00 2001
|
||||
From ebbe338096c77f671dec0bb6d35054d802bcddb8 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 18 Nov 2018 19:49:56 +0000
|
||||
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
|
||||
index 8feb0efdcd..81987e4ad9 100644
|
||||
index 30f35304a..546a1cfe0 100644
|
||||
--- a/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;
|
||||
@@ -20,6 +20,7 @@ import java.util.regex.Pattern;
|
||||
import com.google.common.collect.Lists;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
import org.bukkit.Bukkit;
|
||||
@ -16,7 +16,7 @@ index 8feb0efdcd..81987e4ad9 100644
|
||||
import org.bukkit.command.Command;
|
||||
import org.bukkit.configuration.ConfigurationSection;
|
||||
import org.bukkit.configuration.InvalidConfigurationException;
|
||||
@@ -281,6 +282,11 @@ public class PaperConfig {
|
||||
@@ -280,6 +281,11 @@ public class PaperConfig {
|
||||
connectionThrottleKickMessage = getString("messages.kick.connection-throttle", connectionThrottleKickMessage);
|
||||
}
|
||||
|
||||
@ -29,10 +29,10 @@ index 8feb0efdcd..81987e4ad9 100644
|
||||
private static void 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
|
||||
index dfa78653aa..b89486beb1 100644
|
||||
index 7e810e008..58b343259 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2138,6 +2138,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2141,6 +2141,11 @@ public final class CraftServer implements Server {
|
||||
return com.destroystokyo.paper.PaperConfig.suggestPlayersWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
@ -45,5 +45,5 @@ index dfa78653aa..b89486beb1 100644
|
||||
public com.destroystokyo.paper.profile.PlayerProfile createProfile(@Nonnull UUID uuid) {
|
||||
return createProfile(uuid, null);
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From f907156715854ece053295bfc0ec77b0b0ee8ea6 Mon Sep 17 00:00:00 2001
|
||||
From fc21da59d50e0969a0d038aaf58676bbaa01f4ef Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sun, 7 Oct 2018 04:29:59 -0500
|
||||
Subject: [PATCH] Add more Zombie API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 09112a8b0..d00e99cdb 100644
|
||||
index cbaed08f5..6bad1687f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -1247,6 +1247,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -1253,6 +1253,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
this.datawatcher.set(EntityInsentient.b, flag ? (byte) (b0 | 2) : (byte) (b0 & -3));
|
||||
}
|
||||
|
||||
@ -18,11 +18,11 @@ index 09112a8b0..d00e99cdb 100644
|
||||
byte b0 = (Byte) this.datawatcher.get(EntityInsentient.b);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index 832375f27..cdaa7f636 100644
|
||||
index c8e4dcdac..1c2c05ae3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -33,6 +33,7 @@ public class EntityZombie extends EntityMonster {
|
||||
private int bF;
|
||||
private int bC;
|
||||
public int drownedConversionTime;
|
||||
private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
|
||||
+ private boolean shouldBurnInDay = true; // Paper
|
||||
@ -48,15 +48,15 @@ index 832375f27..cdaa7f636 100644
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
protected void ea() {
|
||||
protected void ev() {
|
||||
this.b(EntityTypes.DROWNED);
|
||||
this.world.a((EntityHuman) null, 1040, new BlockPosition(this), 0);
|
||||
@@ -258,10 +267,17 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -292,10 +301,17 @@ public class EntityZombie extends EntityMonster {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean shouldBurnInDay() { return I_(); } // Paper - OBFHELPER
|
||||
protected boolean I_() {
|
||||
+ public boolean shouldBurnInDay() { return K_(); } // Paper - OBFHELPER
|
||||
protected boolean K_() {
|
||||
- return true;
|
||||
+ return shouldBurnInDay;
|
||||
}
|
||||
@ -70,15 +70,15 @@ index 832375f27..cdaa7f636 100644
|
||||
@Override
|
||||
public boolean damageEntity(DamageSource damagesource, float f) {
|
||||
if (super.damageEntity(damagesource, f)) {
|
||||
@@ -379,6 +395,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.ed());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bF : -1);
|
||||
@@ -413,6 +429,7 @@ public class EntityZombie extends EntityMonster {
|
||||
nbttagcompound.setBoolean("CanBreakDoors", this.ey());
|
||||
nbttagcompound.setInt("InWaterTime", this.isInWater() ? this.bC : -1);
|
||||
nbttagcompound.setInt("DrownedConversionTime", this.isDrownConverting() ? this.drownedConversionTime : -1);
|
||||
+ nbttagcompound.setBoolean("Paper.ShouldBurnInDay", shouldBurnInDay); // Paper
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -393,7 +410,11 @@ public class EntityZombie extends EntityMonster {
|
||||
@@ -427,7 +444,11 @@ public class EntityZombie extends EntityMonster {
|
||||
if (nbttagcompound.hasKeyOfType("DrownedConversionTime", 99) && nbttagcompound.getInt("DrownedConversionTime") > -1) {
|
||||
this.startDrownedConversion(nbttagcompound.getInt("DrownedConversionTime"));
|
||||
}
|
||||
@ -138,5 +138,5 @@ index 0429cf020..c4320dbb6 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ff3dab598aaddf30e1de92362c108cefd4556caf Mon Sep 17 00:00:00 2001
|
||||
From 28c7246755b0d632c7fb7ced86c8d915acf5cad6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 26 Nov 2018 19:21:58 -0500
|
||||
Subject: [PATCH] Prevent rayTrace from loading chunks
|
||||
@ -7,7 +7,7 @@ ray tracing into an unloaded chunk should be treated as a miss
|
||||
this saves a ton of lag for when AI tries to raytrace near unloaded chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
index 0dff023529..29cdc00875 100644
|
||||
index 0dff02352..29cdc0087 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
@@ -41,7 +41,15 @@ public interface IBlockAccess {
|
||||
@ -28,5 +28,5 @@ index 0dff023529..29cdc00875 100644
|
||||
Vec3D vec3d = raytrace1.b();
|
||||
Vec3D vec3d1 = raytrace1.a();
|
||||
--
|
||||
2.22.1
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b99dd3033f3933d54f796e9b0deabf828e7380b4 Mon Sep 17 00:00:00 2001
|
||||
From 1489b2b551819fbd5dc80491d34ad50655279569 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 27 Nov 2018 21:18:06 -0500
|
||||
Subject: [PATCH] Handle Large Packets disconnecting client
|
||||
@ -7,7 +7,7 @@ If a players inventory is too big to send in a single packet,
|
||||
split the inventory set into multiple packets instead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 046196d54d..d4aad8a5b7 100644
|
||||
index 046196d54..d4aad8a5b 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -97,6 +97,15 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -27,7 +27,7 @@ index 046196d54d..d4aad8a5b7 100644
|
||||
NetworkManager.LOGGER.debug("Skipping packet due to errors", throwable.getCause());
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
|
||||
index 601d4d0fa2..2d8e6a2f4a 100644
|
||||
index 601d4d0fa..2d8e6a2f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet.java
|
||||
@@ -10,6 +10,12 @@ public interface Packet<T extends PacketListener> {
|
||||
@ -44,7 +44,7 @@ index 601d4d0fa2..2d8e6a2f4a 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
index 63c4dbd327..b0cfef52cb 100644
|
||||
index 63c4dbd32..b0cfef52c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
@@ -49,7 +49,31 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
@ -80,20 +80,20 @@ index 63c4dbd327..b0cfef52cb 100644
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index d19a30ad87..58eccd9c63 100644
|
||||
index 1fcbbd698..a0b87f89d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -68,7 +68,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
this.d = packetdataserializer.l();
|
||||
@@ -79,7 +79,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
int i = packetdataserializer.i();
|
||||
|
||||
- if (i > 2097152) {
|
||||
+ if (i > 2097152) { // Paper - if this changes, update PacketEncoder
|
||||
throw new RuntimeException("Chunk Packet trying to allocate too much memory on read.");
|
||||
} else {
|
||||
this.e = new byte[i];
|
||||
this.f = new byte[i];
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java
|
||||
index f7c3655671..631234324d 100644
|
||||
index f7c365567..631234324 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutWindowItems.java
|
||||
@@ -9,6 +9,15 @@ public class PacketPlayOutWindowItems implements Packet<PacketListenerPlayOut> {
|
||||
@ -113,5 +113,5 @@ index f7c3655671..631234324d 100644
|
||||
|
||||
public PacketPlayOutWindowItems(int i, NonNullList<ItemStack> nonnulllist) {
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 362f1022d736a4af384ee4d726362fcfa97f11d2 Mon Sep 17 00:00:00 2001
|
||||
From 9d1b272b4ccf35d5f84c79ca400de67e0a6b3d3b Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Tue, 11 Dec 2018 22:25:07 -0500
|
||||
Subject: [PATCH] Lazy init world storage in CraftOfflinePlayer
|
||||
@ -8,7 +8,7 @@ worlds loaded. This is typically a rare occurrence but probably one that
|
||||
should be covered as best we can.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
index 6a448c02ec..c1ef1c950d 100644
|
||||
index 6a448c02e..c1ef1c950 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
@@ -25,12 +25,12 @@ import org.bukkit.plugin.Plugin;
|
||||
@ -61,5 +61,5 @@ index 6a448c02ec..c1ef1c950d 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 2371a7cce1890e7c955d0dff71803eacbcaf0c16 Mon Sep 17 00:00:00 2001
|
||||
From 95881a068c457b9003d460c0c67d42489eb36a26 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sun, 7 Oct 2018 12:05:28 -0700
|
||||
Subject: [PATCH] Add PlayerConnectionCloseEvent
|
||||
@ -34,7 +34,7 @@ how PlayerPreLoginEvent interacts with PlayerConnectionCloseEvent
|
||||
is undefined.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
index 41b2c90c3a..a8773037e5 100644
|
||||
index c3d57461d..a6b22254a 100644
|
||||
--- a/src/main/java/net/minecraft/server/LoginListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/LoginListener.java
|
||||
@@ -35,9 +35,9 @@ public class LoginListener implements PacketLoginInListener {
|
||||
@ -50,7 +50,7 @@ index 41b2c90c3a..a8773037e5 100644
|
||||
private SecretKey loginKey;
|
||||
private EntityPlayer l;
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index d4aad8a5b7..b1dededc15 100644
|
||||
index d4aad8a5b..b1dededc1 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -336,6 +336,26 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -81,5 +81,5 @@ index d4aad8a5b7..b1dededc15 100644
|
||||
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,26 +1,26 @@
|
||||
From 27a2999cffd04b8c7d4310a2aba040bad333a70a Mon Sep 17 00:00:00 2001
|
||||
From 861bb451159a101b782480f03f81c74306d73d5b Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Tue, 18 Dec 2018 02:15:08 +0000
|
||||
Subject: [PATCH] Prevent Enderman from loading chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderman.java b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
index 2d29da8560..a94ed1ae08 100644
|
||||
index 9783576e3..13507edbc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderman.java
|
||||
@@ -325,7 +325,8 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.enderman.locY + random.nextDouble() * 3.0D);
|
||||
int k = MathHelper.floor(this.enderman.locZ - 2.0D + random.nextDouble() * 4.0D);
|
||||
@@ -344,7 +344,8 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.enderman.locY() + random.nextDouble() * 3.0D);
|
||||
int k = MathHelper.floor(this.enderman.locZ() - 2.0D + random.nextDouble() * 4.0D);
|
||||
BlockPosition blockposition = new BlockPosition(i, j, k);
|
||||
- IBlockData iblockdata = world.getType(blockposition);
|
||||
+ IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper
|
||||
+ if (iblockdata == null) return; // Paper
|
||||
Block block = iblockdata.getBlock();
|
||||
Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ) + 0.5D);
|
||||
Vec3D vec3d = new Vec3D((double) MathHelper.floor(this.enderman.locX()) + 0.5D, (double) j + 0.5D, (double) MathHelper.floor(this.enderman.locZ()) + 0.5D);
|
||||
Vec3D vec3d1 = new Vec3D((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D);
|
||||
@@ -367,7 +368,8 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.a.locY + random.nextDouble() * 2.0D);
|
||||
int k = MathHelper.floor(this.a.locZ - 1.0D + random.nextDouble() * 2.0D);
|
||||
@@ -386,7 +387,8 @@ public class EntityEnderman extends EntityMonster {
|
||||
int j = MathHelper.floor(this.a.locY() + random.nextDouble() * 2.0D);
|
||||
int k = MathHelper.floor(this.a.locZ() - 1.0D + random.nextDouble() * 2.0D);
|
||||
BlockPosition blockposition = new BlockPosition(i, j, k);
|
||||
- IBlockData iblockdata = world.getType(blockposition);
|
||||
+ IBlockData iblockdata = world.getTypeIfLoaded(blockposition); // Paper
|
||||
@ -29,5 +29,5 @@ index 2d29da8560..a94ed1ae08 100644
|
||||
IBlockData iblockdata1 = world.getType(blockposition1);
|
||||
IBlockData iblockdata2 = Block.getValidBlockForPosition(getEnderman().getCarried(), getEnderman().world, blockposition); // Paper - Fix MC-124320
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fbf880a67801f0006d7f2a5b73b0703723cee401 Mon Sep 17 00:00:00 2001
|
||||
From b4e64a666d6bf724ad14dd41c6a2dd510080066d Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Wed, 2 Jan 2019 00:35:43 -0600
|
||||
Subject: [PATCH] Add APIs to replace OfflinePlayer#getLastPlayed
|
||||
@ -16,7 +16,7 @@ intent to remove) and replace it with two new methods, clearly named and
|
||||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index d3886a6e04..2d4021784f 100644
|
||||
index f41fd576d..1665a302a 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -75,6 +75,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -28,7 +28,7 @@ index d3886a6e04..2d4021784f 100644
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public net.minecraft.server.PacketPlayOutUpdateHealth queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 049d702cb9..52aa83f51f 100644
|
||||
index e46436623..659ce2181 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -94,6 +94,7 @@ public abstract class PlayerList {
|
||||
@ -38,9 +38,9 @@ index 049d702cb9..52aa83f51f 100644
|
||||
+ entityplayer.loginTime = System.currentTimeMillis(); // Paper
|
||||
GameProfile gameprofile = entityplayer.getProfile();
|
||||
UserCache usercache = this.server.getUserCache();
|
||||
GameProfile gameprofile1 = usercache.a(gameprofile.getId());
|
||||
GameProfile gameprofile1 = usercache.getProfile(gameprofile.getId());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
index c1ef1c950d..3824180ee5 100644
|
||||
index c1ef1c950..3824180ee 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
|
||||
@@ -256,6 +256,61 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
|
||||
@ -106,10 +106,10 @@ index c1ef1c950d..3824180ee5 100644
|
||||
public Location getBedSpawnLocation() {
|
||||
NBTTagCompound data = getData();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3d60e98749..ea4e569e5a 100644
|
||||
index ad70bd5ba..04fc8e233 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -140,6 +140,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -139,6 +139,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
private org.bukkit.event.player.PlayerResourcePackStatusEvent.Status resourcePackStatus;
|
||||
private String resourcePackHash;
|
||||
private static final boolean DISABLE_CHANNEL_LIMIT = System.getProperty("paper.disableChannelLimit") != null; // Paper - add a flag to disable the channel limit
|
||||
@ -117,7 +117,7 @@ index 3d60e98749..ea4e569e5a 100644
|
||||
// Paper end
|
||||
|
||||
public CraftPlayer(CraftServer server, EntityPlayer entity) {
|
||||
@@ -1373,6 +1374,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1357,6 +1358,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
this.firstPlayed = firstPlayed;
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ index 3d60e98749..ea4e569e5a 100644
|
||||
public void readExtraData(NBTTagCompound nbttagcompound) {
|
||||
hasPlayedBefore = true;
|
||||
if (nbttagcompound.hasKey("bukkit")) {
|
||||
@@ -1395,6 +1408,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1379,6 +1392,8 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setExtraData(NBTTagCompound nbttagcompound) {
|
||||
@ -145,7 +145,7 @@ index 3d60e98749..ea4e569e5a 100644
|
||||
if (!nbttagcompound.hasKey("bukkit")) {
|
||||
nbttagcompound.set("bukkit", new NBTTagCompound());
|
||||
}
|
||||
@@ -1409,6 +1424,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1393,6 +1408,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
data.setLong("firstPlayed", getFirstPlayed());
|
||||
data.setLong("lastPlayed", System.currentTimeMillis());
|
||||
data.setString("lastKnownName", handle.getName());
|
||||
@ -163,5 +163,5 @@ index 3d60e98749..ea4e569e5a 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 44ae12a7d53c10c379fa90acf6bca14230a83b4a Mon Sep 17 00:00:00 2001
|
||||
From 0838a4fbce101df7c999ae363a80966f4254b181 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Himing <mhiming@gmail.com>
|
||||
Date: Sun, 16 Dec 2018 13:07:33 +1100
|
||||
Subject: [PATCH] Fix PlayerEditBookEvent
|
||||
@ -10,10 +10,10 @@ it impossible to properly cancel the event or modify the book meta
|
||||
cancelled writing
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 04b3791f36..4a1565f4f7 100644
|
||||
index e5db2de26..c3feccbd6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -863,9 +863,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -871,9 +871,11 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
itemstack2.a("pages", (NBTBase) nbttaglist);
|
||||
this.player.a(packetplayinbedit.d(), CraftEventFactory.handleEditBookEvent(player, enumitemslot, itemstack1, itemstack2)); // CraftBukkit
|
||||
} else {
|
||||
@ -29,5 +29,5 @@ index 04b3791f36..4a1565f4f7 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.17.1
|
||||
|
@ -1,16 +1,16 @@
|
||||
From 106f0064d5e764347eee78651e53800010b5359c Mon Sep 17 00:00:00 2001
|
||||
From 30cdc7bfec8a09f2ea963c30f8bb5eb46456e1a7 Mon Sep 17 00:00:00 2001
|
||||
From: connorhartley <vectrixu+gh@gmail.com>
|
||||
Date: Mon, 7 Jan 2019 14:43:48 -0600
|
||||
Subject: [PATCH] Workaround for vehicle tracking issue on disconnect
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 3897411e7..21b02aeca 100644
|
||||
index 1665a302a..cc9e69651 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -1292,6 +1292,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@@ -1261,6 +1261,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
public void n() {
|
||||
this.ct = true;
|
||||
this.cq = true;
|
||||
this.ejectPassengers();
|
||||
+
|
||||
+ // Paper start - Workaround an issue where the vehicle doesn't track the passenger disconnection dismount.
|
||||
@ -20,8 +20,8 @@ index 3897411e7..21b02aeca 100644
|
||||
+ // Paper end
|
||||
+
|
||||
if (this.isSleeping()) {
|
||||
this.wakeup(true, false, false);
|
||||
this.wakeup(true, false);
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.17.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From cc9dd8d543e2fe21fb8323e6e61f5a69511c9717 Mon Sep 17 00:00:00 2001
|
||||
From 111d5782c3a945f09b0deeaba4f2bc486ef688ea Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Thu, 31 Jan 2019 16:33:36 -0500
|
||||
Subject: [PATCH] Fire BlockPistonRetractEvent for all empty pistons
|
||||
@ -24,10 +24,10 @@ Instead we opt to remove the check entirely so that the event fires for
|
||||
all piston types.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
index e883c7ac98..de804348f3 100644
|
||||
index 1170a2810..b29525c40 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
|
||||
@@ -121,7 +121,7 @@ public class BlockPiston extends BlockDirectional {
|
||||
@@ -122,7 +122,7 @@ public class BlockPiston extends BlockDirectional {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@ -36,7 +36,7 @@ index e883c7ac98..de804348f3 100644
|
||||
org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
|
||||
world.getServer().getPluginManager().callEvent(event);
|
||||
@@ -129,7 +129,7 @@ public class BlockPiston extends BlockDirectional {
|
||||
@@ -130,7 +130,7 @@ public class BlockPiston extends BlockDirectional {
|
||||
if (event.isCancelled()) {
|
||||
return;
|
||||
}
|
||||
@ -44,7 +44,7 @@ index e883c7ac98..de804348f3 100644
|
||||
+ //} // Paper
|
||||
// PAIL: checkME - what happened to setTypeAndData?
|
||||
// CraftBukkit end
|
||||
world.playBlockAction(blockposition, this, b0, enumdirection.a());
|
||||
world.playBlockAction(blockposition, this, b0, enumdirection.b());
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 58a6589c6b293c796a0b9f5ae7840bda4912a497 Mon Sep 17 00:00:00 2001
|
||||
From 830cd5873ebed9e73f0216f8fedf7d2bd04224e4 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 4 Feb 2019 23:33:24 -0500
|
||||
Subject: [PATCH] Block Entity#remove from being called on Players
|
||||
@ -12,10 +12,10 @@ Player we will look at limiting the scope of this change. It appears to
|
||||
be unintentional in the few cases we've seen so far.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index ea4e569e5a..15c874fc82 100644
|
||||
index 04fc8e233..4b847ddd8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1974,6 +1974,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1958,6 +1958,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public void resetCooldown() {
|
||||
getHandle().resetCooldown();
|
||||
}
|
||||
@ -28,9 +28,9 @@ index ea4e569e5a..15c874fc82 100644
|
||||
+ super.remove();
|
||||
+ }
|
||||
+ }
|
||||
//Paper end
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 5cf46619cee7f54e790731dc27455a63ed09046a Mon Sep 17 00:00:00 2001
|
||||
From 5520641b69e980691db06799793a50b52fd497ca Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 6 Feb 2019 00:20:33 -0500
|
||||
Subject: [PATCH] BlockDestroyEvent
|
||||
@ -11,10 +11,10 @@ floating in the air.
|
||||
This can replace many uses of BlockPhysicsEvent
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index ef561cd95b..dad0c893fd 100644
|
||||
index e8f83627c..61a3ddc4d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -524,8 +524,20 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -456,8 +456,20 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return false;
|
||||
} else {
|
||||
Fluid fluid = this.getFluid(blockposition);
|
||||
@ -37,5 +37,5 @@ index ef561cd95b..dad0c893fd 100644
|
||||
TileEntity tileentity = iblockdata.getBlock().isTileEntity() ? this.getTileEntity(blockposition) : null;
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b5b1f6e3dc91f247f2ad51aaeb653c27366f0644 Mon Sep 17 00:00:00 2001
|
||||
From 307884933b37b55fe6d6817fc76c784338ae9fc6 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 18 Jan 2019 00:08:15 -0500
|
||||
Subject: [PATCH] Fix Custom Shapeless Custom Crafting Recipes
|
||||
@ -10,7 +10,7 @@ This made the Bukkit RecipeChoice API not work for Shapeless.
|
||||
This reimplements vanilla logic using the same test logic as Shaped
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ShapelessRecipes.java b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
index 070fc1e3ec..691e697d68 100644
|
||||
index fe03a35cc..fb481e658 100644
|
||||
--- a/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
+++ b/src/main/java/net/minecraft/server/ShapelessRecipes.java
|
||||
@@ -63,16 +63,46 @@ public class ShapelessRecipes implements RecipeCrafting {
|
||||
@ -64,5 +64,5 @@ index 070fc1e3ec..691e697d68 100644
|
||||
|
||||
public ItemStack a(InventoryCrafting inventorycrafting) {
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From beebdba19e6511374001cd8844b683177acca066 Mon Sep 17 00:00:00 2001
|
||||
From 69e589820919b6e3f2c4d15ac01e7809e34d2542 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 28 Feb 2019 00:15:28 -0500
|
||||
Subject: [PATCH] Fix sign edit memory leak
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Fix sign edit memory leak
|
||||
when a player edits a sign, a reference to their Entity is never cleand up.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 4a1565f4f7..6030766099 100644
|
||||
index c3feccbd6..c54e1c9a0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -2535,7 +2535,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2545,7 +2545,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
TileEntitySign tileentitysign = (TileEntitySign) tileentity;
|
||||
|
||||
@ -19,10 +19,10 @@ index 4a1565f4f7..6030766099 100644
|
||||
this.sendPacket(tileentity.getUpdatePacket()); // CraftBukkit
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
index 1b01792730..c7aa3b350a 100644
|
||||
index 4c2273497..f051f2d3c 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
@@ -17,6 +17,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -14,6 +14,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
// 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 boolean privateUnicodeRemoved = false;
|
||||
@ -30,18 +30,18 @@ index 1b01792730..c7aa3b350a 100644
|
||||
// Paper end
|
||||
|
||||
public TileEntitySign() {
|
||||
@@ -141,7 +142,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -138,7 +139,10 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
}
|
||||
|
||||
public void a(EntityHuman entityhuman) {
|
||||
- this.j = entityhuman;
|
||||
- this.c = entityhuman;
|
||||
+ // Paper start
|
||||
+ //this.g = entityhuman;
|
||||
+ //this.c = entityhuman;
|
||||
+ signEditor = entityhuman != null ? entityhuman.getUniqueID() : null;
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public EntityHuman f() {
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From a1a2b52dc73803c37e1cdfc526200f9dc242593e Mon Sep 17 00:00:00 2001
|
||||
From 885df137b3ddc82c61dd104a09c06484a77ee036 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Feb 2019 22:18:40 -0500
|
||||
Subject: [PATCH] Limit Client Sign length more
|
||||
@ -22,7 +22,7 @@ it only impacts data sent from the client.
|
||||
Set -DPaper.maxSignLength=XX to change limit or -1 to disable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 6030766099..b030269f0a 100644
|
||||
index c54e1c9a0..bd2ee459f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -103,6 +103,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@ -33,7 +33,7 @@ index 6030766099..b030269f0a 100644
|
||||
private static final long KEEPALIVE_LIMIT = Long.getLong("paper.playerconnection.keepalive", 30) * 1000; // Paper - provide property to set keepalive limit
|
||||
|
||||
public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer) {
|
||||
@@ -2551,6 +2552,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2561,6 +2562,15 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
String[] lines = new String[4];
|
||||
|
||||
for (int i = 0; i < astring.length; ++i) {
|
||||
@ -50,5 +50,5 @@ index 6030766099..b030269f0a 100644
|
||||
}
|
||||
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 78e1b7306f6b982a5d69a09cde244cf3e28a9043 Mon Sep 17 00:00:00 2001
|
||||
From 41f9d0be57621cbc16042166cd33d910b614614b Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 2 Mar 2019 11:11:29 -0500
|
||||
Subject: [PATCH] Don't check ConvertSigns boolean every sign save
|
||||
@ -7,10 +7,10 @@ property lookups arent super cheap. they synchronize, validate
|
||||
and check security managers.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySign.java b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
index c7aa3b350a..0a8d9b52dd 100644
|
||||
index f051f2d3c..5eb86c434 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntitySign.java
|
||||
@@ -18,6 +18,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -15,6 +15,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
private static final boolean keepInvalidUnicode = Boolean.getBoolean("Paper.keepInvalidUnicode"); // Allow people to keep their bad unicode if they really want it
|
||||
private boolean privateUnicodeRemoved = false;
|
||||
public java.util.UUID signEditor;
|
||||
@ -18,7 +18,7 @@ index c7aa3b350a..0a8d9b52dd 100644
|
||||
// Paper end
|
||||
|
||||
public TileEntitySign() {
|
||||
@@ -36,7 +37,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
@@ -33,7 +34,7 @@ public class TileEntitySign extends TileEntity implements ICommandListener { //
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
@ -28,5 +28,5 @@ index c7aa3b350a..0a8d9b52dd 100644
|
||||
}
|
||||
// CraftBukkit end
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 331562f54c78c10872ec4960edd8b36dd7a6619b Mon Sep 17 00:00:00 2001
|
||||
From 954930d0c2cb54bb03e013fcc8f71d96e686b435 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 2 Mar 2019 14:55:01 -0500
|
||||
Subject: [PATCH] Handle Excessive Signs in Chunks creating too large of
|
||||
@ -11,7 +11,7 @@ Use -DPaper.excessiveSignsLimit=500 to configure that limit, or -1
|
||||
to disable the limit and let your players be abused.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index b1dededc15..e156804f7a 100644
|
||||
index b1dededc1..e156804f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -212,6 +212,15 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -31,7 +31,7 @@ index b1dededc15..e156804f7a 100644
|
||||
|
||||
private void sendPacketQueue() { this.o(); } // Paper - OBFHELPER
|
||||
diff --git a/src/main/java/net/minecraft/server/Packet.java b/src/main/java/net/minecraft/server/Packet.java
|
||||
index 2d8e6a2f4a..8d0965a053 100644
|
||||
index 2d8e6a2f4..8d0965a05 100644
|
||||
--- a/src/main/java/net/minecraft/server/Packet.java
|
||||
+++ b/src/main/java/net/minecraft/server/Packet.java
|
||||
@@ -11,6 +11,7 @@ public interface Packet<T extends PacketListener> {
|
||||
@ -43,10 +43,10 @@ index 2d8e6a2f4a..8d0965a053 100644
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 58eccd9c63..ef71a1feb3 100644
|
||||
index a0b87f89d..47710067a 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -20,6 +20,15 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -23,6 +23,15 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
public PacketPlayOutMapChunk() {}
|
||||
|
||||
@ -62,15 +62,15 @@ index 58eccd9c63..ef71a1feb3 100644
|
||||
public PacketPlayOutMapChunk(Chunk chunk, int i) {
|
||||
ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
|
||||
|
||||
@@ -42,6 +51,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
this.c = this.a(new PacketDataSerializer(this.i()), chunk, i);
|
||||
this.f = Lists.newArrayList();
|
||||
@@ -49,6 +58,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
this.c = this.a(new PacketDataSerializer(this.j()), chunk, i);
|
||||
this.g = Lists.newArrayList();
|
||||
iterator = chunk.getTileEntities().entrySet().iterator();
|
||||
+ int totalSigns = 0; // Paper
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
entry = (Entry) iterator.next();
|
||||
@@ -50,6 +60,14 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -57,6 +67,14 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
int j = blockposition.getY() >> 4;
|
||||
|
||||
if (this.f() || (i & 1 << j) != 0) {
|
||||
@ -86,5 +86,5 @@ index 58eccd9c63..ef71a1feb3 100644
|
||||
if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f936e3036737be2b1248454ca5569fb2d32f4a2c Mon Sep 17 00:00:00 2001
|
||||
From 35b6aeaf8f660351da0c23de6d030fed32b8ca97 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 2 Mar 2019 16:12:35 -0500
|
||||
Subject: [PATCH] MC-145260: Fix Whitelist On/Off inconsistency
|
||||
@ -11,7 +11,7 @@ everything to the Whitelist object.
|
||||
https://github.com/PaperMC/Paper/issues/1880
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/JsonList.java b/src/main/java/net/minecraft/server/JsonList.java
|
||||
index 8570e38f42..c97be42dd7 100644
|
||||
index 8570e38f4..c97be42dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/JsonList.java
|
||||
+++ b/src/main/java/net/minecraft/server/JsonList.java
|
||||
@@ -64,6 +64,7 @@ public class JsonList<K, V extends JsonListEntry<K>> {
|
||||
@ -23,7 +23,7 @@ index 8570e38f42..c97be42dd7 100644
|
||||
this.e = flag;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 52aa83f51f..0da3f95f89 100644
|
||||
index 659ce2181..62d807597 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -62,7 +62,7 @@ public abstract class PlayerList {
|
||||
@ -35,7 +35,7 @@ index 52aa83f51f..0da3f95f89 100644
|
||||
protected final int maxPlayers;
|
||||
private int viewDistance;
|
||||
private EnumGamemode t;
|
||||
@@ -899,9 +899,9 @@ public abstract class PlayerList {
|
||||
@@ -900,9 +900,9 @@ public abstract class PlayerList {
|
||||
}
|
||||
public boolean isWhitelisted(GameProfile gameprofile, org.bukkit.event.player.PlayerLoginEvent loginEvent) {
|
||||
boolean isOp = this.operators.d(gameprofile);
|
||||
@ -47,7 +47,7 @@ index 52aa83f51f..0da3f95f89 100644
|
||||
event.callEvent();
|
||||
if (!event.isWhitelisted()) {
|
||||
if (loginEvent != null) {
|
||||
@@ -1030,11 +1030,11 @@ public abstract class PlayerList {
|
||||
@@ -1031,11 +1031,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public boolean getHasWhitelist() {
|
||||
@ -62,5 +62,5 @@ index 52aa83f51f..0da3f95f89 100644
|
||||
|
||||
public List<EntityPlayer> b(String s) {
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8dbeb44fd71b383d5ce9432eb6cc52ebccecfe1e Mon Sep 17 00:00:00 2001
|
||||
From d757d0f8136435c7603b9d6b3480b0a6196c95dd Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 4 Mar 2019 02:23:28 -0500
|
||||
Subject: [PATCH] Set Zombie last tick at start of drowning process
|
||||
@ -6,17 +6,17 @@ Subject: [PATCH] Set Zombie last tick at start of drowning process
|
||||
Fixes GH-1887
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index cdaa7f636..99b2e7815 100644
|
||||
index 1c2c05ae3..7d882d9c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -169,6 +169,7 @@ public class EntityZombie extends EntityMonster {
|
||||
++this.bF;
|
||||
if (this.bF >= 600) {
|
||||
++this.bC;
|
||||
if (this.bC >= 600) {
|
||||
this.startDrownedConversion(300);
|
||||
+ this.lastTick = MinecraftServer.currentTick; // Paper - Make sure this is set at start of process - GH-1887
|
||||
}
|
||||
} else {
|
||||
this.bF = -1;
|
||||
this.bC = -1;
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 2247e4c12ed86bbd819042f1bfe93d01b4f1651a Mon Sep 17 00:00:00 2001
|
||||
From eb331fa777642613a299d6f552419119f496b88b Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||
Date: Wed, 13 Mar 2019 20:08:09 +0200
|
||||
Subject: [PATCH] Call WhitelistToggleEvent when whitelist is toggled
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 0da3f95f89..65df0e7c8c 100644
|
||||
index 62d807597..9d715d891 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1034,6 +1034,7 @@ public abstract class PlayerList {
|
||||
@@ -1035,6 +1035,7 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void setHasWhitelist(boolean flag) {
|
||||
@ -17,5 +17,5 @@ index 0da3f95f89..65df0e7c8c 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From d6ac301c41ce6cf739582b3dc2d2c250de86f591 Mon Sep 17 00:00:00 2001
|
||||
From 2739e42d97f124c9d29111cdb5a4f71fb7531336 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 22 Sep 2018 00:33:08 -0500
|
||||
Subject: [PATCH] Add LivingEntity#getTargetEntity
|
||||
@ -46,30 +46,30 @@ index 4f60b931a..c950139c0 100644
|
||||
double[] adouble = new double[]{1.0D};
|
||||
double d0 = vec3d1.x - vec3d.x;
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 75da08596..046e7e031 100644
|
||||
index 0f2480521..2e8aedf5f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1497,6 +1497,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1475,6 +1475,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.c(f - 90.0F, f1);
|
||||
}
|
||||
|
||||
+ public final Vec3D getEyePosition(float partialTicks) { return j(partialTicks); } // Paper - OBFHELPER
|
||||
public Vec3D j(float f) {
|
||||
public final Vec3D j(float f) {
|
||||
if (f == 1.0F) {
|
||||
return new Vec3D(this.locX, this.locY + (double) this.getHeadHeight(), this.locZ);
|
||||
@@ -2144,6 +2145,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return new Vec3D(this.locX(), this.getHeadY(), this.locZ());
|
||||
@@ -2126,6 +2127,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.getPassengers().size() < 1;
|
||||
}
|
||||
|
||||
+ public final float getCollisionBorderSize() { return aS(); } // Paper - OBFHELPER
|
||||
public float aS() {
|
||||
+ public final float getCollisionBorderSize() { return aV(); } // Paper - OBFHELPER
|
||||
public float aV() {
|
||||
return 0.0F;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index d23968a7c..31d14b19b 100644
|
||||
index 317321395..1b5acf77e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -3229,6 +3229,37 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -3304,6 +3304,37 @@ public abstract class EntityLiving extends Entity {
|
||||
return world.rayTrace(raytrace);
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ index d23968a7c..31d14b19b 100644
|
||||
|
||||
public int getShieldBlockingDelay() {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
index 9bf191945..56488b78d 100644
|
||||
index c1f462d9d..498f38109 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
@@ -18,6 +18,7 @@ public final class IEntitySelector {
|
||||
@ -158,5 +158,5 @@ index 6f4c6c589..b27fd44dc 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 346fc5c87003b5fafdddc35030c4b74e02beed34 Mon Sep 17 00:00:00 2001
|
||||
From 8bf37391928514c6346d1f8bc0c7453fecce0746 Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Wed, 20 Mar 2019 21:19:29 -0700
|
||||
Subject: [PATCH] Use proper max length when serialising BungeeCord text
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Use proper max length when serialising BungeeCord text
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
||||
index 0ab611564e..f7b2095bb7 100644
|
||||
index 0ab611564..f7b2095bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
|
||||
@@ -3,7 +3,7 @@ package net.minecraft.server;
|
||||
@ -31,5 +31,5 @@ index 0ab611564e..f7b2095bb7 100644
|
||||
// Paper end
|
||||
} else {
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0231190c616327c55a18f288e22e0a0f383c5073 Mon Sep 17 00:00:00 2001
|
||||
From b75ffe98136f18b12833b85396623dd3f66b421d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Mar 2019 00:24:52 -0400
|
||||
Subject: [PATCH] Entity#getEntitySpawnReason
|
||||
@ -10,18 +10,18 @@ persistenting Living Entity, SPAWNER for spawners,
|
||||
or DEFAULT since data was not stored.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 046e7e031c..f87514a200 100644
|
||||
index 2e8aedf5f..96b0917a3 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -68,6 +68,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -72,6 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
};
|
||||
List<Entity> entitySlice = null;
|
||||
+ public org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason;
|
||||
// Paper end
|
||||
static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
|
||||
return tag.hasKey("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
@@ -1642,6 +1643,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
@@ -1628,6 +1629,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
if (this.origin != null) {
|
||||
nbttagcompound.set("Paper.Origin", this.createList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
@ -31,7 +31,7 @@ index 046e7e031c..f87514a200 100644
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.setBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -1776,6 +1780,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1754,6 +1758,26 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbttagcompound.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -59,10 +59,10 @@ index 046e7e031c..f87514a200 100644
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index 65df0e7c8c..abddc8895e 100644
|
||||
index 9d715d891..49437f212 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -250,7 +250,7 @@ public abstract class PlayerList {
|
||||
@@ -251,7 +251,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit start
|
||||
WorldServer finalWorldServer = worldserver;
|
||||
Entity entity = EntityTypes.a(nbttagcompound1.getCompound("Entity"), finalWorldServer, (entity1) -> {
|
||||
@ -72,10 +72,10 @@ index 65df0e7c8c..abddc8895e 100644
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index dbd357f1a3..628ad8b839 100644
|
||||
index ecfcecfdc..63e7f2bce 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -978,6 +978,7 @@ public class WorldServer extends World {
|
||||
@@ -977,6 +977,7 @@ public class WorldServer extends World {
|
||||
// CraftBukkit start
|
||||
private boolean addEntity0(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("entity add"); // Spigot
|
||||
@ -84,10 +84,10 @@ index dbd357f1a3..628ad8b839 100644
|
||||
if (entity.valid) {
|
||||
MinecraftServer.LOGGER.error("Attempted Double World add on " + entity, new Throwable());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 517e422180..31db42e9fb 100644
|
||||
index 915ccb180..dfa15372b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1054,5 +1054,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1051,5 +1051,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public boolean fromMobSpawner() {
|
||||
return getHandle().spawnedViaMobSpawner;
|
||||
}
|
||||
@ -99,5 +99,5 @@ index 517e422180..31db42e9fb 100644
|
||||
// Paper end
|
||||
}
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 3408da94a3a428e0304b92ff3cdbd81bfc5df56e Mon Sep 17 00:00:00 2001
|
||||
From 077d7c29117573df85c77b5aa71d54f66ee94684 Mon Sep 17 00:00:00 2001
|
||||
From: AgentTroll <woodyc40@gmail.com>
|
||||
Date: Fri, 22 Mar 2019 22:24:03 -0700
|
||||
Subject: [PATCH] Update entity Metadata for all tracked players
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index cd7e0299ac..460c687d3e 100644
|
||||
index 3ff7a7b4a..3a88c9a67 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -379,6 +379,12 @@ public class EntityTrackerEntry {
|
||||
@@ -387,6 +387,12 @@ public class EntityTrackerEntry {
|
||||
return PacketPlayOutEntity.a(this.xLoc, this.yLoc, this.zLoc);
|
||||
}
|
||||
|
||||
@ -22,10 +22,10 @@ index cd7e0299ac..460c687d3e 100644
|
||||
this.f.accept(packet);
|
||||
if (this.tracker instanceof EntityPlayer) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index b030269f0a..79054b4519 100644
|
||||
index bd2ee459f..17eeecaf4 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1995,7 +1995,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -2005,7 +2005,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
if (event.isCancelled() || this.player.inventory.getItemInHand() == null || this.player.inventory.getItemInHand().getItem() != origItem) {
|
||||
// Refresh the current entity metadata
|
||||
@ -35,5 +35,5 @@ index b030269f0a..79054b4519 100644
|
||||
|
||||
if (event.isCancelled()) {
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 5f7d0017011a5ee2a1f0915926e5cc1b464d6abd Mon Sep 17 00:00:00 2001
|
||||
From 6b8d1c804d7bcb659c31061330a031032d71c2a7 Mon Sep 17 00:00:00 2001
|
||||
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
|
||||
Date: Sun, 17 Mar 2019 21:46:56 +0200
|
||||
Subject: [PATCH] Fire event on GS4 query
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/RemoteConnectionThread.java b/src/main/java/net/minecraft/server/RemoteConnectionThread.java
|
||||
index 66bfbcf02b..d821ef9a75 100644
|
||||
index 66bfbcf02..d821ef9a7 100644
|
||||
--- a/src/main/java/net/minecraft/server/RemoteConnectionThread.java
|
||||
+++ b/src/main/java/net/minecraft/server/RemoteConnectionThread.java
|
||||
@@ -15,7 +15,7 @@ public abstract class RemoteConnectionThread implements Runnable {
|
||||
@ -26,7 +26,7 @@ index 66bfbcf02b..d821ef9a75 100644
|
||||
return this.b.getPlayerCount();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RemoteStatusListener.java b/src/main/java/net/minecraft/server/RemoteStatusListener.java
|
||||
index a556a71334..67e94a6f07 100644
|
||||
index 16bb89af0..1b084f211 100644
|
||||
--- a/src/main/java/net/minecraft/server/RemoteStatusListener.java
|
||||
+++ b/src/main/java/net/minecraft/server/RemoteStatusListener.java
|
||||
@@ -21,19 +21,19 @@ public class RemoteStatusListener extends RemoteConnectionThread {
|
||||
@ -184,7 +184,7 @@ index a556a71334..67e94a6f07 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/RemoteStatusReply.java b/src/main/java/net/minecraft/server/RemoteStatusReply.java
|
||||
index 848b5c3f0e..73efea7e13 100644
|
||||
index 848b5c3f0..73efea7e1 100644
|
||||
--- a/src/main/java/net/minecraft/server/RemoteStatusReply.java
|
||||
+++ b/src/main/java/net/minecraft/server/RemoteStatusReply.java
|
||||
@@ -18,15 +18,27 @@ public class RemoteStatusReply {
|
||||
@ -216,5 +216,5 @@ index 848b5c3f0e..73efea7e13 100644
|
||||
this.b.writeShort(Short.reverseBytes(short0));
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 7b7c6d55b413eeb9a74ac496314f5670f4b884cd Mon Sep 17 00:00:00 2001
|
||||
From 80f6b71d88fd3e543e30dd3f8b5be133ae925d35 Mon Sep 17 00:00:00 2001
|
||||
From: MisterVector <whizkid3000@hotmail.com>
|
||||
Date: Fri, 26 Oct 2018 21:31:00 -0700
|
||||
Subject: [PATCH] Implement PlayerPostRespawnEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index abddc8895e..a183bb450d 100644
|
||||
index 49437f212..68e089a4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -637,9 +637,14 @@ public abstract class PlayerList {
|
||||
@@ -638,9 +638,14 @@ public abstract class PlayerList {
|
||||
|
||||
// this.a(entityplayer1, entityplayer, worldserver); // CraftBukkit - removed
|
||||
|
||||
@ -24,7 +24,7 @@ index abddc8895e..a183bb450d 100644
|
||||
CraftWorld cworld = (CraftWorld) this.server.server.getWorld(entityplayer.spawnWorld);
|
||||
if (cworld != null && blockposition != null) {
|
||||
Optional<Vec3D> optional = EntityHuman.getBed(cworld.getHandle(), blockposition, flag1);
|
||||
@@ -672,6 +677,7 @@ public abstract class PlayerList {
|
||||
@@ -673,6 +678,7 @@ public abstract class PlayerList {
|
||||
|
||||
location = respawnEvent.getRespawnLocation();
|
||||
if (!flag) entityplayer.reset(); // SPIGOT-4785
|
||||
@ -32,7 +32,7 @@ index abddc8895e..a183bb450d 100644
|
||||
} else {
|
||||
location.setWorld(server.getWorldServer(dimensionmanager).getWorld());
|
||||
}
|
||||
@@ -733,6 +739,13 @@ public abstract class PlayerList {
|
||||
@@ -734,6 +740,13 @@ public abstract class PlayerList {
|
||||
if (entityplayer.playerConnection.isDisconnected()) {
|
||||
this.savePlayerFile(entityplayer);
|
||||
}
|
||||
@ -47,5 +47,5 @@ index abddc8895e..a183bb450d 100644
|
||||
return entityplayer1;
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From b4ca29ecbed23d7c2d09e89fa3e224678f4a141c Mon Sep 17 00:00:00 2001
|
||||
From 69bf21627466c0f99fe7a6f3acb17c13a5926a5d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Mar 2019 18:09:20 -0400
|
||||
Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] don't go below 0 for pickupDelay, breaks picking up items
|
||||
vanilla checks for == 0
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItem.java b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
index 6e026d34f0..2091698953 100644
|
||||
index 5f46c7f86..a0d1e7fd2 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItem.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItem.java
|
||||
@@ -59,6 +59,7 @@ public class EntityItem extends Entity {
|
||||
@@ -60,6 +60,7 @@ public class EntityItem extends Entity {
|
||||
// CraftBukkit start - Use wall time for pickup and despawn timers
|
||||
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
|
||||
@ -17,7 +17,7 @@ index 6e026d34f0..2091698953 100644
|
||||
if (this.age != -32768) this.age += elapsedTicks;
|
||||
this.lastTick = MinecraftServer.currentTick;
|
||||
// CraftBukkit end
|
||||
@@ -145,6 +146,7 @@ public class EntityItem extends Entity {
|
||||
@@ -146,6 +147,7 @@ public class EntityItem extends Entity {
|
||||
// CraftBukkit start - Use wall time for pickup and despawn timers
|
||||
int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
|
||||
if (this.pickupDelay != 32767) this.pickupDelay -= elapsedTicks;
|
||||
@ -26,5 +26,5 @@ index 6e026d34f0..2091698953 100644
|
||||
this.lastTick = MinecraftServer.currentTick;
|
||||
// CraftBukkit end
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 3a20b44acacbc7b96b475d29da37133f72475b63 Mon Sep 17 00:00:00 2001
|
||||
From dd55113d530d2bb27380c70856539f37a0c50f41 Mon Sep 17 00:00:00 2001
|
||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||
Date: Sat, 6 Oct 2018 20:54:23 -0500
|
||||
Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Implement getters and setters for EntityItem owner and
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
index 3f552b5905..cb756b1ba0 100644
|
||||
index 3f552b590..cb756b1ba 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
|
||||
@@ -8,6 +8,11 @@ import org.bukkit.entity.EntityType;
|
||||
@ -51,5 +51,5 @@ index 3f552b5905..cb756b1ba0 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ff943edcb4161947dfae5545652ab4b9c2415a9a Mon Sep 17 00:00:00 2001
|
||||
From 8274ef9fa1e61024cc18be25d3d0c7e549229617 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Mar 2019 22:48:45 -0400
|
||||
Subject: [PATCH] Server Tick Events
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
|
||||
Fires event at start and end of a server tick
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a7b63ab421..24dccfb7a1 100644
|
||||
index 8fc55d31a..c023848c7 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1072,6 +1072,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1080,6 +1080,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Paper end
|
||||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
long i = SystemUtils.getMonotonicNanos();
|
||||
@ -17,7 +17,7 @@ index a7b63ab421..24dccfb7a1 100644
|
||||
|
||||
++this.ticks;
|
||||
this.b(booleansupplier);
|
||||
@@ -1123,6 +1124,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1131,6 +1132,11 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.executeAll();
|
||||
}
|
||||
// Paper end
|
||||
@ -30,5 +30,5 @@ index a7b63ab421..24dccfb7a1 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f7303a80c92c8bdc5705ebf7afcda3f5a802fc8a Mon Sep 17 00:00:00 2001
|
||||
From f99fd489c3c0c983412fe5588269d8e2a8b58ecf Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 27 Mar 2019 23:01:33 -0400
|
||||
Subject: [PATCH] PlayerDeathEvent#getItemsToKeep
|
||||
@ -8,7 +8,7 @@ Exposes a mutable array on items a player should keep on death
|
||||
Example Usage: https://gist.github.com/aikar/5bb202de6057a051a950ce1f29feb0b4
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index a191d6246..18695d9b5 100644
|
||||
index cc9e69651..ca2398386 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -510,6 +510,46 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
@ -73,5 +73,5 @@ index a191d6246..18695d9b5 100644
|
||||
|
||||
this.setSpectatorTarget(this); // Remove spectated target
|
||||
--
|
||||
2.22.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 44377891791b199d2a2e184c905942fe07ae24a5 Mon Sep 17 00:00:00 2001
|
||||
From bed92ef07ed1a7c0514c36dd12f20aaba86cbc66 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 6 Apr 2019 10:16:48 -0400
|
||||
Subject: [PATCH] Optimize Captured TileEntity Lookup
|
||||
@ -10,10 +10,10 @@ Optimize to check if the captured list even has values in it, and also to
|
||||
just do a get call since the value can never be null.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index dad0c893f..dd2a9c6e5 100644
|
||||
index 61a3ddc4d..dfc695084 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1082,12 +1082,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -1000,12 +1000,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return null;
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
@ -29,7 +29,7 @@ index dad0c893f..dd2a9c6e5 100644
|
||||
+ //TileEntity tileentity = null; // Paper - move up
|
||||
|
||||
if (this.tickingTileEntities) {
|
||||
tileentity = this.A(blockposition);
|
||||
tileentity = this.e(blockposition);
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 8cf24e97fb891543763665534d39638d6b324a0d Mon Sep 17 00:00:00 2001
|
||||
From 67f62dfa1ad2c6ea8104461749bd2b43b94bb366 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Tue, 1 Jan 2019 02:22:01 -0800
|
||||
Subject: [PATCH] Add Heightmap API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index dd2a9c6e59..e3b4e30e65 100644
|
||||
index dfc695084..10bb06489 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -663,8 +663,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -577,8 +577,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
}
|
||||
|
||||
@ -20,10 +20,10 @@ index dd2a9c6e59..e3b4e30e65 100644
|
||||
|
||||
if (i >= -30000000 && j >= -30000000 && i < 30000000 && j < 30000000) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 78a2c47c5a..95fdc3bf64 100644
|
||||
index 578fe8d19..12362d560 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -339,6 +339,29 @@ public class CraftWorld implements World {
|
||||
@@ -340,6 +340,29 @@ public class CraftWorld implements World {
|
||||
return world.getHighestBlockYAt(HeightMap.Type.MOTION_BLOCKING, new BlockPosition(x, 0, z)).getY();
|
||||
}
|
||||
|
||||
@ -54,5 +54,5 @@ index 78a2c47c5a..95fdc3bf64 100644
|
||||
public Location getSpawnLocation() {
|
||||
BlockPosition spawn = world.getSpawn();
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From e44fa7d596b9d2d5a3f39a0d377d0f9606248d9c Mon Sep 17 00:00:00 2001
|
||||
From 30d0d58e6914e05dbcb03e73d6d87c8848013bfc Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Fri, 19 Apr 2019 12:41:13 -0500
|
||||
Subject: [PATCH] Mob Spawner API Enhancements
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index 079099e30..b05f6c2f2 100644
|
||||
index 90ca1ee14..b179893a1 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -46,6 +46,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -47,6 +47,7 @@ public abstract class MobSpawnerAbstract {
|
||||
this.mobs.clear(); // CraftBukkit - SPIGOT-3496, MC-92282
|
||||
}
|
||||
|
||||
@ -103,5 +103,5 @@ index 5c4c3c70c..e78e3804b 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 169c744e147e554e58feafd2c9ccb990eb99e5fa Mon Sep 17 00:00:00 2001
|
||||
From d5f010e8360f67f7b54f41e19be07f238fee2896 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach@zachbr.io>
|
||||
Date: Mon, 6 May 2019 01:29:25 -0400
|
||||
Subject: [PATCH] Per-Player View Distance API placeholders
|
||||
@ -7,10 +7,10 @@ I hope to look at this more in-depth soon. It appears doable.
|
||||
However this should not block the update.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
index c2f35f89d..c8c74f2b3 100644
|
||||
index 3df8e30ec..9acdd6e56 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
|
||||
@@ -570,9 +570,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
@@ -579,9 +579,9 @@ public class EntityEnderDragon extends EntityInsentient implements IMonster {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.b(1028, new BlockPosition(this), 0);
|
||||
// Paper start
|
||||
@ -20,10 +20,10 @@ index c2f35f89d..c8c74f2b3 100644
|
||||
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
// Paper end
|
||||
double deltaX = this.locX - player.locX;
|
||||
double deltaZ = this.locZ - player.locZ;
|
||||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityWither.java b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
index 18151acd5..8b3052b11 100644
|
||||
index 2e95069c1..8977c3516 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityWither.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityWither.java
|
||||
@@ -208,9 +208,9 @@ public class EntityWither extends EntityMonster implements IRangedEntity {
|
||||
@ -36,13 +36,13 @@ index 18151acd5..8b3052b11 100644
|
||||
- final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
+ //final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
|
||||
// Paper end
|
||||
double deltaX = this.locX - player.locX;
|
||||
double deltaZ = this.locZ - player.locZ;
|
||||
double deltaX = this.locX() - player.locX();
|
||||
double deltaZ = this.locZ() - player.locZ();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9fa55ef6f..e920545df 100644
|
||||
index 4b847ddd8..049ebf4c4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1983,6 +1983,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1967,6 +1967,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
super.remove();
|
||||
}
|
||||
}
|
||||
@ -56,9 +56,9 @@ index 9fa55ef6f..e920545df 100644
|
||||
+ public void setViewDistance(int viewDistance) {
|
||||
+ throw new NotImplementedException("Per-Player View Distance APIs need further understanding to properly implement"); // TODO
|
||||
+ }
|
||||
//Paper end
|
||||
// Paper end
|
||||
|
||||
// Spigot start
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 77e3bff66143458b16f6ddfb0510d254faecf0c4 Mon Sep 17 00:00:00 2001
|
||||
From 84cd561af5130ce02ebfdbe04339b9e1765fe28d Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Fri, 10 May 2019 18:38:19 +0100
|
||||
Subject: [PATCH] Fix CB call to changed postToMainThread method
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 37b97438c..4a16d6c14 100644
|
||||
index 17eeecaf4..8c54022e0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -283,7 +283,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -286,7 +286,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
||||
this.networkManager.getClass();
|
||||
// CraftBukkit - Don't wait
|
||||
@ -18,5 +18,5 @@ index 37b97438c..4a16d6c14 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 0af4cd795675fc8e5128e0648464aab87edf887c Mon Sep 17 00:00:00 2001
|
||||
From 81e5cb6c7eadf2b99c00fca4c658e92efb7ca794 Mon Sep 17 00:00:00 2001
|
||||
From: Phoenix616 <mail@moep.tv>
|
||||
Date: Sat, 27 Apr 2019 20:00:43 +0100
|
||||
Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
|
||||
@ -6,10 +6,10 @@ Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
|
||||
This also fixes the adding sound playing when the item frame direction is changed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
|
||||
index 6f6837ec4..b078435c6 100644
|
||||
index 9b1e07452..f8a2f32f1 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
|
||||
@@ -226,7 +226,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
@@ -224,7 +224,7 @@ public class EntityItemFrame extends EntityHanging {
|
||||
}
|
||||
|
||||
this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack);
|
||||
@ -32,5 +32,5 @@ index 799036f26..9ad180d94 100644
|
||||
this.entity = frame;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 046a05122f1c0f770d9264ec32064c9631b3f9bf Mon Sep 17 00:00:00 2001
|
||||
From 80988fcf00fd1246ec08ce046e879c533490e166 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Mon, 13 May 2019 21:10:59 -0700
|
||||
Subject: [PATCH] Fix CraftServer#isPrimaryThread and MinecraftServer
|
||||
@ -16,10 +16,10 @@ handling that should have been handled synchronously will be handled
|
||||
synchronously when the server gets shut down.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 24dccfb7a1..ee02001700 100644
|
||||
index c023848c7..443e727dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2171,7 +2171,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -2200,7 +2200,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// CraftBukkit start
|
||||
@Override
|
||||
public boolean isMainThread() {
|
||||
@ -29,10 +29,10 @@ index 24dccfb7a1..ee02001700 100644
|
||||
|
||||
@Deprecated
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b89486beb1..7a8ab7d401 100644
|
||||
index 58b343259..18b76ed0f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1664,7 +1664,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1667,7 +1667,7 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public boolean isPrimaryThread() {
|
||||
@ -42,5 +42,5 @@ index b89486beb1..7a8ab7d401 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 42147b7cc99cfae2e2f4ba937be928a59b63f0b5 Mon Sep 17 00:00:00 2001
|
||||
From 81e442b2df9ec4a2067421826002e569cb0f0ddd Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Fri, 28 Sep 2018 21:49:53 -0400
|
||||
Subject: [PATCH] Fix issues with entity loss due to unloaded chunks
|
||||
@ -19,27 +19,27 @@ This change ensures the chunks are always loaded when entities are
|
||||
added to the world, or a valid entity moves between chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 628ad8b839..cc2c139904 100644
|
||||
index 63e7f2bce..0138738b3 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -675,7 +675,7 @@ public class WorldServer extends World {
|
||||
@@ -684,7 +684,7 @@ public class WorldServer extends World {
|
||||
this.getChunkAt(entity.chunkX, entity.chunkZ).a(entity, entity.chunkY);
|
||||
}
|
||||
|
||||
- if (!entity.bU() && !this.isChunkLoaded(i, k)) {
|
||||
+ if (!entity.valid && !entity.bU() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location
|
||||
- if (!entity.cc() && !this.isChunkLoaded(i, k)) {
|
||||
+ if (!entity.valid && !entity.cc() && !this.isChunkLoaded(i, k)) { // Paper - always load chunks to register valid entities location
|
||||
entity.inChunk = false;
|
||||
} else {
|
||||
this.getChunkAt(i, k).a(entity);
|
||||
@@ -1010,7 +1010,7 @@ public class WorldServer extends World {
|
||||
@@ -1009,7 +1009,7 @@ public class WorldServer extends World {
|
||||
return false;
|
||||
}
|
||||
// CraftBukkit end
|
||||
- IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX / 16.0D), MathHelper.floor(entity.locZ / 16.0D), ChunkStatus.FULL, entity.attachedToPlayer);
|
||||
+ IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX / 16.0D), MathHelper.floor(entity.locZ / 16.0D), ChunkStatus.FULL, true); // Paper - always load chunks for entity adds
|
||||
- IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX() / 16.0D), MathHelper.floor(entity.locZ() / 16.0D), ChunkStatus.FULL, entity.attachedToPlayer);
|
||||
+ IChunkAccess ichunkaccess = this.getChunkAt(MathHelper.floor(entity.locX() / 16.0D), MathHelper.floor(entity.locZ() / 16.0D), ChunkStatus.FULL, true); // Paper - always load chunks for entity adds
|
||||
|
||||
if (!(ichunkaccess instanceof Chunk)) {
|
||||
return false;
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 8b9d55b7935238a4142c03140a818bbdfc72dc5e Mon Sep 17 00:00:00 2001
|
||||
From 6e44f48dc3266fee79360c7400a2f371543c7de8 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 21 Jul 2018 14:27:34 -0400
|
||||
Subject: [PATCH] Duplicate UUID Resolve Option
|
||||
@ -33,7 +33,7 @@ But for those who are ok with leaving this inconsistent behavior, you may use WA
|
||||
It is recommended you regenerate the entities, as these were legit entities, and deserve your love.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index cf9470057..2cf5ef8b7 100644
|
||||
index 3b1289099..14fa5fdb7 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -449,4 +449,43 @@ public class PaperWorldConfig {
|
||||
@ -81,31 +81,31 @@ index cf9470057..2cf5ef8b7 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 09e010e67..ee8f80174 100644
|
||||
index c7c600b80..64c327669 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -397,6 +397,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -391,6 +391,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (i != this.loc.x || j != this.loc.z) {
|
||||
Chunk.LOGGER.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.loc.x, this.loc.z, entity);
|
||||
entity.dead = true;
|
||||
+ return; // Paper
|
||||
}
|
||||
|
||||
int k = MathHelper.floor(entity.locY / 16.0D);
|
||||
int k = MathHelper.floor(entity.locY() / 16.0D);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index f87514a20..55c73ffca 100644
|
||||
index 96b0917a3..f0d1a5b14 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -2728,6 +2728,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -2735,6 +2735,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
});
|
||||
}
|
||||
|
||||
+ public void setUUID(UUID uuid) { a(uuid); } // Paper - OBFHELPER
|
||||
public void a(UUID uuid) {
|
||||
this.uniqueID = uuid;
|
||||
this.ap = this.uniqueID.toString();
|
||||
this.am = this.uniqueID.toString();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index db938da25..82b7d328a 100644
|
||||
index a2b09597f..5fd001170 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -116,11 +116,12 @@ index db938da25..82b7d328a 100644
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.collect.ComparisonChain; // Paper
|
||||
@@ -22,13 +23,16 @@ import java.io.File;
|
||||
@@ -22,14 +23,17 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.util.ArrayList;
|
||||
+import java.util.HashMap; // Paper
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
+import java.util.Map; // Paper
|
||||
@ -133,7 +134,7 @@ index db938da25..82b7d328a 100644
|
||||
import java.util.concurrent.CompletableFuture;
|
||||
import java.util.concurrent.CompletionException;
|
||||
import java.util.concurrent.Executor;
|
||||
@@ -593,19 +597,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -594,19 +598,55 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
List<Entity> entityslice = aentityslice[j]; // Spigot
|
||||
@ -200,7 +201,7 @@ index db938da25..82b7d328a 100644
|
||||
if (list == null) {
|
||||
list = Lists.newArrayList(new Entity[]{entity});
|
||||
} else {
|
||||
@@ -613,6 +653,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -614,6 +654,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -209,19 +210,19 @@ index db938da25..82b7d328a 100644
|
||||
|
||||
if (list != null) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index cc2c13990..29bb795f7 100644
|
||||
index 0138738b3..d59eee27a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
|
||||
import co.aikar.timings.TimingHistory;
|
||||
import co.aikar.timings.Timings;
|
||||
@@ -3,6 +3,8 @@ package net.minecraft.server;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import co.aikar.timings.TimingHistory; // Paper
|
||||
import co.aikar.timings.Timings; // Paper
|
||||
+
|
||||
+import com.destroystokyo.paper.PaperWorldConfig;
|
||||
+import com.destroystokyo.paper.PaperWorldConfig; // Paper
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -1037,8 +1039,23 @@ public class WorldServer extends World {
|
||||
@@ -1036,8 +1038,23 @@ public class WorldServer extends World {
|
||||
if (entity1 == null) {
|
||||
return false;
|
||||
} else {
|
||||
@ -247,7 +248,7 @@ index cc2c13990..29bb795f7 100644
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -1177,7 +1194,7 @@ public class WorldServer extends World {
|
||||
@@ -1176,7 +1193,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
Entity old = this.entitiesByUUID.put(entity.getUniqueID(), entity);
|
||||
@ -257,5 +258,5 @@ index cc2c13990..29bb795f7 100644
|
||||
logger.error("Overwrote an existing entity " + old + " with " + entity);
|
||||
if (DEBUG_ENTITIES) {
|
||||
--
|
||||
2.24.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From f84670030019a4d9d6287a8dbdcc63e25d7f50f0 Mon Sep 17 00:00:00 2001
|
||||
From 5c3534a9d83d87e197cb35ab9b6bd5c6ba667e2d Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Tue, 21 May 2019 02:34:04 +0100
|
||||
Subject: [PATCH] improve CraftWorld#isChunkLoaded
|
||||
@ -9,10 +9,10 @@ waiting for the execution queue to get to our request; We can just query
|
||||
the chunk status and get a response now, vs having to wait
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 95fdc3bf64..f2a68ec360 100644
|
||||
index 12362d560..29c14c707 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -403,14 +403,13 @@ public class CraftWorld implements World {
|
||||
@@ -404,14 +404,13 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public boolean isChunkLoaded(int x, int z) {
|
||||
@ -24,11 +24,11 @@ index 95fdc3bf64..f2a68ec360 100644
|
||||
@Override
|
||||
public boolean isChunkGenerated(int x, int z) {
|
||||
try {
|
||||
- return isChunkLoaded(x, z) || world.getChunkProvider().playerChunkMap.chunkExists(new ChunkCoordIntPair(x, z));
|
||||
+ return world.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null || world.getChunkProvider().playerChunkMap.chunkExists(new ChunkCoordIntPair(x, z)); // Paper
|
||||
- return isChunkLoaded(x, z) || world.getChunkProvider().playerChunkMap.read(new ChunkCoordIntPair(x, z)) != null;
|
||||
+ return world.getChunkProvider().getChunkAtIfCachedImmediately(x, z) != null || world.getChunkProvider().playerChunkMap.read(new ChunkCoordIntPair(x, z)) != null; // Paper (TODO check if the first part can be removed)
|
||||
} catch (IOException ex) {
|
||||
throw new RuntimeException(ex);
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 56cea870900e4546d9979bc37bf98f70f31af32f Mon Sep 17 00:00:00 2001
|
||||
From ee1545f6f3c072ea6581746932140afd43ddb8d5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 13 Sep 2014 23:14:43 -0400
|
||||
Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
This lets you disable it for some worlds and lower it for others.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index acc84eec1..9ff115294 100644
|
||||
index 14fa5fdb7..332f20ce8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -488,4 +488,10 @@ public class PaperWorldConfig {
|
||||
@ -21,10 +21,10 @@ index acc84eec1..9ff115294 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ee0200170..a6f112bd0 100644
|
||||
index 443e727dc..0a7648381 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -577,6 +577,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -585,6 +585,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.forceTicks = true;
|
||||
// CraftBukkit end
|
||||
|
||||
@ -39,7 +39,7 @@ index ee0200170..a6f112bd0 100644
|
||||
MinecraftServer.LOGGER.info("Preparing start region for dimension '{}'/{}", worldserver.getWorldData().getName(), DimensionManager.a(worldserver.worldProvider.getDimensionManager().getType())); // CraftBukkit
|
||||
BlockPosition blockposition = worldserver.getSpawn();
|
||||
|
||||
@@ -585,14 +593,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -593,14 +601,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
chunkproviderserver.getLightEngine().a(500);
|
||||
this.nextTick = SystemUtils.getMonotonicMillis();
|
||||
@ -114,10 +114,10 @@ index 3868572ae..ae77805f7 100644
|
||||
@Override
|
||||
public void a(ChunkCoordIntPair chunkcoordintpair) {
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 29bb795f7..3acea575d 100644
|
||||
index d59eee27a..c28c0431a 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1559,13 +1559,85 @@ public class WorldServer extends World {
|
||||
@@ -1557,13 +1557,85 @@ public class WorldServer extends World {
|
||||
return ((PersistentIdCounts) this.getMinecraftServer().getWorldServer(DimensionManager.OVERWORLD).getWorldPersistentData().a(PersistentIdCounts::new, "idcounts")).a();
|
||||
}
|
||||
|
||||
@ -207,10 +207,10 @@ index 29bb795f7..3acea575d 100644
|
||||
|
||||
public LongSet getForceLoadedChunks() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index f2a68ec36..e42bd2638 100644
|
||||
index 29c14c707..b1ae19be7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -1872,15 +1872,21 @@ public class CraftWorld implements World {
|
||||
@@ -1882,15 +1882,21 @@ public class CraftWorld implements World {
|
||||
|
||||
@Override
|
||||
public void setKeepSpawnInMemory(boolean keepLoaded) {
|
||||
@ -237,5 +237,5 @@ index f2a68ec36..e42bd2638 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From 7e0cc05d027bb79c8a9e1e3fbe644421570e3bd5 Mon Sep 17 00:00:00 2001
|
||||
From 49c037cf9446052db43e1254b2f02850c5d5f9ef Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Fri, 24 May 2019 07:53:16 +0100
|
||||
Subject: [PATCH] Fix some generation concurrency issues
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index e3b4e30e6..10c149fae 100644
|
||||
index 10bb06489..9ad76ab32 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -101,6 +101,23 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -100,6 +100,23 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
private int tileTickPosition;
|
||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
||||
public java.util.ArrayDeque<BlockRedstoneTorch.RedstoneUpdateInfo> redstoneUpdateInfos; // Paper - Move from Map in BlockRedstoneTorch to here
|
||||
@ -33,7 +33,7 @@ index e3b4e30e6..10c149fae 100644
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldGenStronghold.java b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
index ddf726867..c2188ceef 100644
|
||||
index b34a0683a..e002ed53f 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldGenStronghold.java
|
||||
@@ -10,10 +10,12 @@ import javax.annotation.Nullable;
|
||||
@ -42,9 +42,9 @@ index ddf726867..c2188ceef 100644
|
||||
|
||||
+ /* // Paper start - no shared state
|
||||
private boolean a;
|
||||
private ChunkCoordIntPair[] aS;
|
||||
private final List<StructureStart> aT = Lists.newArrayList();
|
||||
private long aU;
|
||||
private ChunkCoordIntPair[] aq;
|
||||
private final List<StructureStart> ar = Lists.newArrayList();
|
||||
private long as;
|
||||
+ */
|
||||
|
||||
public WorldGenStronghold(Function<Dynamic<?>, ? extends WorldGenFeatureEmptyConfiguration> function) {
|
||||
@ -52,10 +52,10 @@ index ddf726867..c2188ceef 100644
|
||||
@@ -21,16 +23,22 @@ public class WorldGenStronghold extends StructureGenerator<WorldGenFeatureEmptyC
|
||||
|
||||
@Override
|
||||
public boolean a(ChunkGenerator<?> chunkgenerator, Random random, int i, int j) {
|
||||
public boolean a(BiomeManager biomemanager, ChunkGenerator<?> chunkgenerator, Random random, int i, int j, BiomeBase biomebase) {
|
||||
+ // Paper start
|
||||
+ /*
|
||||
if (this.aU != chunkgenerator.getSeed()) {
|
||||
if (this.as != chunkgenerator.getSeed()) {
|
||||
this.d();
|
||||
}
|
||||
+ */
|
||||
@ -71,7 +71,7 @@ index ddf726867..c2188ceef 100644
|
||||
+ }}
|
||||
+ // Paper end
|
||||
|
||||
- ChunkCoordIntPair[] achunkcoordintpair = this.aS;
|
||||
- ChunkCoordIntPair[] achunkcoordintpair = this.aq;
|
||||
+ ChunkCoordIntPair[] achunkcoordintpair = world.strongholdCoords; // Paper
|
||||
int k = achunkcoordintpair.length;
|
||||
|
||||
@ -82,8 +82,8 @@ index ddf726867..c2188ceef 100644
|
||||
private void d() {
|
||||
+ /* // Paper
|
||||
this.a = false;
|
||||
this.aS = null;
|
||||
this.aT.clear();
|
||||
this.aq = null;
|
||||
this.ar.clear();
|
||||
+ */ // Paper
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ index ddf726867..c2188ceef 100644
|
||||
} else {
|
||||
+ // Paper start - no shared state
|
||||
+ /*
|
||||
if (this.aU != world.getSeed()) {
|
||||
if (this.as != world.getSeed()) {
|
||||
this.d();
|
||||
}
|
||||
+ */
|
||||
@ -120,7 +120,7 @@ index ddf726867..c2188ceef 100644
|
||||
BlockPosition blockposition1 = null;
|
||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||
double d0 = Double.MAX_VALUE;
|
||||
- ChunkCoordIntPair[] achunkcoordintpair = this.aS;
|
||||
- ChunkCoordIntPair[] achunkcoordintpair = this.aq;
|
||||
+ ChunkCoordIntPair[] achunkcoordintpair = world.strongholdCoords; // Paper
|
||||
int j = achunkcoordintpair.length;
|
||||
|
||||
@ -129,8 +129,8 @@ index ddf726867..c2188ceef 100644
|
||||
}
|
||||
|
||||
private void a(ChunkGenerator<?> chunkgenerator) {
|
||||
- this.aU = chunkgenerator.getSeed();
|
||||
+ //this.aU = chunkgenerator.getSeed(); // Paper
|
||||
- this.as = chunkgenerator.getSeed();
|
||||
+ //this.as = chunkgenerator.getSeed(); // Paper
|
||||
List<BiomeBase> list = Lists.newArrayList();
|
||||
Iterator iterator = IRegistry.BIOME.iterator();
|
||||
|
||||
@ -138,17 +138,17 @@ index ddf726867..c2188ceef 100644
|
||||
int j = chunkgenerator.getSettings().f();
|
||||
int k = chunkgenerator.getSettings().g();
|
||||
|
||||
- this.aS = new ChunkCoordIntPair[j];
|
||||
- this.aq = new ChunkCoordIntPair[j];
|
||||
+ ChunkCoordIntPair[] strongholdCoords = chunkgenerator.getWorld().strongholdCoords = new ChunkCoordIntPair[j]; // Paper
|
||||
int l = 0;
|
||||
- Iterator iterator1 = this.aT.iterator();
|
||||
- Iterator iterator1 = this.ar.iterator();
|
||||
+ Iterator iterator1 = chunkgenerator.getWorld().strongholdStuctures.iterator(); // Paper
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
StructureStart structurestart = (StructureStart) iterator1.next();
|
||||
|
||||
- if (l < this.aS.length) {
|
||||
- this.aS[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g());
|
||||
- if (l < this.aq.length) {
|
||||
- this.aq[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g());
|
||||
+ if (l < strongholdCoords.length) { // Paper
|
||||
+ strongholdCoords[l++] = new ChunkCoordIntPair(structurestart.f(), structurestart.g()); // Paper
|
||||
}
|
||||
@ -158,12 +158,12 @@ index ddf726867..c2188ceef 100644
|
||||
double d0 = random.nextDouble() * 3.141592653589793D * 2.0D;
|
||||
int i1 = l;
|
||||
|
||||
- if (l < this.aS.length) {
|
||||
- if (l < this.aq.length) {
|
||||
+ if (l < strongholdCoords.length) { // Paper
|
||||
int j1 = 0;
|
||||
int k1 = 0;
|
||||
|
||||
- for (int l1 = 0; l1 < this.aS.length; ++l1) {
|
||||
- for (int l1 = 0; l1 < this.aq.length; ++l1) {
|
||||
+ for (int l1 = 0; l1 < strongholdCoords.length; ++l1) { // Paper
|
||||
double d1 = (double) (4 * i + i * k1 * 6) + (random.nextDouble() - 0.5D) * (double) i * 2.5D;
|
||||
int i2 = (int) Math.round(Math.cos(d0) * d1);
|
||||
@ -172,7 +172,7 @@ index ddf726867..c2188ceef 100644
|
||||
}
|
||||
|
||||
if (l1 >= i1) {
|
||||
- this.aS[l1] = new ChunkCoordIntPair(i2, j2);
|
||||
- this.aq[l1] = new ChunkCoordIntPair(i2, j2);
|
||||
+ strongholdCoords[l1] = new ChunkCoordIntPair(i2, j2); // Paper
|
||||
}
|
||||
|
||||
@ -181,8 +181,8 @@ index ddf726867..c2188ceef 100644
|
||||
++k1;
|
||||
j1 = 0;
|
||||
k += 2 * k / (k1 + 1);
|
||||
- k = Math.min(k, this.aS.length - l1);
|
||||
+ k = Math.min(k, strongholdCoords.length - l1);
|
||||
- k = Math.min(k, this.aq.length - l1);
|
||||
+ k = Math.min(k, strongholdCoords.length - l1); // Paper
|
||||
d0 += random.nextDouble() * 3.141592653589793D * 2.0D;
|
||||
}
|
||||
}
|
||||
@ -190,11 +190,11 @@ index ddf726867..c2188ceef 100644
|
||||
this.a(chunkgenerator.getSeaLevel(), this.d, 10);
|
||||
} while (this.b.isEmpty() || worldgenstrongholdpieces_worldgenstrongholdstart.b == null);
|
||||
|
||||
- ((WorldGenStronghold) this.k()).aT.add(this);
|
||||
- ((WorldGenStronghold) this.l()).ar.add(this);
|
||||
+ chunkgenerator.getWorld().strongholdStuctures.add(this); // Paper - this worries me, this is never cleared, even in vanilla (world seed never changes "world", and that appears to be the only relevant world)
|
||||
}
|
||||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 829f83cc7a910c4c2b7669b98d26324284495d20 Mon Sep 17 00:00:00 2001
|
||||
From 6e461a1d9d95e3f023050c86cf602b587c5ab9f5 Mon Sep 17 00:00:00 2001
|
||||
From: William Blake Galbreath <blake.galbreath@gmail.com>
|
||||
Date: Mon, 27 May 2019 17:35:39 -0500
|
||||
Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
|
||||
@ -6,7 +6,7 @@ Subject: [PATCH] MC-114618 - Fix EntityAreaEffectCloud from going negative
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
|
||||
index 3a8e10533..fe527aba5 100644
|
||||
index e8f3e55fd..44289c230 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityAreaEffectCloud.java
|
||||
@@ -175,6 +175,12 @@ public class EntityAreaEffectCloud extends Entity {
|
||||
@ -23,5 +23,5 @@ index 3a8e10533..fe527aba5 100644
|
||||
if (this.world.isClientSide) {
|
||||
ParticleParam particleparam = this.getParticle();
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,14 +1,14 @@
|
||||
From f740ce691e50b45b0fb0b729ce92c5e1ead81226 Mon Sep 17 00:00:00 2001
|
||||
From b138edb74998577db55d22d2f38ebd72a698fda2 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Wed, 29 May 2019 04:01:22 +0100
|
||||
Subject: [PATCH] ChunkMapDistance CME
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkMapDistance.java b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
index 101eb58ac..63a688725 100644
|
||||
index a35f0e18b..8c1945687 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkMapDistance.java
|
||||
@@ -36,7 +36,7 @@ public abstract class ChunkMapDistance {
|
||||
@@ -33,7 +33,7 @@ public abstract class ChunkMapDistance {
|
||||
private final ChunkMapDistance.a e = new ChunkMapDistance.a();
|
||||
private final ChunkMapDistance.b f = new ChunkMapDistance.b(8);
|
||||
private final ChunkMapDistance.c g = new ChunkMapDistance.c(33);
|
||||
@ -17,7 +17,7 @@ index 101eb58ac..63a688725 100644
|
||||
private final ChunkTaskQueueSorter i;
|
||||
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> j;
|
||||
private final Mailbox<ChunkTaskQueueSorter.b> k;
|
||||
@@ -99,26 +99,12 @@ public abstract class ChunkMapDistance {
|
||||
@@ -94,26 +94,12 @@ public abstract class ChunkMapDistance {
|
||||
;
|
||||
}
|
||||
|
||||
@ -50,5 +50,5 @@ index 101eb58ac..63a688725 100644
|
||||
} else {
|
||||
if (!this.l.isEmpty()) {
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From c2bb45f28211e458441b8898073e13cc9cf3cb52 Mon Sep 17 00:00:00 2001
|
||||
From fe324f134505b5c854c8ad4e6be09292e86586ff Mon Sep 17 00:00:00 2001
|
||||
From: simpleauthority <jacob@algorithmjunkie.com>
|
||||
Date: Tue, 28 May 2019 03:48:51 -0700
|
||||
Subject: [PATCH] Implement CraftBlockSoundGroup
|
||||
@ -49,10 +49,10 @@ index 000000000..99f99330d
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
index 9fd1b4915..21f734a73 100644
|
||||
index 8fb0b5af0..276f207a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
@@ -271,6 +271,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
@@ -275,6 +275,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
return this.getBlock().isTicking(this);
|
||||
}
|
||||
|
||||
@ -61,45 +61,45 @@ index 9fd1b4915..21f734a73 100644
|
||||
return this.getBlock().getStepSound(this);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SoundEffectType.java b/src/main/java/net/minecraft/server/SoundEffectType.java
|
||||
index 5460d409b..ccd5b0529 100644
|
||||
index b774d2d8d..0184bf3fc 100644
|
||||
--- a/src/main/java/net/minecraft/server/SoundEffectType.java
|
||||
+++ b/src/main/java/net/minecraft/server/SoundEffectType.java
|
||||
@@ -26,10 +26,10 @@ public class SoundEffectType {
|
||||
public static final SoundEffectType v = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_LANTERN_BREAK, SoundEffects.BLOCK_LANTERN_STEP, SoundEffects.BLOCK_LANTERN_PLACE, SoundEffects.BLOCK_LANTERN_HIT, SoundEffects.BLOCK_LANTERN_FALL);
|
||||
public final float w;
|
||||
@@ -27,10 +27,10 @@ public class SoundEffectType {
|
||||
public static final SoundEffectType w = new SoundEffectType(1.0F, 1.0F, SoundEffects.BLOCK_LANTERN_BREAK, SoundEffects.BLOCK_LANTERN_STEP, SoundEffects.BLOCK_LANTERN_PLACE, SoundEffects.BLOCK_LANTERN_HIT, SoundEffects.BLOCK_LANTERN_FALL);
|
||||
public final float x;
|
||||
- private final SoundEffect y;
|
||||
+ private final SoundEffect y; public final SoundEffect getBreakSound() { return this.y; } // Paper - OBFHELPER
|
||||
private final SoundEffect z;
|
||||
public final float y;
|
||||
- private final SoundEffect z;
|
||||
+ private final SoundEffect z; public final SoundEffect getBreakSound() { return this.z; } // Paper - OBFHELPER
|
||||
private final SoundEffect A;
|
||||
- private final SoundEffect B;
|
||||
+ private final SoundEffect B; public final SoundEffect getHitSound() { return this.B; } // Paper - OBFHELPER
|
||||
private final SoundEffect C;
|
||||
private final SoundEffect B;
|
||||
- private final SoundEffect C;
|
||||
+ private final SoundEffect C; public final SoundEffect getHitSound() { return this.B; } // Paper - OBFHELPER
|
||||
private final SoundEffect D;
|
||||
|
||||
public SoundEffectType(float f, float f1, SoundEffect soundeffect, SoundEffect soundeffect1, SoundEffect soundeffect2, SoundEffect soundeffect3, SoundEffect soundeffect4) {
|
||||
@@ -50,14 +50,17 @@ public class SoundEffectType {
|
||||
return this.x;
|
||||
@@ -51,14 +51,17 @@ public class SoundEffectType {
|
||||
return this.y;
|
||||
}
|
||||
|
||||
+ public final SoundEffect getStepSound() { return this.d(); } // Paper - OBFHELPER
|
||||
public SoundEffect d() {
|
||||
return this.z;
|
||||
return this.A;
|
||||
}
|
||||
|
||||
+ public final SoundEffect getPlaceSound() { return this.e(); } // Paper - OBFHELPER
|
||||
public SoundEffect e() {
|
||||
return this.A;
|
||||
return this.B;
|
||||
}
|
||||
|
||||
+ public final SoundEffect getFallSound() { return this.g(); } // Paper - OBFHELPER
|
||||
public SoundEffect g() {
|
||||
return this.C;
|
||||
return this.D;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index da3c50c70..d9749adb7 100644
|
||||
index 887ade5e8..aef8dd169 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -694,4 +694,11 @@ public class CraftBlock implements Block {
|
||||
@@ -696,4 +696,11 @@ public class CraftBlock implements Block {
|
||||
AxisAlignedBB aabb = shape.getBoundingBox();
|
||||
return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ);
|
||||
}
|
||||
@ -112,5 +112,5 @@ index da3c50c70..d9749adb7 100644
|
||||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 088a41c5187b453e76e79602312b89ae1bcfac13 Mon Sep 17 00:00:00 2001
|
||||
From 1126822c11025916fb4dc7d2d43da654baa53c60 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 1 Jun 2019 13:00:55 -0700
|
||||
Subject: [PATCH] Chunk debug command
|
||||
@ -185,7 +185,7 @@ index d704fc79c..09efbf725 100644
|
||||
* Ported from MinecraftForge - author: LexManos <LexManos@gmail.com> - License: LGPLv2.1
|
||||
*/
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 0ce2d6d0f..162700313 100644
|
||||
index 038b7b68d..9b2bafdbd 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -22,7 +22,7 @@ import org.apache.logging.log4j.Logger;
|
||||
@ -399,7 +399,7 @@ index ec3732193..23d1935dd 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 7407c1a56..14a176d61 100644
|
||||
index 3c6fe0596..43d9a5634 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -26,7 +26,7 @@ public class PlayerChunk {
|
||||
@ -412,10 +412,10 @@ index 7407c1a56..14a176d61 100644
|
||||
private int dirtyCount;
|
||||
private int r;
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 67d011745..493770bf6 100644
|
||||
index 5fd001170..827831aab 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -57,7 +57,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -58,7 +58,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
public final Long2ObjectLinkedOpenHashMap<PlayerChunk> updatingChunks = new Long2ObjectLinkedOpenHashMap();
|
||||
public volatile Long2ObjectLinkedOpenHashMap<PlayerChunk> visibleChunks;
|
||||
private final Long2ObjectLinkedOpenHashMap<PlayerChunk> pendingUnload;
|
||||
@ -424,17 +424,17 @@ index 67d011745..493770bf6 100644
|
||||
public final WorldServer world;
|
||||
private final LightEngineThreaded lightEngine;
|
||||
private final IAsyncTaskHandler<Runnable> executor;
|
||||
@@ -70,7 +70,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -71,7 +71,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> mailboxWorldGen;
|
||||
private final Mailbox<ChunkTaskQueueSorter.a<Runnable>> mailboxMain;
|
||||
public final WorldLoadListener worldLoadListener;
|
||||
- public final PlayerChunkMap.a chunkDistanceManager;
|
||||
+ public final PlayerChunkMap.a chunkDistanceManager; public final PlayerChunkMap.a getChunkMapDistanceManager() { return this.chunkDistanceManager; } // Paper - OBFHELPER
|
||||
private final AtomicInteger v;
|
||||
private final AtomicInteger u;
|
||||
private final DefinedStructureManager definedStructureManager;
|
||||
private final File x;
|
||||
private final File w;
|
||||
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
|
||||
index 0430ca535..badbe6c19 100644
|
||||
index 77bb6b092..7a8397815 100644
|
||||
--- a/src/main/java/net/minecraft/server/Ticket.java
|
||||
+++ b/src/main/java/net/minecraft/server/Ticket.java
|
||||
@@ -6,8 +6,8 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
|
||||
@ -442,13 +442,13 @@ index 0430ca535..badbe6c19 100644
|
||||
private final TicketType<T> a;
|
||||
private final int b;
|
||||
- public final T identifier;
|
||||
- private final long d;
|
||||
- private long d;
|
||||
+ public final T identifier; public final T getObjectReason() { return this.identifier; } // Paper - OBFHELPER
|
||||
+ private final long d; public final long getCreationTick() { return this.d; } // Paper - OBFHELPER
|
||||
+ private long d; public final long getCreationTick() { return this.d; } // Paper - OBFHELPER
|
||||
|
||||
protected Ticket(TicketType<T> tickettype, int i, T t0, long j) {
|
||||
protected Ticket(TicketType<T> tickettype, int i, T t0) {
|
||||
this.a = tickettype;
|
||||
@@ -52,6 +52,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
|
||||
@@ -51,6 +51,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
@ -457,5 +457,5 @@ index 0430ca535..badbe6c19 100644
|
||||
return this.b;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 789d6e1227d70f686850dd8e954de4106a9cc709 Mon Sep 17 00:00:00 2001
|
||||
From 36505b571ac2b7a8b2353960f29c818d5e880384 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 9 Jun 2019 03:53:22 +0100
|
||||
Subject: [PATCH] incremental chunk saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 9ff115294..e98b1f243 100644
|
||||
index 332f20ce8..f5ed0a698 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -494,4 +494,19 @@ public class PaperWorldConfig {
|
||||
@ -29,7 +29,7 @@ index 9ff115294..e98b1f243 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index ee8f80174..2003522d9 100644
|
||||
index 64c327669..14ec31f0a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -42,7 +42,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -39,10 +39,10 @@ index ee8f80174..2003522d9 100644
|
||||
- private long lastSaved;
|
||||
+ public long lastSaved; // Paper
|
||||
private volatile boolean s;
|
||||
private long t;
|
||||
private long inhabitedTime;
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 02dfd91c5..8689e0f9f 100644
|
||||
index 9b2bafdbd..f138b112f 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -335,6 +335,15 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
@ -62,10 +62,10 @@ index 02dfd91c5..8689e0f9f 100644
|
||||
public void close() throws IOException {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a6f112bd0..5238a1a7c 100644
|
||||
index 0a7648381..8e15aba7f 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -165,6 +165,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -168,6 +168,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@ -73,7 +73,7 @@ index a6f112bd0..5238a1a7c 100644
|
||||
public File bukkitDataPackFolder;
|
||||
public CommandDispatcher vanillaCommandDispatcher;
|
||||
private boolean forceTicks;
|
||||
@@ -1108,14 +1109,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1116,14 +1117,28 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.serverPing.b().a(agameprofile);
|
||||
}
|
||||
|
||||
@ -108,10 +108,10 @@ index a6f112bd0..5238a1a7c 100644
|
||||
this.methodProfiler.enter("snooper");
|
||||
if (((DedicatedServer) this).getDedicatedServerProperties().snooperEnabled && !this.snooper.d() && this.ticks > 100) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 493770bf6..2be6fa0f0 100644
|
||||
index 827831aab..4379434f6 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -297,6 +297,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -298,6 +298,36 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
super.close();
|
||||
}
|
||||
|
||||
@ -149,11 +149,11 @@ index 493770bf6..2be6fa0f0 100644
|
||||
if (flag) {
|
||||
List<PlayerChunk> list = (List) this.visibleChunks.values().stream().filter(PlayerChunk::hasBeenLoaded).peek(PlayerChunk::m).collect(Collectors.toList());
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 3acea575d..7c5349b17 100644
|
||||
index c28c0431a..0fd3cb54b 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -791,11 +791,44 @@ public class WorldServer extends World {
|
||||
return this.worldProvider.d();
|
||||
return this.worldProvider.c();
|
||||
}
|
||||
|
||||
+ // Paper start - derived from below
|
||||
@ -199,5 +199,5 @@ index 3acea575d..7c5349b17 100644
|
||||
if (iprogressupdate != null) {
|
||||
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From a911f20edaee814e98234f9f00ab408520f5fa70 Mon Sep 17 00:00:00 2001
|
||||
From d10bee4a09233c43f6d1f101d41dc95f26b8de53 Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Mon, 10 Jun 2019 09:36:40 +0100
|
||||
Subject: [PATCH] Catch exceptions from dispenser entity spawns
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IDispenseBehavior.java b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
||||
index 976c72208..fe3d9d5fa 100644
|
||||
index 8c4a8b4ba..83877d672 100644
|
||||
--- a/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
||||
+++ b/src/main/java/net/minecraft/server/IDispenseBehavior.java
|
||||
@@ -163,7 +163,14 @@ public interface IDispenseBehavior {
|
||||
@ -24,5 +24,5 @@ index 976c72208..fe3d9d5fa 100644
|
||||
// CraftBukkit end
|
||||
return itemstack;
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 95a4a73b24ce202917135f029e05fdbea3566a74 Mon Sep 17 00:00:00 2001
|
||||
From 07551ce735f8c62bc07a180b666ea6ad9368e404 Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 15 Jun 2019 10:28:25 -0700
|
||||
Subject: [PATCH] Show blockstate location if we failed to read it
|
||||
@ -33,5 +33,5 @@ index f6401e2cd..3e22d558e 100644
|
||||
|
||||
public final boolean snapshotDisabled; // Paper
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 62aa6178ba9d9f06db5d13ef1d6382cd8b16b5c6 Mon Sep 17 00:00:00 2001
|
||||
From 6b453ebf22ad7ede563e5cd0560b097e264d115b Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Fri, 21 Jun 2019 14:42:48 -0700
|
||||
Subject: [PATCH] Log other thread in DataPaletteBlock lock failure
|
||||
@ -22,7 +22,7 @@ index 000000000..a3b174618
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index a3bb2e877..1e2bca1e0 100644
|
||||
index d5f5a5187..2c1d1b1a5 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -22,14 +22,17 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||
@ -47,5 +47,5 @@ index a3bb2e877..1e2bca1e0 100644
|
||||
|
||||
crashreportsystemdetails.a("Thread dumps", (Object) s);
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From ed1c70806a105bbdab1a54def039ed2e4f4307b4 Mon Sep 17 00:00:00 2001
|
||||
From dc460bf237dd914ca9485c60ffde346f290fa9fc Mon Sep 17 00:00:00 2001
|
||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
Date: Sat, 22 Jun 2019 04:20:47 -0700
|
||||
Subject: [PATCH] Use ChunkStatus cache when saving protochunks
|
||||
@ -7,10 +7,10 @@ The cache should contain the chunk status when saving. If not it
|
||||
will load it.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index eb49e9021..b04657356 100644
|
||||
index 4379434f6..93729eea2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -774,8 +774,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -775,8 +775,10 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
NBTTagCompound nbttagcompound;
|
||||
|
||||
if (chunkstatus.getType() != ChunkStatus.Type.LEVELCHUNK) {
|
||||
@ -24,5 +24,5 @@ index eb49e9021..b04657356 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.24.0
|
||||
2.24.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From a226c1b147367c8bd55c5f0e9327ac1ee156837c Mon Sep 17 00:00:00 2001
|
||||
From 9dd828c0ae7071fcab9994e1c2e8c35c2b46b132 Mon Sep 17 00:00:00 2001
|
||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
||||
Subject: [PATCH] Anti-Xray
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 55b78f54c..cfc4156bc 100644
|
||||
index f5ed0a698..363676348 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -1,7 +1,11 @@
|
||||
@ -1181,7 +1181,7 @@ index 000000000..37093419c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 2003522d9..d604f96c1 100644
|
||||
index 14ec31f0a..863a2222f 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -315,7 +315,7 @@ public class Chunk implements IChunkAccess {
|
||||
@ -1194,10 +1194,10 @@ index 2003522d9..d604f96c1 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 73f93e494..a02807411 100644
|
||||
index 6371f2f5b..17cacafe7 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -74,7 +74,7 @@ public class ChunkRegionLoader {
|
||||
@@ -57,7 +57,7 @@ public class ChunkRegionLoader {
|
||||
byte b0 = nbttagcompound2.getByte("Y");
|
||||
|
||||
if (nbttagcompound2.hasKeyOfType("Palette", 9) && nbttagcompound2.hasKeyOfType("BlockStates", 12)) {
|
||||
@ -1206,17 +1206,17 @@ index 73f93e494..a02807411 100644
|
||||
|
||||
chunksection.getBlocks().a(nbttagcompound2.getList("Palette", 10), nbttagcompound2.getLongArray("BlockStates"));
|
||||
chunksection.recalcBlockCounts();
|
||||
@@ -132,7 +132,7 @@ public class ChunkRegionLoader {
|
||||
@@ -115,7 +115,7 @@ public class ChunkRegionLoader {
|
||||
loadEntities(nbttagcompound1, chunk);
|
||||
});
|
||||
} else {
|
||||
- ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1);
|
||||
+ ProtoChunk protochunk = new ProtoChunk(chunkcoordintpair, chunkconverter, achunksection, protochunkticklist, protochunkticklist1, worldserver); // Paper - Anti-Xray
|
||||
|
||||
protochunk.a(biomestorage);
|
||||
object = protochunk;
|
||||
protochunk.a(abiomebase);
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
index ca2bf8b77..584b3e639 100644
|
||||
index 0d5deee36..4526527ac 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
@@ -6,21 +6,31 @@ public class ChunkSection {
|
||||
@ -1227,7 +1227,7 @@ index ca2bf8b77..584b3e639 100644
|
||||
+ short nonEmptyBlockCount; // Paper - private -> package-private
|
||||
private short tickingBlockCount;
|
||||
private short e;
|
||||
final DataPaletteBlock<IBlockData> blockIds; // Paper - package
|
||||
final DataPaletteBlock<IBlockData> blockIds;
|
||||
|
||||
public ChunkSection(int i) {
|
||||
- this(i, (short) 0, (short) 0, (short) 0);
|
||||
@ -1255,7 +1255,7 @@ index ca2bf8b77..584b3e639 100644
|
||||
|
||||
public IBlockData getType(int i, int j, int k) {
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 1e2bca1e0..8fba1e2f3 100644
|
||||
index 2c1d1b1a5..44aed6727 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||
@ -1440,7 +1440,7 @@ index e156804f7..96a785af2 100644
|
||||
public void a() {
|
||||
this.o();
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index ef71a1feb..483317608 100644
|
||||
index 47710067a..654474341 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -1,5 +1,6 @@
|
||||
@ -1450,10 +1450,10 @@ index ef71a1feb..483317608 100644
|
||||
import com.google.common.collect.Lists;
|
||||
import io.netty.buffer.ByteBuf;
|
||||
import io.netty.buffer.Unpooled;
|
||||
@@ -17,8 +18,11 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
private byte[] e; private byte[] getData() { return this.e; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> f;
|
||||
private boolean g;
|
||||
@@ -20,8 +21,11 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> g;
|
||||
private boolean h;
|
||||
+ private volatile boolean ready; // Paper - Async-Anti-Xray - Ready flag for the network manager
|
||||
|
||||
- public PacketPlayOutMapChunk() {}
|
||||
@ -1463,7 +1463,7 @@ index ef71a1feb..483317608 100644
|
||||
|
||||
// Paper start
|
||||
private final java.util.List<Packet> extraPackets = new java.util.ArrayList<>();
|
||||
@@ -30,6 +34,12 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -33,6 +37,12 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
}
|
||||
// Paper end
|
||||
public PacketPlayOutMapChunk(Chunk chunk, int i) {
|
||||
@ -1476,41 +1476,37 @@ index ef71a1feb..483317608 100644
|
||||
ChunkCoordIntPair chunkcoordintpair = chunk.getPos();
|
||||
|
||||
this.a = chunkcoordintpair.x;
|
||||
@@ -48,7 +58,12 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -55,7 +65,12 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
}
|
||||
|
||||
this.e = new byte[this.a(chunk, i)];
|
||||
- this.c = this.a(new PacketDataSerializer(this.i()), chunk, i);
|
||||
this.f = new byte[this.a(chunk, i)];
|
||||
- this.c = this.a(new PacketDataSerializer(this.j()), chunk, i);
|
||||
+ // Paper start - Anti-Xray - Add chunk packet info
|
||||
+ if (chunkPacketInfo != null) {
|
||||
+ chunkPacketInfo.setData(this.getData());
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ this.c = this.writeChunk(new PacketDataSerializer(this.i()), chunk, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info
|
||||
this.f = Lists.newArrayList();
|
||||
+ this.c = this.writeChunk(new PacketDataSerializer(this.j()), chunk, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info
|
||||
this.g = Lists.newArrayList();
|
||||
iterator = chunk.getTileEntities().entrySet().iterator();
|
||||
int totalSigns = 0; // Paper
|
||||
@@ -74,9 +89,19 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
this.f.add(nbttagcompound);
|
||||
@@ -82,7 +97,15 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
}
|
||||
}
|
||||
+ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks
|
||||
+ }
|
||||
|
||||
+ // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag
|
||||
+ public boolean isReady() {
|
||||
+ return this.ready;
|
||||
}
|
||||
|
||||
+ }
|
||||
+
|
||||
+ public void setReady(boolean ready) {
|
||||
+ this.ready = ready;
|
||||
+ }
|
||||
}
|
||||
+ // Paper end
|
||||
+
|
||||
|
||||
@Override
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.readInt();
|
||||
@@ -135,6 +160,11 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -150,6 +173,11 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
public int writeChunk(PacketDataSerializer packetDataSerializer, Chunk chunk, int chunkSectionSelector) { return this.a(packetDataSerializer, chunk, chunkSectionSelector); } // Paper - OBFHELPER
|
||||
public int a(PacketDataSerializer packetdataserializer, Chunk chunk, int i) {
|
||||
@ -1522,7 +1518,7 @@ index ef71a1feb..483317608 100644
|
||||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
int k = 0;
|
||||
@@ -146,7 +176,8 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -159,9 +187,12 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
if (chunksection != Chunk.a && (!this.f() || !chunksection.c()) && (i & 1 << k) != 0) {
|
||||
j |= 1 << k;
|
||||
@ -1531,12 +1527,16 @@ index ef71a1feb..483317608 100644
|
||||
+ chunksection.getBlocks().writeDataPaletteBlock(packetdataserializer, chunkPacketInfo, k); // Paper - Anti-Xray - Add chunk packet info
|
||||
}
|
||||
}
|
||||
+ chunk.world.chunkPacketBlockController.modifyBlocks(this, chunkPacketInfo, forceLoad, null); // Paper - Anti-Xray - Modify blocks
|
||||
+ }
|
||||
|
||||
return j;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 98590e233..af934ef8b 100644
|
||||
index 43d9a5634..615d27863 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -176,6 +176,11 @@ public class PlayerChunk {
|
||||
@@ -163,6 +163,11 @@ public class PlayerChunk {
|
||||
World world = chunk.getWorld();
|
||||
|
||||
if (this.dirtyCount == 64) {
|
||||
@ -1548,7 +1548,7 @@ index 98590e233..af934ef8b 100644
|
||||
this.s = -1;
|
||||
}
|
||||
|
||||
@@ -208,7 +213,7 @@ public class PlayerChunk {
|
||||
@@ -195,7 +200,7 @@ public class PlayerChunk {
|
||||
this.a(world, blockposition);
|
||||
}
|
||||
} else if (this.dirtyCount == 64) {
|
||||
@ -1558,10 +1558,10 @@ index 98590e233..af934ef8b 100644
|
||||
this.a(new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, chunk), false);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index b04657356..a5df9fee6 100644
|
||||
index 93729eea2..fc6436c4f 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -539,7 +539,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -540,7 +540,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
PlayerChunkMap.LOGGER.error("Couldn't load chunk {}", chunkcoordintpair, exception);
|
||||
}
|
||||
|
||||
@ -1570,7 +1570,7 @@ index b04657356..a5df9fee6 100644
|
||||
}, this.executor);
|
||||
}
|
||||
|
||||
@@ -1247,7 +1247,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1201,7 +1201,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
private void a(EntityPlayer entityplayer, Packet<?>[] apacket, Chunk chunk) {
|
||||
if (apacket[0] == null) {
|
||||
@ -1580,10 +1580,10 @@ index b04657356..a5df9fee6 100644
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
index a36aba015..f04fc366f 100644
|
||||
index 18ff6dd68..8720dd120 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||
@@ -253,6 +253,8 @@ public class PlayerInteractManager {
|
||||
@@ -264,6 +264,8 @@ public class PlayerInteractManager {
|
||||
}
|
||||
|
||||
}
|
||||
@ -1591,12 +1591,12 @@ index a36aba015..f04fc366f 100644
|
||||
+ this.world.chunkPacketBlockController.onPlayerLeftClickBlock(this, blockposition, enumdirection); // Paper - Anti-Xray
|
||||
}
|
||||
|
||||
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype) {
|
||||
public void a(BlockPosition blockposition, PacketPlayInBlockDig.EnumPlayerDigType packetplayinblockdig_enumplayerdigtype, String s) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
index 6bdd7dda0..7bad12eb0 100644
|
||||
index 39339fa27..f376e2106 100644
|
||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
@@ -44,16 +44,28 @@ public class ProtoChunk implements IChunkAccess {
|
||||
@@ -45,16 +45,28 @@ public class ProtoChunk implements IChunkAccess {
|
||||
private long s;
|
||||
private final Map<WorldGenStage.Features, BitSet> t;
|
||||
private volatile boolean u;
|
||||
@ -1626,7 +1626,7 @@ index 6bdd7dda0..7bad12eb0 100644
|
||||
this.f = Maps.newEnumMap(HeightMap.Type.class);
|
||||
this.g = ChunkStatus.EMPTY;
|
||||
this.h = Maps.newHashMap();
|
||||
@@ -206,7 +218,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||
@@ -207,7 +219,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||
|
||||
public ChunkSection a(int i) {
|
||||
if (this.j[i] == Chunk.a) {
|
||||
@ -1636,7 +1636,7 @@ index 6bdd7dda0..7bad12eb0 100644
|
||||
|
||||
return this.j[i];
|
||||
diff --git a/src/main/java/net/minecraft/server/TicketType.java b/src/main/java/net/minecraft/server/TicketType.java
|
||||
index 157ca6a7e..9c114d2d3 100644
|
||||
index a905a29e7..335b64435 100644
|
||||
--- a/src/main/java/net/minecraft/server/TicketType.java
|
||||
+++ b/src/main/java/net/minecraft/server/TicketType.java
|
||||
@@ -21,6 +21,7 @@ public class TicketType<T> {
|
||||
@ -1648,7 +1648,7 @@ index 157ca6a7e..9c114d2d3 100644
|
||||
public static <T> TicketType<T> a(String s, Comparator<T> comparator) {
|
||||
return new TicketType<>(s, comparator, 0L);
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 3f71ca9e4..e31ffdb0d 100644
|
||||
index 9ad76ab32..39725335d 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||
@ -1660,7 +1660,7 @@ index 3f71ca9e4..e31ffdb0d 100644
|
||||
import com.destroystokyo.paper.event.server.ServerExceptionEvent;
|
||||
import com.destroystokyo.paper.exception.ServerInternalException;
|
||||
import com.google.common.base.MoreObjects;
|
||||
@@ -93,6 +95,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -92,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
@ -1668,7 +1668,7 @@ index 3f71ca9e4..e31ffdb0d 100644
|
||||
|
||||
public final co.aikar.timings.WorldTimingsHandler timings; // Paper
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
@@ -134,6 +137,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -133,6 +136,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
this.paperConfig = new com.destroystokyo.paper.PaperWorldConfig(worlddata.getName(), this.spigotConfig); // Paper
|
||||
@ -1676,7 +1676,7 @@ index 3f71ca9e4..e31ffdb0d 100644
|
||||
this.generator = gen;
|
||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||
@@ -414,6 +418,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -346,6 +350,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
// CraftBukkit end
|
||||
|
||||
IBlockData iblockdata1 = chunk.setType(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag
|
||||
@ -1710,5 +1710,5 @@ index 7772d5900..4570ed999 100644
|
||||
return section;
|
||||
}
|
||||
--
|
||||
2.24.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 7dff966d78ac7e89c7b4ecfe65bdfc6fca5e4584 Mon Sep 17 00:00:00 2001
|
||||
From 960288ec426082f000ad1defb38518f42a70a6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 24 Mar 2019 01:01:32 -0400
|
||||
Subject: [PATCH] Only count Natural Spawned mobs towards natural spawn mob
|
||||
@ -17,7 +17,7 @@ This should fully solve all of the issues around it so that only natural
|
||||
influences natural spawns.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index e9d1b47ad..59671c5c3 100644
|
||||
index 363676348..0a7e6fff1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -514,6 +514,16 @@ public class PaperWorldConfig {
|
||||
@ -38,10 +38,10 @@ index e9d1b47ad..59671c5c3 100644
|
||||
public boolean asynchronous;
|
||||
public EngineMode engineMode;
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 7c5349b17..0761f705b 100644
|
||||
index 0fd3cb54b..a5cce8f4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -934,6 +934,13 @@ public class WorldServer extends World {
|
||||
@@ -933,6 +933,13 @@ public class WorldServer extends World {
|
||||
EnumCreatureType enumcreaturetype = entity.getEntityType().e();
|
||||
|
||||
if (enumcreaturetype != EnumCreatureType.MISC && this.getChunkProvider().b(entity)) {
|
||||
@ -56,5 +56,5 @@ index 7c5349b17..0761f705b 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6343919aa4c2103ca7f080a2c485ad1fcb300119 Mon Sep 17 00:00:00 2001
|
||||
From 291a6e7746ad8a74727c820e144e634197bcd63d Mon Sep 17 00:00:00 2001
|
||||
From: Lucavon <lucavonlp@gmail.com>
|
||||
Date: Tue, 23 Jul 2019 20:29:20 -0500
|
||||
Subject: [PATCH] Configurable projectile relative velocity
|
||||
@ -25,7 +25,7 @@ P3) Solutions for 1) and especially 2) might not be future-proof, while this
|
||||
server-internal fix makes this change future-proof.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 59671c5c3..56ca65819 100644
|
||||
index 0a7e6fff1..097b623fd 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -562,4 +562,9 @@ public class PaperWorldConfig {
|
||||
@ -39,7 +39,7 @@ index 59671c5c3..56ca65819 100644
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
index a9575d310..5f3e1ccb4 100644
|
||||
index 0c3664758..288259e49 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
||||
@@ -85,7 +85,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
|
||||
@ -52,7 +52,7 @@ index a9575d310..5f3e1ccb4 100644
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
index 18d28a151..bd4ca73f6 100644
|
||||
index 6c091b680..f5c8074dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
|
||||
@@ -43,7 +43,7 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
|
||||
@ -65,5 +65,5 @@ index 18d28a151..bd4ca73f6 100644
|
||||
|
||||
@Override
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
@ -1,22 +1,22 @@
|
||||
From b117edd7ceca8c12db41bab25d92b3f5ad64d3ec Mon Sep 17 00:00:00 2001
|
||||
From e645f66b705efad107d9836e81944d476077750b Mon Sep 17 00:00:00 2001
|
||||
From: Shane Freeder <theboyetronic@gmail.com>
|
||||
Date: Sun, 28 Jul 2019 00:51:11 +0100
|
||||
Subject: [PATCH] Mark entities as being ticked when notifying navigation
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 0761f705be..5df9b0ffda 100644
|
||||
index a5cce8f4e..8ea9b34a1 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1371,6 +1371,7 @@ public class WorldServer extends World {
|
||||
@@ -1370,6 +1370,7 @@ public class WorldServer extends World {
|
||||
VoxelShape voxelshape1 = iblockdata1.getCollisionShape(this, blockposition);
|
||||
|
||||
if (VoxelShapes.c(voxelshape, voxelshape1, OperatorBoolean.NOT_SAME)) {
|
||||
+ boolean wasTicking = this.tickingEntities; this.tickingEntities = true; // Paper
|
||||
Iterator iterator = this.H.iterator();
|
||||
Iterator iterator = this.navigators.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
@@ -1381,6 +1382,7 @@ public class WorldServer extends World {
|
||||
@@ -1380,6 +1381,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,5 +25,5 @@ index 0761f705be..5df9b0ffda 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.22.1
|
||||
2.24.1
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 5523a5eb1fe8396a208694a2650d268ec0a8e999 Mon Sep 17 00:00:00 2001
|
||||
From a4df21cb5dc107cff27108049b3a49e2af89bc65 Mon Sep 17 00:00:00 2001
|
||||
From: kickash32 <kickash32@gmail.com>
|
||||
Date: Tue, 30 Jul 2019 03:17:16 +0500
|
||||
Subject: [PATCH] offset item frame ticking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
|
||||
index 3b282a18a..2b4a849f4 100644
|
||||
index e9cde9c6e..04864a36e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
||||
@@ -15,7 +15,7 @@ public abstract class EntityHanging extends Entity {
|
||||
@ -18,5 +18,5 @@ index 3b282a18a..2b4a849f4 100644
|
||||
protected EnumDirection direction;
|
||||
|
||||
--
|
||||
2.23.0
|
||||
2.24.1
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren