Update upstream BD/B/CB/S

Note to other developers: This commit may require you to wipe your
workspace as a result of the changes to BD.

--- work/BuildData
Submodule work/BuildData f527a8ff..d56672db:
  > Mappings Update

--- work/Bukkit
Submodule work/Bukkit 0c1d258bb..db06c80d7:
  > Add list of entities to EntityTransformEvent
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks

---work/CraftBukkit
Submodule work/CraftBukkit 6a398ac44..068dab5be:
  > Enable optional source JAR shading via profile shadeSourcesJar
  > Use ImmutableList rather than AbstractList for CraftMetaBook
  > Fix setRecipes(List) not setting Knowledge Book recipes.
  > Mappings Update
  > Add list of entities to EntityTransformEvent & move die calls
  > SPIGOT-4347: Add API to allow storing arbitrary values on ItemStacks
  > Add Vanilla help to default permissions

--- work/Spigot
Submodule work/Spigot a1f2566f6..e769fe4d9:
  > Mappings Update
  > Rebuild patches
This commit is contained in:
Zach Brown 2018-12-08 05:09:55 -05:00
parent 684bd2adbc
commit a2ad49b22f
No known key found for this signature in database
GPG Key ID: CC9DA35FC5450B76
107 changed files with 852 additions and 878 deletions

View File

@ -1,4 +1,4 @@
From d10ee21db91d466d499e140a462b37f04f22c787 Mon Sep 17 00:00:00 2001
From 2527eb4a36c059f3c42f5fc5dbac73c6021c6d10 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:34 -0700
Subject: [PATCH] Add EntityZapEvent
@ -6,10 +6,10 @@ Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
new file mode 100644
index 00000000..3547d063
index 00000000..c8f0bb05
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/event/entity/EntityZapEvent.java
@@ -0,0 +1,62 @@
@@ -0,0 +1,63 @@
+package com.destroystokyo.paper.event.entity;
+
+import org.apache.commons.lang.Validate;
@ -21,6 +21,7 @@ index 00000000..3547d063
+import org.bukkit.event.entity.EntityTransformEvent;
+
+import javax.annotation.Nonnull;
+import java.util.Collections;
+
+/**
+ * Fired when lightning strikes an entity
@ -31,7 +32,7 @@ index 00000000..3547d063
+ private final LightningStrike bolt;
+
+ public EntityZapEvent(final Entity entity, @Nonnull final LightningStrike bolt, @Nonnull final Entity replacementEntity) {
+ super(entity, replacementEntity, TransformReason.LIGHTNING);
+ super(entity, Collections.singletonList(replacementEntity), TransformReason.LIGHTNING);
+ Validate.notNull(bolt);
+ Validate.notNull(replacementEntity);
+ this.bolt = bolt;
@ -73,17 +74,18 @@ index 00000000..3547d063
+ }
+}
diff --git a/src/main/java/org/bukkit/event/entity/PigZapEvent.java b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
index 86983676..8dd1e3ce 100644
index c1d4b30a..de8cad81 100644
--- a/src/main/java/org/bukkit/event/entity/PigZapEvent.java
+++ b/src/main/java/org/bukkit/event/entity/PigZapEvent.java
@@ -1,5 +1,6 @@
package org.bukkit.event.entity;
@@ -2,6 +2,7 @@ package org.bukkit.event.entity;
import java.util.Collections;
import org.bukkit.entity.Entity;
+import com.destroystokyo.paper.event.entity.EntityZapEvent;
import org.bukkit.entity.LightningStrike;
import org.bukkit.entity.Pig;
import org.bukkit.entity.PigZombie;
@@ -9,14 +10,14 @@ import org.bukkit.event.HandlerList;
@@ -11,14 +12,14 @@ import org.bukkit.event.HandlerList;
/**
* Stores data for pigs being zapped
*/
@ -96,12 +98,12 @@ index 86983676..8dd1e3ce 100644
private final LightningStrike bolt;
public PigZapEvent(final Pig pig, final LightningStrike bolt, final PigZombie pigzombie) {
- super(pig, pigzombie, TransformReason.LIGHTNING);
- super(pig, Collections.singletonList((Entity) pigzombie), TransformReason.LIGHTNING);
+ super(pig, bolt, pigzombie);
this.bolt = bolt;
this.pigzombie = pigzombie;
}
@@ -55,6 +56,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
@@ -57,6 +58,8 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
return pigzombie;
}
@ -110,7 +112,7 @@ index 86983676..8dd1e3ce 100644
@Override
public HandlerList getHandlers() {
return handlers;
@@ -63,4 +66,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
@@ -65,4 +68,6 @@ public class PigZapEvent extends EntityTransformEvent implements Cancellable {
public static HandlerList getHandlerList() {
return handlers;
}
@ -118,5 +120,5 @@ index 86983676..8dd1e3ce 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 790d964de5cce64ce961552f37ee17e35bf1477d Mon Sep 17 00:00:00 2001
From ceef7057702a9be623ecad7664d826ab2516bd0e Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Wed, 12 Sep 2018 18:53:35 +0300
Subject: [PATCH] Add an API for CanPlaceOn and CanDestroy NBT values
@ -217,10 +217,10 @@ index fe8d3468..074769c1 100644
return key;
}
diff --git a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
index 2278d470..60ed443a 100644
index df51f3ca..e9f640fb 100644
--- a/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
+++ b/src/main/java/org/bukkit/inventory/meta/ItemMeta.java
@@ -81,13 +81,13 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
@@ -82,13 +82,13 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
* <p>
* Plugins should check if hasLore() returns <code>true</code> before
* calling this method.
@ -236,7 +236,7 @@ index 2278d470..60ed443a 100644
* Removes lore when given null.
*
* @param lore the lore that will be set
@@ -118,7 +118,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
@@ -119,7 +119,7 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
int getEnchantLevel(Enchantment ench);
/**
@ -245,7 +245,7 @@ index 2278d470..60ed443a 100644
* Returns an empty map if none.
*
* @return An immutable copy of the enchantments
@@ -348,4 +348,83 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
@@ -365,4 +365,83 @@ public interface ItemMeta extends Cloneable, ConfigurationSerializable {
Spigot spigot();
// Spigot end
@ -330,5 +330,5 @@ index 2278d470..60ed443a 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 4319757a25f8a0f330e9925ab19944eb2d4c337c Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Mon, 29 Feb 2016 20:40:33 -0600
Subject: [PATCH] POM Changes
diff --git a/pom.xml b/pom.xml
index 7ac07ac07ac0..7ac07ac07ac0 100644
index ccf92b011..f0fc37abf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,12 +1,11 @@
@ -106,11 +106,12 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
<Implementation-Vendor>${maven.build.timestamp}</Implementation-Vendor>
<Specification-Title>Bukkit</Specification-Title>
<Specification-Version>${api.version}</Specification-Version>
@@ -182,19 +171,22 @@
@@ -182,20 +171,23 @@
<goal>shade</goal>
</goals>
<configuration>
+ <dependencyReducedPomLocation>${project.build.directory}/dependency-reduced-pom.xml</dependencyReducedPomLocation> <!-- Paper -->
<createSourcesJar>${shadeSourcesJar}</createSourcesJar>
<relocations>
- <relocation>
- <pattern>joptsimple</pattern>
@ -137,7 +138,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
<relocation>
<pattern>org.bukkit.craftbukkit</pattern>
<shadedPattern>org.bukkit.craftbukkit.v${minecraft_version}</shadedPattern>
@@ -220,18 +212,6 @@
@@ -221,18 +213,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
@ -157,7 +158,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
<plugin>
<groupId>org.apache.maven.plugins</groupId>
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 93046379d..674096cab 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
@@ -11,7 +11,7 @@ public final class Versioning {
@ -170,5 +171,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
if (stream != null) {
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From e3c47b51dc2c5d2390319fbec0fcc01dbbfe138d Mon Sep 17 00:00:00 2001
From 1ccbf8a244b37fa3cf0bd7e3843496891d891d3e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 30 Mar 2016 19:36:20 -0400
Subject: [PATCH] MC Dev fixes
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index a553fb7476..4048937c63 100644
index a553fb747..4048937c6 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -99,7 +99,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -18,7 +18,7 @@ index a553fb7476..4048937c63 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 7f8802b2ef..6ffc535146 100644
index 7f8802b2e..6ffc53514 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -179,7 +179,7 @@ public class BlockPosition extends BaseBlockPosition {
@ -52,7 +52,7 @@ index 7f8802b2ef..6ffc535146 100644
}
};
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
index 3bd0c56d46..304e47bf20 100644
index 3bd0c56d4..304e47bf2 100644
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
@@ -72,11 +72,11 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
@ -88,7 +88,7 @@ index 3bd0c56d46..304e47bf20 100644
DataBits databits = new DataBits(ix, 4096, along);
diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
index 5eded6dc20..11f9642e6e 100644
index 5eded6dc2..11f9642e6 100644
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
@@ -136,7 +136,7 @@ public class DedicatedPlayerList extends PlayerList {
@ -101,7 +101,7 @@ index 5eded6dc20..11f9642e6e 100644
}
}
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
index 4dd4b01c82..987d944dbd 100644
index 8bfa218a6..e2e60d3ed 100644
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
@@ -77,7 +77,7 @@ public class DefinedStructure {
@ -139,7 +139,7 @@ index 4dd4b01c82..987d944dbd 100644
arraylist.add(definedstructure$a);
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
index 5c2d50f974..fd6df39f17 100644
index 5c2d50f97..fd6df39f1 100644
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
@@ -51,7 +51,7 @@ public class EnchantmentManager {
@ -188,7 +188,7 @@ index 5c2d50f974..fd6df39f17 100644
boolean flag1 = itemstack.getItem() == Items.BOOK;
diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java
index 04cff50cb7..e746a6a0da 100644
index 04cff50cb..e746a6a0d 100644
--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java
+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java
@@ -14,7 +14,7 @@ public class EntityDragonFireball extends EntityFireball {
@ -201,7 +201,7 @@ index 04cff50cb7..e746a6a0da 100644
entityareaeffectcloud.setSource(this.shooter);
entityareaeffectcloud.setParticle(Particles.j);
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
index 38c85f4ab7..c0853f0fcd 100644
index 38c85f4ab..c0853f0fc 100644
--- a/src/main/java/net/minecraft/server/EnumDirection.java
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
@@ -233,7 +233,7 @@ public enum EnumDirection implements INamable {
@ -250,7 +250,7 @@ index 38c85f4ab7..c0853f0fcd 100644
}
}
diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java
index 3f5d6c3239..286c1b14f6 100644
index 3f5d6c323..286c1b14f 100644
--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java
+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java
@@ -390,12 +390,12 @@ public interface IChatBaseComponent extends Message, Iterable<IChatBaseComponent
@ -269,7 +269,7 @@ index 3f5d6c3239..286c1b14f6 100644
}
}
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
index 0c9249cd8d..0648c76a07 100644
index 0c9249cd8..0648c76a0 100644
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
@@ -27,7 +27,7 @@ public class LocaleLanguage {
@ -282,7 +282,7 @@ index 0c9249cd8d..0648c76a07 100644
this.d.put(entry.getKey(), s);
}
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
index 9d01b70c7f..8daccdd6e9 100644
index 9d01b70c7..8daccdd6e 100644
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
@@ -83,12 +83,12 @@ public abstract class LootSelectorEntry {
@ -301,7 +301,7 @@ index 9d01b70c7f..8daccdd6e9 100644
}
}
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
index 7e88bcd6e4..b98dfe27d5 100644
index 48d04b540..de9168a9c 100644
--- a/src/main/java/net/minecraft/server/NBTBase.java
+++ b/src/main/java/net/minecraft/server/NBTBase.java
@@ -87,7 +87,7 @@ public interface NBTBase {
@ -311,10 +311,10 @@ index 7e88bcd6e4..b98dfe27d5 100644
- NBTBase clone();
+ public NBTBase clone(); // Paper - decompile fix
default String b_() {
default String asString() {
return this.toString();
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
index 456b5f4925..54f2935c08 100644
index 456b5f492..54f2935c0 100644
--- a/src/main/java/net/minecraft/server/NBTList.java
+++ b/src/main/java/net/minecraft/server/NBTList.java
@@ -25,6 +25,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
@ -337,7 +337,7 @@ index 456b5f4925..54f2935c08 100644
+ // Paper end- Decompile fix
}
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
index 11ffa6c342..5d61cf70bc 100644
index 86881a22d..81ff1fd69 100644
--- a/src/main/java/net/minecraft/server/NBTTagByteArray.java
+++ b/src/main/java/net/minecraft/server/NBTTagByteArray.java
@@ -66,7 +66,8 @@ public class NBTTagByteArray extends NBTList<NBTTagByte> {
@ -351,7 +351,7 @@ index 11ffa6c342..5d61cf70bc 100644
System.arraycopy(this.data, 0, abyte, 0, this.data.length);
diff --git a/src/main/java/net/minecraft/server/NBTTagIntArray.java b/src/main/java/net/minecraft/server/NBTTagIntArray.java
index f5c9b97d5c..d121ad4f7a 100644
index 40f6179cd..ebc44ec9e 100644
--- a/src/main/java/net/minecraft/server/NBTTagIntArray.java
+++ b/src/main/java/net/minecraft/server/NBTTagIntArray.java
@@ -132,7 +132,7 @@ public class NBTTagIntArray extends NBTList<NBTTagInt> {
@ -364,7 +364,7 @@ index f5c9b97d5c..d121ad4f7a 100644
}
}
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
index 5b54cbde18..769d599c59 100644
index 24a66f95a..2e7c96056 100644
--- a/src/main/java/net/minecraft/server/NBTTagList.java
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
@@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger;
@ -391,7 +391,7 @@ index 5b54cbde18..769d599c59 100644
+ */ // Paper end - Decompile fix
}
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
index 113e8780a8..8e312c7617 100644
index 113e8780a..8e312c761 100644
--- a/src/main/java/net/minecraft/server/PacketEncoder.java
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java
@@ -49,7 +49,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
@ -404,7 +404,7 @@ index 113e8780a8..8e312c7617 100644
}
}
diff --git a/src/main/java/net/minecraft/server/Registry.java b/src/main/java/net/minecraft/server/Registry.java
index 5be9f0ff2f..9efec49d66 100644
index 5be9f0ff2..9efec49d6 100644
--- a/src/main/java/net/minecraft/server/Registry.java
+++ b/src/main/java/net/minecraft/server/Registry.java
@@ -1,4 +1,8 @@
@ -418,7 +418,7 @@ index 5be9f0ff2f..9efec49d66 100644
+ Iterator<T> iterator(); // Paper - decompile fix
}
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
index 8d1f9237aa..a21006290c 100644
index 8d1f9237a..a21006290 100644
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
@@ -26,7 +26,7 @@ public class RegistryBlockID<T> implements Registry<T> {
@ -431,7 +431,7 @@ index 8d1f9237aa..a21006290c 100644
this.c.set(i, object);
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
index 03c6033622..d03ac0e70c 100644
index 03c603362..d03ac0e70 100644
--- a/src/main/java/net/minecraft/server/RegistryID.java
+++ b/src/main/java/net/minecraft/server/RegistryID.java
@@ -49,7 +49,7 @@ public class RegistryID<K> implements Registry<K> {
@ -444,7 +444,7 @@ index 03c6033622..d03ac0e70c 100644
this.b = (K[])(new Object[i]);
this.c = new int[i];
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
index 7b8a8064b8..615aa2cd04 100644
index 7b8a8064b..615aa2cd0 100644
--- a/src/main/java/net/minecraft/server/ServerPing.java
+++ b/src/main/java/net/minecraft/server/ServerPing.java
@@ -101,12 +101,12 @@ public class ServerPing {
@ -493,7 +493,7 @@ index 7b8a8064b8..615aa2cd04 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
index ef9d8e06fe..0c9910d9a5 100644
index ef9d8e06f..0c9910d9a 100644
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
@@ -107,7 +107,7 @@ public class ShapeDetector {
@ -506,5 +506,5 @@ index ef9d8e06fe..0c9910d9a5 100644
}
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From defa2a27d1a177cc507dfc570d2f1959e952aeb0 Mon Sep 17 00:00:00 2001
From 2589f04f992b46251d9c0317f588987a451be50a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
index 0000000000..66d02e048b
index 000000000..66d02e048
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
@@ -0,0 +1,132 @@
@ -144,7 +144,7 @@ index 0000000000..66d02e048b
+}
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
new file mode 100644
index 0000000000..145cb274b0
index 000000000..145cb274b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
@@ -0,0 +1,104 @@
@ -253,7 +253,7 @@ index 0000000000..145cb274b0
+ }
+}
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 87a7b69800..2f17e5219c 100644
index 87a7b6980..2f17e5219 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
@ -297,7 +297,7 @@ index 87a7b69800..2f17e5219c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index dfcb285df5..bb8b450ac4 100644
index b9645c669..fb7688e9e 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -23,6 +23,15 @@ public class Block implements IMaterial {
@ -317,7 +317,7 @@ index dfcb285df5..bb8b450ac4 100644
private final float frictionFactor;
protected final BlockStateList<Block, IBlockData> blockStateList;
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index e634325ba8..68ba638c6b 100644
index 6675bc5cc..f929ce02e 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -842,6 +842,7 @@ public class Chunk implements IChunkAccess {
@ -337,7 +337,7 @@ index e634325ba8..68ba638c6b 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 85a065f039..4b8b77710b 100644
index f0d926256..ca18901df 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -14,6 +14,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -357,7 +357,7 @@ index 85a065f039..4b8b77710b 100644
return chunk1;
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 5819e86f32..7239f54377 100644
index b859a5b9e..60abc5f28 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -90,7 +90,7 @@ public class ChunkProviderServer implements IChunkProvider {
@ -398,7 +398,7 @@ index 5819e86f32..7239f54377 100644
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
} catch (IOException ioexception) {
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 71c0e069a6..e53e40e439 100644
index 3bf55a054..179769323 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -1,5 +1,6 @@
@ -445,7 +445,7 @@ index 71c0e069a6..e53e40e439 100644
}
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
index b7cdc495a3..8b9b076ded 100644
index cc9e8465c..1bd3a0f77 100644
--- a/src/main/java/net/minecraft/server/CustomFunction.java
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
@@ -13,12 +13,22 @@ public class CustomFunction {
@ -472,7 +472,7 @@ index b7cdc495a3..8b9b076ded 100644
return this.b;
}
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
index 4d7e151793..40ff72f725 100644
index 15ab4f0e4..1004e084c 100644
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
@@ -109,7 +109,7 @@ public class CustomFunctionData implements ITickable, IResourcePackListener {
@ -485,7 +485,7 @@ index 4d7e151793..40ff72f725 100644
int j = 0;
CustomFunction.c[] acustomfunction_c = customfunction.b();
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index 7f56df0b66..b488178d5b 100644
index 73a326684..a575ff529 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level;
@ -538,7 +538,7 @@ index 7f56df0b66..b488178d5b 100644
return waitable.get();
} catch (java.util.concurrent.ExecutionException e) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index fde9d4d517..c765b5cf32 100644
index f05a9ebab..8b1e0448b 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
@ -577,7 +577,7 @@ index fde9d4d517..c765b5cf32 100644
protected float ab() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 03cd1db365..dec9d2d08c 100644
index 2a1e3c801..7f95652bd 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
@ -597,7 +597,7 @@ index 03cd1db365..dec9d2d08c 100644
super.tick();
this.cV();
this.o();
@@ -2097,9 +2096,7 @@ public abstract class EntityLiving extends Entity {
@@ -2094,9 +2093,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -607,7 +607,7 @@ index 03cd1db365..dec9d2d08c 100644
double d0 = this.locX - this.lastX;
double d1 = this.locZ - this.lastZ;
float f = (float) (d0 * d0 + d1 * d1);
@@ -2175,8 +2172,6 @@ public abstract class EntityLiving extends Entity {
@@ -2172,8 +2169,6 @@ public abstract class EntityLiving extends Entity {
} else {
this.bv = 0;
}
@ -616,7 +616,7 @@ index 03cd1db365..dec9d2d08c 100644
}
protected float e(float f, float f1) {
@@ -2246,7 +2241,6 @@ public abstract class EntityLiving extends Entity {
@@ -2243,7 +2238,6 @@ public abstract class EntityLiving extends Entity {
}
this.world.methodProfiler.a("ai");
@ -624,7 +624,7 @@ index 03cd1db365..dec9d2d08c 100644
if (this.isFrozen()) {
this.bg = false;
this.bh = 0.0F;
@@ -2257,7 +2251,6 @@ public abstract class EntityLiving extends Entity {
@@ -2254,7 +2248,6 @@ public abstract class EntityLiving extends Entity {
this.doTick();
this.world.methodProfiler.e();
}
@ -632,7 +632,7 @@ index 03cd1db365..dec9d2d08c 100644
this.world.methodProfiler.e();
this.world.methodProfiler.a("jump");
@@ -2282,9 +2275,7 @@ public abstract class EntityLiving extends Entity {
@@ -2279,9 +2272,7 @@ public abstract class EntityLiving extends Entity {
this.n();
AxisAlignedBB axisalignedbb = this.getBoundingBox();
@ -642,7 +642,7 @@ index 03cd1db365..dec9d2d08c 100644
this.world.methodProfiler.e();
this.world.methodProfiler.a("push");
if (this.bw > 0) {
@@ -2292,9 +2283,7 @@ public abstract class EntityLiving extends Entity {
@@ -2289,9 +2280,7 @@ public abstract class EntityLiving extends Entity {
this.a(axisalignedbb, this.getBoundingBox());
}
@ -653,7 +653,7 @@ index 03cd1db365..dec9d2d08c 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
index ae31935c48..70c9b1f50c 100644
index ae31935c4..70c9b1f50 100644
--- a/src/main/java/net/minecraft/server/EntityTracker.java
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
@@ -168,7 +168,7 @@ public class EntityTracker {
@ -684,7 +684,7 @@ index ae31935c48..70c9b1f50c 100644
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index bdbd24b6b5..2d812b0242 100644
index 04c5c1796..b99ed185f 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -1,5 +1,6 @@
@ -837,7 +837,7 @@ index bdbd24b6b5..2d812b0242 100644
this.methodProfiler.e();
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 15194bd635..12a8fec29a 100644
index 384f4f45b..1dfdc5d70 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -1,5 +1,6 @@
@ -848,7 +848,7 @@ index 15194bd635..12a8fec29a 100644
import com.google.common.collect.ComparisonChain;
import com.google.common.collect.Lists;
@@ -90,6 +91,7 @@ public class PlayerChunkMap {
PlayerChunk playerchunk;
int j;
if (i - this.k > 8000L) {
+ try (Timing ignored = world.timings.doChunkMapUpdate.startTiming()) { // Paper
@ -931,7 +931,7 @@ index 15194bd635..12a8fec29a 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 358e7429b3..784b62c7c8 100644
index 539e6d3c9..67c993795 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory;
@ -958,7 +958,7 @@ index 358e7429b3..784b62c7c8 100644
}
@@ -1629,7 +1628,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1622,7 +1621,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit end
private void handleCommand(String s) {
@ -967,7 +967,7 @@ index 358e7429b3..784b62c7c8 100644
// CraftBukkit start - whole method
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
@@ -1640,7 +1639,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1633,7 +1632,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
this.server.getPluginManager().callEvent(event);
if (event.isCancelled()) {
@ -976,7 +976,7 @@ index 358e7429b3..784b62c7c8 100644
return;
}
@@ -1653,7 +1652,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1646,7 +1645,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
return;
} finally {
@ -986,7 +986,7 @@ index 358e7429b3..784b62c7c8 100644
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
index 616797dc6e..3a5daf6705 100644
index 616797dc6..3a5daf670 100644
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
@@ -1,10 +1,16 @@
@ -1007,7 +1007,7 @@ index 616797dc6e..3a5daf6705 100644
throw CancelledPacketHandleException.INSTANCE;
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 17b4245417..85947fb678 100644
index 39f149a81..597ad7d40 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -1,5 +1,6 @@
@ -1031,7 +1031,7 @@ index 17b4245417..85947fb678 100644
public WhiteList getWhitelist() {
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
index a07895935e..ee5c2421bb 100644
index a07895935..ee5c2421b 100644
--- a/src/main/java/net/minecraft/server/TickListServer.java
+++ b/src/main/java/net/minecraft/server/TickListServer.java
@@ -24,13 +24,19 @@ public class TickListServer<T> implements TickList<T> {
@ -1085,7 +1085,7 @@ index a07895935e..ee5c2421bb 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
index c69209497b..68ac014aab 100644
index c69209497..68ac014aa 100644
--- a/src/main/java/net/minecraft/server/TileEntity.java
+++ b/src/main/java/net/minecraft/server/TileEntity.java
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
@ -1105,7 +1105,7 @@ index c69209497b..68ac014aab 100644
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
protected World world;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 433d0ad96a..759fa98c45 100644
index 44b381120..119e1facc 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,5 +1,6 @@
@ -1163,7 +1163,7 @@ index 433d0ad96a..759fa98c45 100644
+ timings.entityRemoval.stopTiming(); // Paper
this.methodProfiler.c("regular");
CrashReportSystemDetails crashreportsystemdetails1;
CrashReport crashreport1;
@@ -1159,6 +1162,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
timings.entityTick.startTiming(); // Spigot
guardEntityList = true; // Spigot
@ -1220,7 +1220,7 @@ index 433d0ad96a..759fa98c45 100644
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 74a61f300c..d10fb980dd 100644
index ee68983f6..435c54da1 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -1,5 +1,6 @@
@ -1319,7 +1319,7 @@ index 74a61f300c..d10fb980dd 100644
Iterator iterator = this.server.getWorlds().iterator();
@@ -932,6 +938,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
this.worldData.c(this.server.aP().c());
this.worldData.c(this.server.getBossBattleCustomData().c());
this.dataManager.saveWorldData(this.worldData, this.server.getPlayerList().t());
this.h().a();
+ timings.worldSaveLevel.stopTiming(); // Paper
@ -1327,7 +1327,7 @@ index 74a61f300c..d10fb980dd 100644
// CraftBukkit start
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index f1813f3d5a..174605b6e1 100644
index b524adc7d..9efd620f2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1946,12 +1946,31 @@ public final class CraftServer implements Server {
@ -1364,7 +1364,7 @@ index f1813f3d5a..174605b6e1 100644
org.spigotmc.RestartCommand.restart();
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
deleted file mode 100644
index 2ab4b11a8d..0000000000
index 2ab4b11a8..000000000
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
+++ /dev/null
@@ -1,173 +0,0 @@
@ -1542,7 +1542,7 @@ index 2ab4b11a8d..0000000000
- }
-}
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
index 413dd35f06..52a8c48fa4 100644
index 413dd35f0..52a8c48fa 100644
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
@@ -1,6 +1,8 @@
@ -1578,7 +1578,7 @@ index 413dd35f06..52a8c48fa4 100644
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b1a5937b1e..b5afd5d1c7 100644
index b1a5937b1..b5afd5d1c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1720,6 +1720,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -1597,7 +1597,7 @@ index b1a5937b1e..b5afd5d1c7 100644
public Player.Spigot spigot()
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index b0f1f83728..9dec941fb7 100644
index 2f5d7a2a6..311c4f5ca 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -15,6 +15,7 @@ import java.util.concurrent.atomic.AtomicReference;
@ -1664,7 +1664,7 @@ index b0f1f83728..9dec941fb7 100644
private boolean isReady(final int currentTick) {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index 3ec0f393ed..7490a187ec 100644
index 3f55381c1..f32e66010 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.scheduler;
@ -1746,7 +1746,7 @@ index 3ec0f393ed..7490a187ec 100644
- // Spigot end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
index e52ef47b78..3d90b34268 100644
index e52ef47b7..3d90b3426 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
@ -1758,7 +1758,7 @@ index e52ef47b78..3d90b34268 100644
this.value = value;
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index c1071c92ee..a99c0cea0f 100644
index c1071c92e..a99c0cea0 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;
@ -1819,5 +1819,5 @@ index c1071c92ee..a99c0cea0f 100644
}
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 17b75b1da091d4982e72e3604c4b0380515d34d1 Mon Sep 17 00:00:00 2001
From a33afed850b70f0bb7a2da14d0ea528dad769f8a Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:02:51 -0600
Subject: [PATCH] Configurable cactus and reed natural growth heights
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index b8a6161d8..32d00e274 100644
index a73865739..098bd3fba 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -64,4 +64,13 @@ public class PaperWorldConfig {
@ -23,7 +23,7 @@ index b8a6161d8..32d00e274 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
index 54685157f..83fb53643 100644
index 27758bd01..918db3626 100644
--- a/src/main/java/net/minecraft/server/BlockCactus.java
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
@ -32,11 +32,11 @@ index 54685157f..83fb53643 100644
- if (i < 3) {
+ if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
int j = ((Integer) iblockdata.get(BlockCactus.AGE)).intValue();
int j = (Integer) iblockdata.get(BlockCactus.AGE);
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
index 313821d52..c4e7f318d 100644
index fad1a0a83..c7017c58e 100644
--- a/src/main/java/net/minecraft/server/BlockReed.java
+++ b/src/main/java/net/minecraft/server/BlockReed.java
@@ -25,7 +25,7 @@ public class BlockReed extends Block {
@ -45,9 +45,9 @@ index 313821d52..c4e7f318d 100644
- if (i < 3) {
+ if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height
int j = ((Integer) iblockdata.get(BlockReed.AGE)).intValue();
int j = (Integer) iblockdata.get(BlockReed.AGE);
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
--
2.18.0
2.19.2

View File

@ -1,11 +1,11 @@
From f7425160315958110c7f90c5248e4b681133ef3f Mon Sep 17 00:00:00 2001
From 0b7b250edea62c25ecaa5abf3a83298d4365d9ef Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 13:24:16 -0600
Subject: [PATCH] Allow nerfed mobs to jump
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index a55163a458..341038fc4d 100644
index a55163a45..341038fc4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -87,4 +87,9 @@ public class PaperWorldConfig {
@ -19,7 +19,7 @@ index a55163a458..341038fc4d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
index 74a40671e9..5d6260ded1 100644
index 74a40671e..5d6260ded 100644
--- a/src/main/java/net/minecraft/server/ControllerJump.java
+++ b/src/main/java/net/minecraft/server/ControllerJump.java
@@ -12,6 +12,7 @@ public class ControllerJump {
@ -31,7 +31,7 @@ index 74a40671e9..5d6260ded1 100644
this.b.o(this.a);
this.a = false;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 60b1dcd8ea..cc74150dae 100644
index 7cf459d26..9d4d8c697 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
@ -42,7 +42,7 @@ index 60b1dcd8ea..cc74150dae 100644
public PathfinderGoalSelector targetSelector;
private EntityLiving goalTarget;
private final EntitySenses bC;
@@ -647,6 +648,12 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -646,6 +647,12 @@ public abstract class EntityInsentient extends EntityLiving {
// Spigot Start
if ( this.fromMobSpawner )
{
@ -56,7 +56,7 @@ index 60b1dcd8ea..cc74150dae 100644
}
// Spigot End
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
index 15c04f890d..7db180fa90 100644
index 15c04f890..7db180fa9 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
@@ -5,14 +5,17 @@ public class PathfinderGoalFloat extends PathfinderGoal {
@ -78,5 +78,5 @@ index 15c04f890d..7db180fa90 100644
if (this.a.getRandom().nextFloat() < 0.8F) {
this.a.getControllerJump().a();
--
2.18.0
2.19.2

View File

@ -1,11 +1,11 @@
From 96a39a206b1aa7c7e2352d77ddde5cac303fc270 Mon Sep 17 00:00:00 2001
From 1b2fe04861331c81c67b51e17ae2596e8a03473a Mon Sep 17 00:00:00 2001
From: Suddenly <suddenly@suddenly.coffee>
Date: Tue, 1 Mar 2016 13:51:54 -0600
Subject: [PATCH] Add configurable despawn distances for living entities
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 341038fc4d..3e1f4be10f 100644
index 341038fc4..3e1f4be10 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -92,4 +92,20 @@ public class PaperWorldConfig {
@ -30,10 +30,10 @@ index 341038fc4d..3e1f4be10f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index cc74150dae..9e95ede7fe 100644
index 9d4d8c697..8f4319c80 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -626,13 +626,13 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -625,13 +625,13 @@ public abstract class EntityInsentient extends EntityLiving {
double d2 = entityhuman.locZ - this.locZ;
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@ -51,5 +51,5 @@ index cc74150dae..9e95ede7fe 100644
}
}
--
2.18.0
2.19.2

View File

@ -1,11 +1,11 @@
From 6c2b13c9d3cc34962b70aba9cf1beebfe17105e2 Mon Sep 17 00:00:00 2001
From 7d4ea3d0550820a18c9c4795eca59b6ee33a8997 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Tue, 1 Mar 2016 14:47:52 -0600
Subject: [PATCH] Player affects spawning API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 5c1f7d72a5..6b58f632bd 100644
index 7e151439c..0aae80a7f 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -71,6 +71,9 @@ public abstract class EntityHuman extends EntityLiving {
@ -19,10 +19,10 @@ index 5c1f7d72a5..6b58f632bd 100644
// CraftBukkit start
public boolean fauxSleeping;
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 3a57315da9..c87304d477 100644
index 8f4319c80..cf73a6d1f 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -620,7 +620,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -619,7 +619,7 @@ public abstract class EntityInsentient extends EntityLiving {
} else {
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
@ -32,7 +32,7 @@ index 3a57315da9..c87304d477 100644
double d1 = entityhuman.locY - this.locY;
double d2 = entityhuman.locZ - this.locZ;
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
index 850569f6b7..f958bd5bac 100644
index 850569f6b..f958bd5ba 100644
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
@@ -96,7 +96,7 @@ public class EntitySilverfish extends EntityMonster {
@ -45,7 +45,7 @@ index 850569f6b7..f958bd5bac 100644
return false;
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index 8b87146885..601d4c62d4 100644
index afe039905..ff564508f 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -37,7 +37,7 @@ public final class SpawnerCreature {
@ -58,7 +58,7 @@ index 8b87146885..601d4c62d4 100644
j = MathHelper.floor(entityhuman.locZ / 16.0D);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 9251e0c83c..739e19bb14 100644
index e1e931406..c378df796 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
@ -79,7 +79,7 @@ index 9251e0c83c..739e19bb14 100644
if (d3 < 0.0D || d4 < d3 * d3) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index b5afd5d1c7..47da00948b 100644
index b5afd5d1c..47da00948 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1633,7 +1633,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -103,5 +103,5 @@ index b5afd5d1c7..47da00948b 100644
@Override
public void updateCommands() {
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 06b4daeb281d364d517f651e8d65f04bfd2485a8 Mon Sep 17 00:00:00 2001
From 1967a1ab38d312568ab657d7099d270cab87cb9f Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 1 Mar 2016 23:58:50 -0600
Subject: [PATCH] Configurable top of nether void damage
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 1ed58f4bba..39d565db1f 100644
index 1ed58f4bb..39d565db1 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -124,4 +124,10 @@ public class PaperWorldConfig {
@ -20,7 +20,7 @@ index 1ed58f4bba..39d565db1f 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 45ea6b138e..6b413833da 100644
index c7db9db95..12fe12e04 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -463,9 +463,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -63,10 +63,10 @@ index 45ea6b138e..6b413833da 100644
this.die();
}
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
index 025158675f..932fbff7c7 100644
index 5bee194fa..b52bc659e 100644
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
@@ -201,9 +201,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
@@ -195,9 +195,15 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT
this.setDamage(this.getDamage() - 1.0F);
}
@ -83,5 +83,5 @@ index 025158675f..932fbff7c7 100644
int i;
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 8d97100ff3fa6a4c00743891420db9c79ac3b37b Mon Sep 17 00:00:00 2001
From ab619f67d419bb011f610c5097fc77c654032378 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 01:17:12 -0600
Subject: [PATCH] Ensure commands are not ran async
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
that it is happening so that plugin authors can fix their code to stop executing commands async.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 784b62c7c..c63055cec 100644
index 67c993795..a5bd908fd 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1560,6 +1560,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1553,6 +1553,29 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (!async && s.startsWith("/")) {
@ -48,7 +48,7 @@ index 784b62c7c..c63055cec 100644
} else if (this.player.getChatFlags() == EntityHuman.EnumChatVisibility.SYSTEM) {
// Do nothing, this is coming from a plugin
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index cf1db412e..2bc16fb1a 100644
index 4858265a8..4c177a674 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -699,6 +699,29 @@ public final class CraftServer implements Server {
@ -118,5 +118,5 @@ index 49768734d..947c43a5d 100644
{
if ( script.isFile() )
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 44d13e9cc8d7e214cd1d6f469624be152fdcf3bc Mon Sep 17 00:00:00 2001
From 0736eba49760e3435f6dd1b7c0add91d5324a0e6 Mon Sep 17 00:00:00 2001
From: vemacs <d@nkmem.es>
Date: Thu, 3 Mar 2016 01:19:22 -0600
Subject: [PATCH] All chunks are slime spawn chunks toggle
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index e28d5b19..3528b674 100644
index e28d5b19a..3528b674f 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -180,4 +180,9 @@ public class PaperWorldConfig {
@ -19,10 +19,10 @@ index e28d5b19..3528b674 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index 2a602c64..e913accd 100644
index aa23cdff1..f92bf02b8 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -260,7 +260,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -267,7 +267,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
@ -32,5 +32,5 @@ index 2a602c64..e913accd 100644
if (this.random.nextInt(10) == 0 && flag1 && this.locY < 40.0D) {
return super.a(generatoraccess, flag);
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 825c761eae146d5af538b56bc5b6c81ee911e698 Mon Sep 17 00:00:00 2001
From 36694c1b91770ae842431bb2a55017f2e932a4b1 Mon Sep 17 00:00:00 2001
From: Joseph Hirschfeld <joe@ibj.io>
Date: Thu, 3 Mar 2016 03:15:41 -0600
Subject: [PATCH] Add exception reporting event
@ -6,7 +6,7 @@ Subject: [PATCH] Add exception reporting event
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
new file mode 100644
index 0000000000..93397188b7
index 000000000..f699ce18c
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
@@ -0,0 +1,38 @@
@ -48,9 +48,8 @@ index 0000000000..93397188b7
+ return internalTask;
+ }
+}
\ No newline at end of file
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index d8ea5c1b5d..11fd68f597 100644
index bc7ffbf8a..64342f54c 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,6 @@
@ -89,7 +88,7 @@ index d8ea5c1b5d..11fd68f597 100644
}
}
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 709d384e95..a03748f738 100644
index 6a9b9fa2a..557aa5180 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier;
@ -100,25 +99,27 @@ index 709d384e95..a03748f738 100644
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -209,9 +210,14 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -209,9 +210,16 @@ public class ChunkProviderServer implements IChunkProvider {
ichunkaccess.setLastSaved(this.world.getTime());
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
} catch (IOException ioexception) {
- ChunkProviderServer.a.error("Couldn\'t save chunk", ioexception);
- ChunkProviderServer.a.error("Couldn't save chunk", ioexception);
+ // Paper start
+ String msg = "Couldn\'t save chunk";
+ ChunkProviderServer.a.error(msg, ioexception);
+ ServerInternalException.reportInternalException(ioexception);
} catch (ExceptionWorldConflict exceptionworldconflict) {
- ChunkProviderServer.a.error("Couldn\'t save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
- ChunkProviderServer.a.error("Couldn't save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
+ ChunkProviderServer.a.error("Couldn\'t save chunk; already in use by another instance of Minecraft?", exceptionworldconflict);
+ String msg = "Couldn\'t save chunk; already in use by another instance of Minecraft?";
+ ChunkProviderServer.a.error(msg, exceptionworldconflict);
+ ServerInternalException.reportInternalException(exceptionworldconflict);
+ // Paper end
}
}
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
index 1d830dff64..58d971cf20 100644
index 399eb231d..6a59e798d 100644
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
@@ -1,5 +1,6 @@
@ -145,7 +146,7 @@ index 1d830dff64..58d971cf20 100644
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
index f991fddf7d..e888c9bdba 100644
index f991fddf7..e888c9bdb 100644
--- a/src/main/java/net/minecraft/server/RegionFile.java
+++ b/src/main/java/net/minecraft/server/RegionFile.java
@@ -1,5 +1,6 @@
@ -172,7 +173,7 @@ index f991fddf7d..e888c9bdba 100644
}
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
index d18921271f..e5115863ec 100644
index d18921271..e5115863e 100644
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
@@ -1,5 +1,6 @@
@ -191,7 +192,7 @@ index d18921271f..e5115863ec 100644
}
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
index b919226bbf..ec43086ad1 100644
index 4233b94a1..1ff5dcd85 100644
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
@ -210,7 +211,7 @@ index b919226bbf..ec43086ad1 100644
return j1;
}
@@ -292,6 +294,7 @@ public final class SpawnerCreature {
@@ -291,6 +293,7 @@ public final class SpawnerCreature {
entityinsentient = (EntityInsentient) biomebase_biomemeta.b.a(generatoraccess.getMinecraftWorld());
} catch (Exception exception) {
SpawnerCreature.a.warn("Failed to create mob", exception);
@ -219,7 +220,7 @@ index b919226bbf..ec43086ad1 100644
}
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
index e649d662ae..560edb523f 100644
index e649d662a..560edb523 100644
--- a/src/main/java/net/minecraft/server/VillageSiege.java
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
@@ -1,5 +1,7 @@
@ -239,7 +240,7 @@ index e649d662ae..560edb523f 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 051259cf80..a25c90518f 100644
index 3ecddf0fd..20ab0d420 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1,6 +1,8 @@
@ -276,7 +277,7 @@ index 051259cf80..a25c90518f 100644
this.tileEntityListTick.remove(tileTickPosition--);
continue;
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
index b21f7073f1..882b8fe4f1 100644
index b21f7073f..882b8fe4f 100644
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
@@ -138,6 +138,7 @@ public class WorldPersistentData {
@ -288,7 +289,7 @@ index b21f7073f1..882b8fe4f1 100644
throw throwable1;
} finally {
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 9dec941fb7..3f43d9eeab 100644
index 311c4f5ca..e76882b8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -16,6 +16,9 @@ import java.util.function.Consumer;
@ -334,5 +335,5 @@ index 9dec941fb7..3f43d9eeab 100644
// (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 69af610fd6461aa22cadd707614ac16141df6712 Mon Sep 17 00:00:00 2001
From 1f3a75ff9db681c7721175a51d7268682f5954fd Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 4 Apr 2015 23:17:52 -0400
Subject: [PATCH] Complete resource pack API
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f2e7762d30..e79ab51d29 100644
index a5bd908fd..b67861519 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1324,7 +1324,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1317,7 +1317,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// CraftBukkit start
public void a(PacketPlayInResourcePackStatus packetplayinresourcepackstatus) {
PlayerConnectionUtils.ensureMainThread(packetplayinresourcepackstatus, this, this.player.getWorldServer());
@ -22,7 +22,7 @@ index f2e7762d30..e79ab51d29 100644
// CraftBukkit end
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0c35c94b33..73abc95e41 100644
index 0c35c94b3..73abc95e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -128,6 +128,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -70,5 +70,5 @@ index 0c35c94b33..73abc95e41 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 9abc8366e45aaefa1b77f49d19c02cd94c6accc6 Mon Sep 17 00:00:00 2001
From 32403a0b0b344aebcf623bca04f71d807e26e06c Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 28 May 2015 23:00:19 -0400
Subject: [PATCH] Handle Item Meta Inconsistencies
@ -18,7 +18,7 @@ For consistency, the old API methods now forward to use the
ItemMeta API equivalents, and should deprecate the old API's.
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
index 318c4204df..56787ed25c 100644
index b9fa5ccc7..50812b70f 100644
--- a/src/main/java/net/minecraft/server/ItemStack.java
+++ b/src/main/java/net/minecraft/server/ItemStack.java
@@ -7,6 +7,8 @@ import com.mojang.brigadier.StringReader;
@ -78,7 +78,7 @@ index 318c4204df..56787ed25c 100644
public boolean hasEnchantments() {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 1d0580ff7f..2733cda407 100644
index 2ef4ac64b..d1a546c8f 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -4,6 +4,7 @@ import static org.bukkit.craftbukkit.inventory.CraftMetaItem.ENCHANTMENTS;
@ -201,7 +201,7 @@ index 1d0580ff7f..2733cda407 100644
static Map<Enchantment, Integer> getEnchantments(net.minecraft.server.ItemStack item) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 99276f1165..6528668816 100644
index dfc5bb4fd..c00ced8e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -8,6 +8,7 @@ import java.lang.reflect.Constructor;
@ -220,7 +220,7 @@ index 99276f1165..6528668816 100644
import net.minecraft.server.NBTBase;
import net.minecraft.server.NBTTagCompound;
import net.minecraft.server.NBTTagList;
@@ -62,6 +64,7 @@ import java.io.IOException;
@@ -65,6 +67,7 @@ import java.io.IOException;
import java.util.Arrays;
import java.util.EnumSet;
import java.util.Set;
@ -228,7 +228,7 @@ index 99276f1165..6528668816 100644
import java.util.logging.Level;
import java.util.logging.Logger;
import net.minecraft.server.EnumChatFormat;
@@ -252,7 +255,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -256,7 +259,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private IChatBaseComponent displayName;
private IChatBaseComponent locName;
private List<String> lore;
@ -237,16 +237,16 @@ index 99276f1165..6528668816 100644
private Multimap<Attribute, AttributeModifier> attributeModifiers;
private int repairCost;
private int hideFlag;
@@ -262,7 +265,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
@@ -267,7 +270,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private static final CraftCustomTagTypeRegistry TAG_TYPE_REGISTRY = new CraftCustomTagTypeRegistry();
private NBTTagCompound internalTag;
- private final Map<String, NBTBase> unhandledTags = new HashMap<String, NBTBase>();
+ private final Map<String, NBTBase> unhandledTags = new TreeMap<>(); // Paper
private final CraftCustomItemTagContainer publicItemTagContainer = new CraftCustomItemTagContainer(TAG_TYPE_REGISTRY);
CraftMetaItem(CraftMetaItem meta) {
if (meta == null) {
@@ -277,7 +280,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -283,7 +286,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
if (meta.enchantments != null) { // Spigot
@ -255,7 +255,7 @@ index 99276f1165..6528668816 100644
}
if (meta.hasAttributeModifiers()) {
@@ -352,13 +355,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -366,13 +369,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
}
@ -271,7 +271,7 @@ index 99276f1165..6528668816 100644
for (int i = 0; i < ench.size(); i++) {
String id = ((NBTTagCompound) ench.get(i)).getString(ENCHANTMENTS_ID.NBT);
@@ -485,13 +488,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -504,13 +507,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
void deserializeInternal(NBTTagCompound tag, Object context) {
}
@ -287,7 +287,7 @@ index 99276f1165..6528668816 100644
for (Map.Entry<?, ?> entry : ench.entrySet()) {
// Doctor older enchants
String enchantKey = entry.getKey().toString();
@@ -716,13 +719,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -745,13 +748,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
public Map<Enchantment, Integer> getEnchants() {
@ -303,7 +303,7 @@ index 99276f1165..6528668816 100644
}
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
@@ -1042,7 +1045,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1078,7 +1081,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
clone.lore = new ArrayList<String>(this.lore);
}
if (this.enchantments != null) {
@ -312,7 +312,7 @@ index 99276f1165..6528668816 100644
}
if (this.hasAttributeModifiers()) {
clone.attributeModifiers = HashMultimap.create(this.attributeModifiers);
@@ -1243,6 +1246,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1284,6 +1287,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
}
}
@ -337,5 +337,5 @@ index 99276f1165..6528668816 100644
private final Spigot spigot = new Spigot()
{
--
2.19.0
2.19.2

View File

@ -1,14 +1,14 @@
From 8fb138862913c22188505f59838c6b2724b7d361 Mon Sep 17 00:00:00 2001
From 10577886e694d4d691bcbaa626e0cac3dbeababa Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sun, 21 Jun 2015 15:07:20 -0400
Subject: [PATCH] Custom replacement for eaten items
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 91baaa5062..c3936c4e36 100644
index 00b16251f..6d05cc244 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2602,12 +2602,13 @@ public abstract class EntityLiving extends Entity {
@@ -2599,12 +2599,13 @@ public abstract class EntityLiving extends Entity {
protected void q() {
if (!this.activeItem.isEmpty() && this.isHandRaised()) {
@ -23,7 +23,7 @@ index 91baaa5062..c3936c4e36 100644
world.getServer().getPluginManager().callEvent(event);
if (event.isCancelled()) {
@@ -2622,9 +2623,20 @@ public abstract class EntityLiving extends Entity {
@@ -2619,9 +2620,20 @@ public abstract class EntityLiving extends Entity {
itemstack = this.activeItem.a(this.world, this);
}
@ -45,5 +45,5 @@ index 91baaa5062..c3936c4e36 100644
}
--
2.19.0
2.19.2

View File

@ -1,11 +1,11 @@
From 0e5ec8f1cd5d4e55e15adbbea9140341efdb7e6f Mon Sep 17 00:00:00 2001
From 862126880b6fd21227532d383e8e741b7b6aa39e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 27 Sep 2015 01:18:02 -0400
Subject: [PATCH] handle NaN health/absorb values and repair bad data
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index c3936c4e36..d41a7fb087 100644
index 6d05cc244..55e88a23f 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -499,7 +499,13 @@ public abstract class EntityLiving extends Entity {
@ -34,7 +34,7 @@ index c3936c4e36..d41a7fb087 100644
// CraftBukkit start - Handle scaled health
if (this instanceof EntityPlayer) {
org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
@@ -2467,7 +2477,7 @@ public abstract class EntityLiving extends Entity {
@@ -2464,7 +2474,7 @@ public abstract class EntityLiving extends Entity {
}
public void setAbsorptionHearts(float f) {
@ -44,7 +44,7 @@ index c3936c4e36..d41a7fb087 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 33bbda62f2..c575fb933c 100644
index 73abc95e4..4e93e1b6c 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1563,6 +1563,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -56,5 +56,5 @@ index 33bbda62f2..c575fb933c 100644
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 9d894a3b3e3aee3b5cdd072ead5de268498b1191 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 27 Aug 2015 01:15:02 -0400
Subject: [PATCH] Optimize Chunk Access
@ -9,7 +9,7 @@ getChunkAt is called for the same chunk multiple times in a row, often from getT
Optimize this look up by using a Last Access cache.
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index ca18901df..2ebb2d834 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -15,6 +15,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -69,9 +69,9 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
+ // Paper end
public Chunk a(Object object) {
return this.a(((Long) object).longValue());
return this.a((Long) object);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 557aa5180..1d08ec37f 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -78,15 +78,16 @@ public class ChunkProviderServer implements IChunkProvider {
@ -103,7 +103,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
this.asyncTaskHandler.postToMainThread(chunk::addEntities);
@@ -343,7 +344,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -345,7 +346,7 @@ public class ChunkProviderServer implements IChunkProvider {
this.saveChunk(chunk, true); // Spigot
}
this.chunks.remove(chunk.chunkKey);
@ -112,7 +112,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
return true;
}
@@ -379,6 +380,6 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -381,6 +382,6 @@ public class ChunkProviderServer implements IChunkProvider {
}
public boolean isLoaded(int i, int j) {
@ -121,5 +121,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 04b7649ebd2cec65cac90240083f2bd66eaba5ef Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Mar 2016 02:07:55 -0600
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
@ -12,7 +12,7 @@ Replace all calls to the new place to the unnecessary forward.
Optimize getType and getBlockData to manually inline and optimize the calls
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 4048937c6..680764b34 100644
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
@@ -9,6 +9,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
@ -31,7 +31,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public BaseBlockPosition(int i, int j, int k) {
this.a = i;
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 5c5f19b4b..d81e2dc1c 100644
--- a/src/main/java/net/minecraft/server/BlockPosition.java
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
@@ -240,6 +240,16 @@ public class BlockPosition extends BaseBlockPosition {
@ -52,7 +52,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public MutableBlockPosition() {
this(0, 0, 0);
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 101d5bb01..6a23b1ec2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -421,12 +421,24 @@ public class Chunk implements IChunkAccess {
@ -84,7 +84,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
IBlockData iblockdata = null;
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 274c44948..7e4c79a1c 100644
--- a/src/main/java/net/minecraft/server/ChunkSection.java
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
@@ -6,7 +6,7 @@ public class ChunkSection {
@ -97,7 +97,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
private NibbleArray skyLight;
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index befb3e23f..3bfb9397d 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -263,11 +263,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -167,7 +167,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
@@ -748,7 +748,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
public Fluid b(BlockPosition blockposition) {
public Fluid getFluid(BlockPosition blockposition) {
- if (k(blockposition)) {
+ if (blockposition.isInvalidYLocation()) { // Paper
return FluidTypes.a.i();
@ -201,5 +201,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
} else {
Chunk chunk = this.chunkProvider.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4, false, false);
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 7726e17d4e02cf33ce44a92a905cc2c7c433efc1 Mon Sep 17 00:00:00 2001
From 5a9c89981490e9246a982dd7a217a2c88229a018 Mon Sep 17 00:00:00 2001
From: Jedediah Smith <jedediah@silencegreys.com>
Date: Sat, 2 Apr 2016 05:09:16 -0400
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
index a4b98c81f5..53d38ea40f 100644
index a4b98c81f..53d38ea40 100644
--- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
+++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
@@ -4,7 +4,7 @@ import java.io.IOException;
@ -18,10 +18,10 @@ index a4b98c81f5..53d38ea40f 100644
private Vec3D c;
private EnumHand d;
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e79ab51d29..085fa8cd49 100644
index b67861519..dc2c143c8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1909,6 +1909,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1893,6 +1893,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
}
}
@ -39,5 +39,5 @@ index e79ab51d29..085fa8cd49 100644
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From a986d2e4dd309345b2371b063c7c8261521d0731 Mon Sep 17 00:00:00 2001
From 0638f275a02576830d8a2695c00877970a18b3f4 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Wed, 6 Apr 2016 01:04:23 -0500
Subject: [PATCH] Option to use vanilla per-world scoreboard coloring on names
@ -26,7 +26,7 @@ index 6fe3c0ea8..cf523a3e4 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e44d8372d..4c5dc39e3 100644
index 734ee9d8e..e60e8e8fe 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2259,6 +2259,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -38,10 +38,10 @@ index e44d8372d..4c5dc39e3 100644
public ScoreboardTeamBase be() {
if (!this.world.paperConfig.nonPlayerEntitiesOnScoreboards && !(this instanceof EntityHuman)) { return null; } // Paper
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3768c4779..07b5636f0 100644
index dc2c143c8..5c7a88ec8 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1638,7 +1638,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1631,7 +1631,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
return;
}
@ -60,7 +60,7 @@ index 3768c4779..07b5636f0 100644
if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
for (Object recipient : minecraftServer.getPlayerList().players) {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index a294b4780..0d9ac8778 100644
index 8c10a0da1..2cb5869ae 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -177,7 +177,7 @@ public abstract class PlayerList {
@ -73,5 +73,5 @@ index a294b4780..0d9ac8778 100644
worldserver = server.getWorldServer(entityplayer.dimension); // CraftBukkit - Update in case join event changed it
playerconnection.a(entityplayer.locX, entityplayer.locY, entityplayer.locZ, entityplayer.yaw, entityplayer.pitch);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 8a81ace7be6620adc628d1a87c46a27e47cf0e21 Mon Sep 17 00:00:00 2001
From deefbc94ab507f4a70b73a4006ece70e4e9c657f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 13 Apr 2016 02:10:49 -0400
Subject: [PATCH] Configurable Player Collision
@ -19,7 +19,7 @@ index b4dba7247..1d32b93c8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 8056dc40d..74c84dda6 100644
index 7793626b5..bdd2c4b85 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -425,6 +425,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -56,7 +56,7 @@ index f7a9b9d88..7befd80cf 100644
packetdataserializer.a(this.c);
packetdataserializer.a(this.d);
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 2154c0516..baf870ac2 100644
index 2cb5869ae..143c7c1be 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -74,6 +74,7 @@ public abstract class PlayerList {
@ -79,7 +79,7 @@ index 2154c0516..baf870ac2 100644
+ }
+ // Paper end
// CraftBukkit - Moved from above, added world
PlayerList.f.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, Integer.valueOf(entityplayer.getId()), entityplayer.world.worldData.getName(), Double.valueOf(entityplayer.locX), Double.valueOf(entityplayer.locY), Double.valueOf(entityplayer.locZ));
PlayerList.f.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getDisplayName().getString(), s1, entityplayer.getId(), entityplayer.world.worldData.getName(), entityplayer.locX, entityplayer.locY, entityplayer.locZ);
}
@@ -424,6 +432,16 @@ public abstract class PlayerList {
entityplayer.playerTick();// SPIGOT-924
@ -114,5 +114,5 @@ index 2154c0516..baf870ac2 100644
// CraftBukkit start
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 6a11b70d209501a07255f7ea6dccc1d2d1960bd6 Mon Sep 17 00:00:00 2001
From 00c27cd397ae5eda3d387c87fb4ec208ab4cde79 Mon Sep 17 00:00:00 2001
From: Isaac Moore <rmsy@me.com>
Date: Tue, 19 Apr 2016 14:09:31 -0500
Subject: [PATCH] Implement PlayerLocaleChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 1f98be261a..1cafad6bb6 100644
index aacf411dc..623e7ec5f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -36,7 +36,7 @@ import org.bukkit.inventory.MainHand;
@ -26,7 +26,7 @@ index 1f98be261a..1cafad6bb6 100644
PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(getBukkitEntity(), packetplayinsettings.b());
this.server.server.getPluginManager().callEvent(event);
}
this.clientViewDistance = packetplayinsettings.b;
this.clientViewDistance = packetplayinsettings.viewDistance;
// CraftBukkit end
+ // Paper start - add PlayerLocaleChangeEvent
+ // Since the field is initialized to null, this event should always fire the first time the packet is received
@ -38,9 +38,9 @@ index 1f98be261a..1cafad6bb6 100644
+ // Paper end
this.cs = packetplayinsettings.d();
this.ct = packetplayinsettings.e();
this.getDataWatcher().set(EntityPlayer.bx, Byte.valueOf((byte) packetplayinsettings.f()));
this.getDataWatcher().set(EntityPlayer.bx, (byte) packetplayinsettings.f());
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1b2e7ed72b..1f21e54ab4 100644
index 1b2e7ed72..1f21e54ab 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1741,8 +1741,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -66,5 +66,5 @@ index 1b2e7ed72b..1f21e54ab4 100644
@Override
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From ed99479d1b81272b059aa5e8b102a4dae3a0ebb4 Mon Sep 17 00:00:00 2001
From 675812f4004abac1cb4ee36a8564d3c268195253 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 18 Jun 2016 23:22:12 -0400
Subject: [PATCH] Delay Chunk Unloads based on Player Movement
@ -20,7 +20,7 @@ This also makes the Chunk GC System useless, by auto scheduling unload as soon a
a spare chunk is added to the server thats outside of view distance.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index ff1a2046f6..0cd15c17e8 100644
index ff1a2046f..0cd15c17e 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -296,4 +296,18 @@ public class PaperWorldConfig {
@ -43,7 +43,7 @@ index ff1a2046f6..0cd15c17e8 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 28ec8628dc..234c9eb1c3 100644
index 757105c6f..9328c21cd 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -36,6 +36,7 @@ public class Chunk implements IChunkAccess {
@ -55,7 +55,7 @@ index 28ec8628dc..234c9eb1c3 100644
public final int locZ;
private boolean l;
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 71ddaf591e..39ac032b0b 100644
index 2ebb2d834..e14ae2b42 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -48,6 +48,15 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -75,10 +75,10 @@ index 71ddaf591e..39ac032b0b 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 42d0731f0a..e32c9f9a62 100644
index 1d08ec37f..516a583a8 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -306,6 +306,19 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -308,6 +308,19 @@ public class ChunkProviderServer implements IChunkProvider {
}
activityAccountant.endActivity(); // Spigot
}
@ -99,7 +99,7 @@ index 42d0731f0a..e32c9f9a62 100644
this.chunkScheduler.a(booleansupplier);
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index ac0e90eeca..2fd8fa30ee 100644
index c7ea17e25..7cb1327a8 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -33,8 +33,22 @@ public class PlayerChunk {
@ -160,7 +160,7 @@ index ac0e90eeca..2fd8fa30ee 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 1318ddd997..bc67565bf0 100644
index b8d8fc779..e5605c309 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -460,7 +460,13 @@ public class PlayerChunkMap {
@ -179,7 +179,7 @@ index 1318ddd997..bc67565bf0 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 8aa4138a2e..225f7574d2 100644
index 49432f2eb..288152775 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1342,7 +1342,13 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -198,7 +198,7 @@ index 8aa4138a2e..225f7574d2 100644
this.methodProfiler.a(() -> {
return String.valueOf(TileEntityTypes.a(tileentity.C()));
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 24e504c279..f0e974dffc 100644
index 24e504c27..f0e974dff 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1757,7 +1757,7 @@ public class CraftWorld implements World {
@ -211,7 +211,7 @@ index 24e504c279..f0e974dffc 100644
}
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
index d08ef3fe10..081789a8fe 100644
index d08ef3fe1..081789a8f 100644
--- a/src/main/java/org/spigotmc/ActivationRange.java
+++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -323,6 +323,11 @@ public class ActivationRange
@ -227,5 +227,5 @@ index d08ef3fe10..081789a8fe 100644
}
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 07b7ccbc265b9c664e454768b74a0529fc552cc7 Mon Sep 17 00:00:00 2001
From 909622fd5e599b84e0e83d593097fd87d1b2f223 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sun, 4 Sep 2016 16:35:43 -0500
Subject: [PATCH] Fix AIOOBE in inventory handling
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index b1e5ee47e..4af93ccf5 100644
index 3ff82f71b..1c881e7a7 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2103,7 +2103,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2086,7 +2086,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
case CLONE:
if (packetplayinwindowclick.d() == 2) {
click = ClickType.MIDDLE;
@ -18,5 +18,5 @@ index b1e5ee47e..4af93ccf5 100644
} else {
Slot slot = this.player.activeContainer.getSlot(packetplayinwindowclick.c());
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From d84e0a561e044f2e4ad8586dca7ee49908015c80 Mon Sep 17 00:00:00 2001
From df1e8d3730c982c657f99cc6abb69a48c2f0c77e Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sun, 11 Sep 2016 14:30:57 -0500
Subject: [PATCH] Configurable packet in spam threshold
@ -23,10 +23,10 @@ index 1c1ef2dc2..4c0a9f18c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index aad33272f..598b747ec 100644
index 1c881e7a7..a1a6703f6 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1201,13 +1201,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1194,13 +1194,14 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
// Spigot start - limit place/interactions
private int limitedPackets;
private long lastLimitedPacket = -1;
@ -44,5 +44,5 @@ index aad33272f..598b747ec 100644
limitedPackets = 0;
return true;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From f3f73f4392a3801bfe4b3de63f2611b5336e4a4b Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Mon, 19 Sep 2016 23:16:39 -0400
Subject: [PATCH] Auto Save Improvements
@ -12,7 +12,7 @@ Re-introduce a cap per tick for auto save (Spigot disabled the vanilla cap) and
Adds incremental player auto saving too
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index c278ac98d..ae3d0f8f7 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -269,4 +269,15 @@ public class PaperConfig {
@ -32,7 +32,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
+ }
}
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 0cd15c17e..c43152f45 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -2,6 +2,7 @@ package com.destroystokyo.paper;
@ -64,7 +64,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 9328c21cd..aa2ea7838 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -49,9 +49,9 @@ public class Chunk implements IChunkAccess {
@ -96,10 +96,10 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public boolean isEmpty() {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 516a583a8..27bed54d2 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -241,7 +241,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -243,7 +243,7 @@ public class ChunkProviderServer implements IChunkProvider {
this.saveChunk(chunk, false); // Spigot
chunk.a(false);
++i;
@ -109,7 +109,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 3e4c80e0f..8506fad6f 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -37,6 +37,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -121,7 +121,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public final MinecraftServer server;
public final PlayerInteractManager playerInteractManager;
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index bdf4aed1a..acdfb0e1e 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -148,6 +148,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -168,7 +168,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
this.methodProfiler.a("snooper");
if (getSnooperEnabled() && !this.i.d() && this.ticks > 100) { // Spigot
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 143c7c1be..1259ec9d6 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -342,6 +342,7 @@ public abstract class PlayerList {
@ -207,7 +207,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public WhiteList getWhitelist() {
return this.whitelist;
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index b37b284a5..6a5a7d1e0 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -872,8 +872,9 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -230,5 +230,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
timings.worldSaveChunks.startTiming(); // Paper
chunkproviderserver.a(flag);
--
2.19.1
2.19.2

View File

@ -1,16 +1,16 @@
From f9dfbe2ee581c4cb0e2ced04369baef917ab4d20 Mon Sep 17 00:00:00 2001
From 14abdd7d5d7c4103a998ea90262f60619d9704b6 Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Sun, 16 Oct 2016 23:19:30 -0700
Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 6bf914c9..23668ada 100644
index d299e1efb..30306256a 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -155,6 +155,12 @@ public class EntityPig extends EntityAnimal {
if (!this.world.isClientSide && !this.dead) {
EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
@@ -163,6 +163,12 @@ public class EntityPig extends EntityAnimal {
entitypigzombie.setCustomNameVisible(this.getCustomNameVisible());
}
+ // Paper start
+ if (CraftEventFactory.callEntityZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
@ -22,10 +22,10 @@ index 6bf914c9..23668ada 100644
if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
return;
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index ab77d07b..7debc4d2 100644
index 36ca76bc8..928c5eb41 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -612,6 +612,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -607,6 +607,12 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
if (!this.world.isClientSide && !this.dead) {
EntityWitch entitywitch = new EntityWitch(this.world);
@ -39,10 +39,10 @@ index ab77d07b..7debc4d2 100644
entitywitch.prepare(this.world.getDamageScaler(new BlockPosition(entitywitch)), (GroupDataEntity) null, (NBTTagCompound) null);
entitywitch.setNoAI(this.isNoAI());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 75bdad81..2132b09c 100644
index c2b24f99f..1b82f22f8 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -780,6 +780,14 @@ public class CraftEventFactory {
@@ -793,6 +793,14 @@ public class CraftEventFactory {
return event;
}
@ -58,5 +58,5 @@ index 75bdad81..2132b09c 100644
HorseJumpEvent event = new HorseJumpEvent((AbstractHorse) horse.getBukkitEntity(), power);
horse.getBukkitEntity().getServer().getPluginManager().callEvent(event);
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From be8e64ee4c08fbd849697a69c8d40d3773bdec21 Mon Sep 17 00:00:00 2001
From 3608095e0066db795059bef9ed824a16c7dd68f0 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 3 Nov 2016 21:52:22 -0400
Subject: [PATCH] Prevent Auto Save if Save Queue is full
@ -23,10 +23,10 @@ index 0d456bcba..40746c13e 100644
private void removeCorruptTEs() {
removeCorruptTEs = getBoolean("remove-corrupt-tile-entities", false);
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 69219b13a..09c81e9ab 100644
index 27bed54d2..917f57ced 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -234,6 +234,13 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -236,6 +236,13 @@ public class ChunkProviderServer implements IChunkProvider {
synchronized (this.chunkLoader) {
ObjectIterator objectiterator = this.chunks.values().iterator();
@ -41,7 +41,7 @@ index 69219b13a..09c81e9ab 100644
Chunk chunk = (Chunk) objectiterator.next();
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 695044b1b..e86d47a05 100644
index 8fe4c6fec..a2c3c066b 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -152,6 +152,8 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -54,5 +54,5 @@ index 695044b1b..e86d47a05 100644
@Nullable
public Chunk a(GeneratorAccess generatoraccess, int i, int j, Consumer<Chunk> consumer) throws IOException {
--
2.16.1.windows.1
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From bc5c56a6e6768f7b9d7f179a61db83e6d8fe92e9 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 4 Nov 2016 02:12:10 -0400
Subject: [PATCH] Chunk Save Stats Debug Option
@ -8,7 +8,7 @@ Adds a command line flag to enable stats on how chunk saves are processing.
Stats on current queue, how many was processed and how many were queued.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 917f57ced..570ddc1a8 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -30,6 +30,11 @@ public class ChunkProviderServer implements IChunkProvider {
@ -23,7 +23,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public final Long2ObjectMap<Chunk> chunks = Long2ObjectMaps.synchronize(new ChunkMap(8192));
private Chunk lastChunk;
private final ChunkTaskScheduler chunkScheduler;
@@ -237,6 +242,29 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -239,6 +244,29 @@ public class ChunkProviderServer implements IChunkProvider {
// Paper start
final ChunkRegionLoader chunkLoader = (ChunkRegionLoader) world.getChunkProviderServer().chunkLoader;
final int queueSize = chunkLoader.getQueueSize();
@ -54,7 +54,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
return false;
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index a2c3c066b..34ddf655e 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -152,7 +152,13 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -89,5 +89,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
if (nbttagcompound == null) {
return true;
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 223a15ae2ff86485b0fbe27045dce04f08176b14 Mon Sep 17 00:00:00 2001
From 803f81d368bb8d45ff60a0aa77348076e2689c96 Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Fri, 25 Nov 2016 13:22:40 +0000
Subject: [PATCH] Optimise removeQueue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index c33c6f480c..891b804a6e 100644
index 9929e2a73..c2957ad2e 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -5,8 +5,10 @@ import com.mojang.authlib.GameProfile;
@ -39,7 +39,7 @@ index c33c6f480c..891b804a6e 100644
- while (iterator.hasNext() && j < i) {
+ // Paper start
+ /* while (iterator.hasNext() && j < i) {
aint[j++] = ((Integer) iterator.next()).intValue();
aint[j++] = (Integer) iterator.next();
iterator.remove();
+ } */
+
@ -68,5 +68,5 @@ index c33c6f480c..891b804a6e 100644
this.cC = entityplayer.cC;
this.setShoulderEntityLeft(entityplayer.getShoulderEntityLeft());
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From d53c165894e3dd093c4faa9079bb810ba30828ba Mon Sep 17 00:00:00 2001
From 5199cfb3cc6ae5904332802d378e78a5232d55bc Mon Sep 17 00:00:00 2001
From: AlphaBlend <whizkid3000@hotmail.com>
Date: Thu, 8 Sep 2016 08:48:33 -0700
Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 3155ed94..1e25ade7 100644
index e0a38b32a..2f6fd88ca 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -185,7 +185,7 @@ public class EntityExperienceOrb extends Entity {
@ -18,10 +18,10 @@ index 3155ed94..1e25ade7 100644
this.die();
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 2132b09c..45cba844 100644
index 1b82f22f8..af61d99bc 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -50,6 +50,7 @@ import org.bukkit.entity.Player;
@@ -51,6 +51,7 @@ import org.bukkit.entity.Player;
import org.bukkit.entity.Projectile;
import org.bukkit.entity.ThrownExpBottle;
import org.bukkit.entity.ThrownPotion;
@ -29,7 +29,7 @@ index 2132b09c..45cba844 100644
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
import org.bukkit.event.Event.Result;
@@ -749,6 +750,17 @@ public class CraftEventFactory {
@@ -762,6 +763,17 @@ public class CraftEventFactory {
return event;
}
@ -48,5 +48,5 @@ index 2132b09c..45cba844 100644
return handleBlockGrowEvent(world, pos, block, 3);
}
--
2.17.1
2.19.2

View File

@ -1,11 +1,11 @@
From 06a84941ec9371f358d482d79aa3b42ff924e3d0 Mon Sep 17 00:00:00 2001
From 4118aa7da5c0587b51d452f6207adf199501380a Mon Sep 17 00:00:00 2001
From: Techcable <Techcable@outlook.com>
Date: Fri, 16 Dec 2016 21:25:39 -0600
Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 230a23d9..66e574bd 100644
index cc38cfb04..46606ed5c 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -195,6 +195,16 @@ public abstract class EntityArrow extends Entity implements IProjectile {
@ -26,7 +26,7 @@ index 230a23d9..66e574bd 100644
this.a(movingobjectposition);
this.impulse = true;
diff --git a/src/main/java/net/minecraft/server/EntityFireball.java b/src/main/java/net/minecraft/server/EntityFireball.java
index 3e3619d7..58cc4824 100644
index 3e3619d79..58cc4824c 100644
--- a/src/main/java/net/minecraft/server/EntityFireball.java
+++ b/src/main/java/net/minecraft/server/EntityFireball.java
@@ -68,6 +68,15 @@ public abstract class EntityFireball extends Entity {
@ -46,7 +46,7 @@ index 3e3619d7..58cc4824 100644
this.a(movingobjectposition);
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index ad42f8ea..e33ecfcd 100644
index ddd77583c..84a9375db 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -245,6 +245,16 @@ public class EntityFishingHook extends Entity {
@ -67,7 +67,7 @@ index ad42f8ea..e33ecfcd 100644
vec3d1 = new Vec3D(movingobjectposition.pos.x, movingobjectposition.pos.y, movingobjectposition.pos.z);
}
diff --git a/src/main/java/net/minecraft/server/EntityProjectile.java b/src/main/java/net/minecraft/server/EntityProjectile.java
index ee402d41..fc8c0cab 100644
index 11638221b..431afaf2f 100644
--- a/src/main/java/net/minecraft/server/EntityProjectile.java
+++ b/src/main/java/net/minecraft/server/EntityProjectile.java
@@ -144,6 +144,15 @@ public abstract class EntityProjectile extends Entity implements IProjectile {
@ -84,13 +84,13 @@ index ee402d41..fc8c0cab 100644
+ // Paper end
+
if (movingobjectposition != null) {
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.a()).getBlock() == Blocks.NETHER_PORTAL) {
this.e(movingobjectposition.a());
if (movingobjectposition.type == MovingObjectPosition.EnumMovingObjectType.BLOCK && this.world.getType(movingobjectposition.getBlockPosition()).getBlock() == Blocks.NETHER_PORTAL) {
this.e(movingobjectposition.getBlockPosition());
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 45cba844..36cad95a 100644
index af61d99bc..8d12155c3 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -884,6 +884,16 @@ public class CraftEventFactory {
@@ -897,6 +897,16 @@ public class CraftEventFactory {
return CraftItemStack.asNMSCopy(bitem);
}
@ -108,5 +108,5 @@ index 45cba844..36cad95a 100644
Projectile bukkitEntity = (Projectile) entity.getBukkitEntity();
ProjectileLaunchEvent event = new ProjectileLaunchEvent(bukkitEntity);
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 2c22266aa38f8acbc5c924eb3bc3a861acf4988d Mon Sep 17 00:00:00 2001
From 454289781f34d6ec68c18191be94b94f8d9e9659 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 20 Dec 2016 15:26:27 -0500
Subject: [PATCH] Configurable Cartographer Treasure Maps
@ -9,7 +9,7 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
which are limited in quantity.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 5e51aef8..5d152af1 100644
index 5e51aef84..5d152af15 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -345,4 +345,14 @@ public class PaperWorldConfig {
@ -28,10 +28,10 @@ index 5e51aef8..5d152af1 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 7debc4d2..229eda02 100644
index 928c5eb41..ac81a8d76 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -762,6 +762,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -757,6 +757,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
public void a(IMerchant imerchant, MerchantRecipeList merchantrecipelist, Random random) {
int i = this.a.a(random);
World world = imerchant.getWorld();
@ -40,5 +40,5 @@ index 7debc4d2..229eda02 100644
if (blockposition != null) {
--
2.17.1
2.19.2

View File

@ -1,11 +1,11 @@
From d041c357b3b534885061522f9ee31e5637d718dc Mon Sep 17 00:00:00 2001
From ebeb314b54e8b23b554ebfa4befb22e8191e0a88 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 21 Dec 2016 11:47:25 -0600
Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 5485c4bff3..00a46129b8 100644
index d19d24683..5945e37a5 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -44,6 +44,7 @@ public class EntityArmorStand extends EntityLiving {
@ -16,7 +16,7 @@ index 5485c4bff3..00a46129b8 100644
public EntityArmorStand(World world) {
super(EntityTypes.ARMOR_STAND, world);
@@ -757,4 +758,13 @@ public class EntityArmorStand extends EntityLiving {
@@ -754,4 +755,13 @@ public class EntityArmorStand extends EntityLiving {
public boolean df() {
return false;
}
@ -31,7 +31,7 @@ index 5485c4bff3..00a46129b8 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 2b66a08ade..124c3185bc 100644
index 2b66a08ad..124c3185b 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -211,4 +211,16 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@ -52,5 +52,5 @@ index 2b66a08ade..124c3185bc 100644
+ // Paper end
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 6a8062188a480ab5bc541016f54b972193b12045 Mon Sep 17 00:00:00 2001
From 1f59c8b7e5a197c0e92316d0d94a9abccea522bf Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 20 Dec 2016 23:09:21 -0600
Subject: [PATCH] Add option to remove invalid statistics
@ -23,7 +23,7 @@ index ae3d0f8f7..6b92ea437 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/ServerStatisticManager.java b/src/main/java/net/minecraft/server/ServerStatisticManager.java
index 6405f98e0..42e2f3d22 100644
index 4ddc33ca5..3ecd69786 100644
--- a/src/main/java/net/minecraft/server/ServerStatisticManager.java
+++ b/src/main/java/net/minecraft/server/ServerStatisticManager.java
@@ -83,6 +83,7 @@ public class ServerStatisticManager extends StatisticManager {
@ -37,11 +37,11 @@ index 6405f98e0..42e2f3d22 100644
@@ -120,6 +121,7 @@ public class ServerStatisticManager extends StatisticManager {
if (statistic == null) {
ServerStatisticManager.b.warn("Invalid statistic in {}: Don\'t know what {} is", this.d, s2);
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add(s2); // Paper
ServerStatisticManager.b.warn("Invalid statistic in {}: Don't know what {} is", this.d, s2);
+ if (com.destroystokyo.paper.PaperConfig.removeInvalidStatistics) invalidStats.add(s2); // Paper
} else {
this.a.put(statistic, nbttagcompound2.getInt(s2));
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 522f121e122e46df441274d297e314c7efdf70b9 Mon Sep 17 00:00:00 2001
From 2e2a5e39152f5951b37a6e851906618b81937a2d Mon Sep 17 00:00:00 2001
From: Alfie Cleveland <alfeh@me.com>
Date: Tue, 27 Dec 2016 01:57:57 +0000
Subject: [PATCH] Properly fix item duplication bug
@ -6,7 +6,7 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 891b804a6..edef46ac3 100644
index c2957ad2e..a615d7867 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -1552,7 +1552,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -19,10 +19,10 @@ index 891b804a6..edef46ac3 100644
@Override
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index cd8c36471..5584ef71f 100644
index 6530b6be8..553f76b81 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2521,7 +2521,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2504,7 +2504,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
public final boolean isDisconnected() {
@ -32,5 +32,5 @@ index cd8c36471..5584ef71f 100644
// CraftBukkit end
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 4cb8376b3a308bd9466db6835ab58acd7326453f Mon Sep 17 00:00:00 2001
From 1a44a092ae83a6bd26aa99853dc7e7076329992d Mon Sep 17 00:00:00 2001
From: Michael Himing <mhiming@gmail.com>
Date: Sun, 8 Jan 2017 18:50:35 +1100
Subject: [PATCH] Fix block break desync
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index dc1f4f4e11..5f1d9cd40e 100644
index 553f76b81..03b986bfa 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1159,6 +1159,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1153,6 +1153,8 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
if (d3 > 36.0D) {
@ -18,5 +18,5 @@ index dc1f4f4e11..5f1d9cd40e 100644
} else if (blockposition.getY() >= this.minecraftServer.getMaxBuildHeight()) {
return;
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From cc1e9d639dc2301f5e003d1fa64dbe53aa842a19 Mon Sep 17 00:00:00 2001
From 0bd7c165024bdd1dca19cb06ee1d731bedcd34c2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 19 Dec 2017 16:31:46 -0500
Subject: [PATCH] ExperienceOrbs API for Reason/Source/Triggering player
@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
index bb8b450a..163ce42c 100644
index fb7688e9e..1bf01000e 100644
--- a/src/main/java/net/minecraft/server/Block.java
+++ b/src/main/java/net/minecraft/server/Block.java
@@ -454,13 +454,13 @@ public class Block implements IMaterial {
@@ -451,13 +451,13 @@ public class Block implements IMaterial {
}
}
@ -28,7 +28,7 @@ index bb8b450a..163ce42c 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 69c8e245..8993fe1a 100644
index 3ec3053c7..473773724 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -618,7 +618,7 @@ public class EntityEnderDragon extends EntityInsentient implements IComplex, IMo
@ -41,7 +41,7 @@ index 69c8e245..8993fe1a 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityExperienceOrb.java b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
index 1e25ade7..3e2312b8 100644
index 2f6fd88ca..dfd6230b2 100644
--- a/src/main/java/net/minecraft/server/EntityExperienceOrb.java
+++ b/src/main/java/net/minecraft/server/EntityExperienceOrb.java
@@ -15,9 +15,59 @@ public class EntityExperienceOrb extends Entity {
@ -120,7 +120,7 @@ index 1e25ade7..3e2312b8 100644
public void d(EntityHuman entityhuman) {
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
index e33ecfcd..b164aff9 100644
index 84a9375db..e494552f6 100644
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
@@ -467,7 +467,7 @@ public class EntityFishingHook extends Entity {
@ -133,7 +133,7 @@ index e33ecfcd..b164aff9 100644
// CraftBukkit end
if (itemstack1.getItem().a(TagsItem.FISHES)) {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b2b575d0..48bb1480 100644
index 3c6d02e27..83605e7c7 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -354,7 +354,8 @@ public abstract class EntityLiving extends Entity {
@ -147,7 +147,7 @@ index b2b575d0..48bb1480 100644
this.expToDrop = 0;
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
index a5e1939e..e73dba09 100644
index a5e1939e0..e73dba09a 100644
--- a/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
+++ b/src/main/java/net/minecraft/server/EntityThrownExpBottle.java
@@ -36,7 +36,7 @@ public class EntityThrownExpBottle extends EntityProjectile {
@ -160,7 +160,7 @@ index a5e1939e..e73dba09 100644
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 229eda02..78a549b0 100644
index ac81a8d76..a11e66262 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -413,7 +413,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@ -173,7 +173,7 @@ index 229eda02..78a549b0 100644
if (this.tradingPlayer instanceof EntityPlayer) {
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
index 4a128f70..b8709646 100644
index 4a128f707..b87096467 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalBreed.java
@@ -122,7 +122,7 @@ public class PathfinderGoalBreed extends PathfinderGoal {
@ -186,7 +186,7 @@ index 4a128f70..b8709646 100644
// CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
index c8cfa3ab..aa7780ef 100644
index c8cfa3abe..aa7780eff 100644
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
@@ -390,7 +390,7 @@ public class PlayerInteractManager {
@ -199,7 +199,7 @@ index c8cfa3ab..aa7780ef 100644
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/SlotFurnaceResult.java b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
index 22c47c63..52e296d4 100644
index a6999f868..4ab6747d4 100644
--- a/src/main/java/net/minecraft/server/SlotFurnaceResult.java
+++ b/src/main/java/net/minecraft/server/SlotFurnaceResult.java
@@ -9,7 +9,7 @@ import org.bukkit.event.inventory.FurnaceExtractEvent;
@ -221,7 +221,7 @@ index 22c47c63..52e296d4 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 3a30349f..e1c09452 100644
index 3a30349f4..e1c09452b 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -1339,7 +1339,7 @@ public class CraftWorld implements World {
@ -234,7 +234,7 @@ index 3a30349f..e1c09452 100644
// not sure what this can do
if (LightningStrike.class.isAssignableFrom(clazz)) {
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index 3a09cab3..3302af0e 100644
index 3a09cab3d..3302af0e4 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -18,6 +18,18 @@ public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
@ -257,5 +257,5 @@ index 3a09cab3..3302af0e 100644
public EntityExperienceOrb getHandle() {
return (EntityExperienceOrb) entity;
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 0a23e674c29fc0ad5edf834507ae3d01d26f0a5c Mon Sep 17 00:00:00 2001
From 1a40170ab4790152fb4a3230349ee47ed673bfaf Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 22 Jan 2017 18:07:56 -0500
Subject: [PATCH] Cap Entity Collisions
@ -12,7 +12,7 @@ just as it does in Vanilla, but entity pushing logic will be capped.
You can set this to 0 to disable collisions.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 5d152af154..02d99aec43 100644
index 5d152af15..02d99aec4 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -355,4 +355,10 @@ public class PaperWorldConfig {
@ -27,7 +27,7 @@ index 5d152af154..02d99aec43 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 45cd8dca16..c39e789529 100644
index 04cd6350c..e26c9ee28 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -184,6 +184,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -39,10 +39,10 @@ index 45cd8dca16..c39e789529 100644
// Spigot end
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 398ad151a0..d926cbb247 100644
index 83605e7c7..be0a3f38e 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2357,8 +2357,11 @@ public abstract class EntityLiving extends Entity {
@@ -2354,8 +2354,11 @@ public abstract class EntityLiving extends Entity {
}
}
@ -56,5 +56,5 @@ index 398ad151a0..d926cbb247 100644
this.C(entity);
}
--
2.19.0
2.19.2

View File

@ -1,14 +1,14 @@
From 567b6385af03c95fe786cbd295f1f90437d6c902 Mon Sep 17 00:00:00 2001
From 63b46cf991a70de400e6f4f162c9f7860200973a Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 7 Feb 2017 16:55:35 -0600
Subject: [PATCH] Make targetSize more aggressive in the chunk unload queue
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e4d2a3a0b5..c0d48c33fc 100644
index 570ddc1a8..3854464e8 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -311,7 +311,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -313,7 +313,7 @@ public class ChunkProviderServer implements IChunkProvider {
// Spigot start
org.spigotmc.SlackActivityAccountant activityAccountant = this.world.getMinecraftServer().slackActivityAccountant;
activityAccountant.startActivity(0.5);
@ -18,5 +18,5 @@ index e4d2a3a0b5..c0d48c33fc 100644
LongIterator longiterator = this.unloadQueue.iterator();
--
2.19.0
2.19.2

View File

@ -1,14 +1,14 @@
From d3dc554ffad4b9665f26bc93ad2b45efa06bba9a Mon Sep 17 00:00:00 2001
From df943e565391509876e8ad06bbe47a9b0a2560f7 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 18 Feb 2017 19:29:58 -0600
Subject: [PATCH] Do not let armorstands drown
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 00a46129b8..6628af7778 100644
index 5945e37a5..4ecf34a40 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -766,5 +766,10 @@ public class EntityArmorStand extends EntityLiving {
@@ -763,5 +763,10 @@ public class EntityArmorStand extends EntityLiving {
super.move(moveType, x, y, z);
}
}
@ -20,7 +20,7 @@ index 00a46129b8..6628af7778 100644
// Paper end
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index d926cbb247..b9227f7a7f 100644
index be0a3f38e..a6457e870 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -202,6 +202,7 @@ public abstract class EntityLiving extends Entity {
@ -41,5 +41,5 @@ index d926cbb247..b9227f7a7f 100644
if (this.getAirTicks() == -20) {
this.setAirTicks(0);
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 0de8dab089092d058fca863b590c4a7e03e3f738 Mon Sep 17 00:00:00 2001
From f95fa75db1294d4a7ecd88f573dac82badd6741d Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Tue, 16 May 2017 21:29:08 -0500
Subject: [PATCH] Add option to make parrots stay on shoulders despite movement
@ -26,7 +26,7 @@ index 02d99aec4..3507997fc 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 816854dc2..64a8c6308 100644
index 16a8cee3e..86c6beefe 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -468,7 +468,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -39,10 +39,10 @@ index 816854dc2..64a8c6308 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index ec58d8764..2146ef742 100644
index 03b986bfa..c8b251e69 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1763,6 +1763,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1756,6 +1756,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
switch (packetplayinentityaction.c()) {
case START_SNEAKING:
this.player.setSneaking(true);
@ -54,8 +54,8 @@ index ec58d8764..2146ef742 100644
+ // Paper end
+
break;
case STOP_SNEAKING:
this.player.setSneaking(false);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 4ac0a2fcd23603d0ba2d7853dcda8cbee91f813a Mon Sep 17 00:00:00 2001
From fc463a63b1182b9104003f32905dd6b61f567a45 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 9 Jun 2017 19:03:43 +0200
Subject: [PATCH] Use TerminalConsoleAppender for console improvements
@ -19,7 +19,7 @@ Other changes:
configuration
diff --git a/pom.xml b/pom.xml
index bb80459af..6127bdcad 100644
index f0fc37abf..ea08d7d98 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,10 +40,27 @@
@ -54,7 +54,7 @@ index bb80459af..6127bdcad 100644
</dependency>
<dependency>
<groupId>org.ow2.asm</groupId>
@@ -203,10 +220,18 @@
@@ -204,10 +221,18 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/services/java.sql.Driver</resource>
</transformer>
@ -143,7 +143,7 @@ index 000000000..685deaa0e
+
+}
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
index b488178d5..ae77164a3 100644
index a575ff529..908127630 100644
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
@@ -79,6 +79,9 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
@ -185,7 +185,7 @@ index b488178d5..ae77164a3 100644
System.setOut(new PrintStream(new LoggerOutputStream(logger, Level.INFO), true));
System.setErr(new PrintStream(new LoggerOutputStream(logger, Level.WARN), true));
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 21d9218c5..64a3dafe6 100644
index a1a574023..ce1805062 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -61,7 +61,6 @@ import org.apache.commons.lang3.Validate;
@ -243,7 +243,7 @@ index 21d9218c5..64a3dafe6 100644
public KeyPair E() {
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 057feebd1..3dcceb2fe 100644
index 3f96443eb..fb9b0835b 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -78,8 +78,7 @@ public abstract class PlayerList {
@ -257,7 +257,7 @@ index 057feebd1..3dcceb2fe 100644
this.k = new GameProfileBanList(PlayerList.a);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index b671e17c8..7d7f7aa6f 100644
index ba702591a..97fa98d2c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -144,8 +144,8 @@ import java.nio.ByteBuffer;
@ -285,7 +285,7 @@ index b671e17c8..7d7f7aa6f 100644
@Override
public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index bc7bcaada..db725a0bc 100644
index 5c62e990a..b174a4efa 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -14,7 +14,7 @@ import java.util.logging.Logger;
@ -588,5 +588,5 @@ index 5cee8f00e..08b6bb7f9 100644
<AppenderRef ref="TerminalConsole" level="info"/>
</Root>
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 6f67577f6bcf7a345ffc759efdef3b02b66639de Mon Sep 17 00:00:00 2001
From ff3ab20478e71d9a45131040a17d5d0ee10edad4 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 17 Jun 2017 15:18:30 -0400
Subject: [PATCH] Shoulder Entities Release API
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 64a8c6308c..9614348157 100644
index 86c6beefe..d6333d9bb 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1829,21 +1829,48 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1826,21 +1826,48 @@ public abstract class EntityHuman extends EntityLiving {
}
// CraftBukkit end
}
@ -62,7 +62,7 @@ index 64a8c6308c..9614348157 100644
public abstract boolean isSpectator();
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index be00d79e85..755d288ed5 100644
index be00d79e8..755d288ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -460,6 +460,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
@ -99,5 +99,5 @@ index be00d79e85..755d288ed5 100644
public boolean discoverRecipe(NamespacedKey recipe) {
return discoverRecipes(Arrays.asList(recipe)) != 0;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 88c0400ef837ed8809fd5ddf71e58994bdb0a5c0 Mon Sep 17 00:00:00 2001
From 185c3ae637464f75ca6bfae9daacbe24f5b5093f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 11 Jul 2017 23:17:57 -0400
Subject: [PATCH] Fix Anvil Level sync to client
@ -10,10 +10,10 @@ Was done incorrectly and is now causing level desyncs to client.
Always send current level to the client, and instead make setWindowProperty set the level.
diff --git a/src/main/java/net/minecraft/server/ContainerAnvil.java b/src/main/java/net/minecraft/server/ContainerAnvil.java
index 8731d857b..4b6424911 100644
index a5ac893c4..a7b04a967 100644
--- a/src/main/java/net/minecraft/server/ContainerAnvil.java
+++ b/src/main/java/net/minecraft/server/ContainerAnvil.java
@@ -378,9 +378,9 @@ public class ContainerAnvil extends Container {
@@ -375,9 +375,9 @@ public class ContainerAnvil extends Container {
for (int i = 0; i < this.listeners.size(); ++i) {
ICrafting icrafting = (ICrafting) this.listeners.get(i);
@ -26,7 +26,7 @@ index 8731d857b..4b6424911 100644
this.lastLevelCost = this.levelCost;
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 1ddbb4329..a045ec3b2 100644
index 05070285b..0df834fc1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1431,6 +1431,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -42,5 +42,5 @@ index 1ddbb4329..a045ec3b2 100644
return true;
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 5adcf0eb891dd0cb7fd3980b018f32a89f05f63b Mon Sep 17 00:00:00 2001
From ed7f8a0d3ff1263fbea81d77508bfe18f275606b Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Thu, 17 Aug 2017 16:08:20 -0700
Subject: [PATCH] Allow specifying a custom "authentication servers down" kick
@ -27,7 +27,7 @@ index 963096fb3..a499578db 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/LoginListener.java b/src/main/java/net/minecraft/server/LoginListener.java
index 8bbea9624..10c82107d 100644
index 90d1096e5..b682b3a43 100644
--- a/src/main/java/net/minecraft/server/LoginListener.java
+++ b/src/main/java/net/minecraft/server/LoginListener.java
@@ -240,6 +240,10 @@ public class LoginListener implements PacketLoginInListener, ITickable {
@ -39,8 +39,8 @@ index 8bbea9624..10c82107d 100644
+ LoginListener.this.disconnect(new ChatComponentText(com.destroystokyo.paper.PaperConfig.authenticationServersDownKickMessage));
+ } else // Paper end
LoginListener.this.disconnect(new ChatMessage("multiplayer.disconnect.authservers_down", new Object[0]));
LoginListener.c.error("Couldn\'t verify username because servers are unavailable");
LoginListener.c.error("Couldn't verify username because servers are unavailable");
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 292b6bb1583fa684c7438958fcc58b3aa0f95117 Mon Sep 17 00:00:00 2001
From 17efa308f6cc4e7956119385e5668d65c1de9269 Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Thu, 28 Sep 2017 17:21:44 -0400
Subject: [PATCH] Add PlayerJumpEvent
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 9614348157..b357cb2077 100644
index d6333d9bb..96e3d20e3 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1481,6 +1481,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1478,6 +1478,7 @@ public abstract class EntityHuman extends EntityLiving {
return 0;
}
@ -17,7 +17,7 @@ index 9614348157..b357cb2077 100644
super.cH();
this.a(StatisticList.JUMP);
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 3289ba3ffd..b54da4eb79 100644
index c8b251e69..00751a9d9 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -59,6 +59,8 @@ import org.bukkit.inventory.CraftingInventory;
@ -29,7 +29,7 @@ index 3289ba3ffd..b54da4eb79 100644
import co.aikar.timings.MinecraftTimings; // Paper
// CraftBukkit end
@@ -875,7 +877,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -873,7 +875,34 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
d8 = d5 - this.p;
d9 = d6 - this.q;
if (this.player.onGround && !packetplayinflying.b() && d8 > 0.0D) {
@ -66,5 +66,5 @@ index 3289ba3ffd..b54da4eb79 100644
this.player.move(EnumMoveType.PLAYER, d7, d8, d9);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 09c0b959770707df93c068ef3cacca5ae30ee9a1 Mon Sep 17 00:00:00 2001
From 24f3bb70b4cad919e75878a444a0dde1bdabb956 Mon Sep 17 00:00:00 2001
From: Shane Freeder <theboyetronic@gmail.com>
Date: Thu, 5 Oct 2017 01:54:07 +0100
Subject: [PATCH] handle PacketPlayInKeepAlive async
@ -15,10 +15,10 @@ also adding some additional logging in order to help work out what is causing
random disconnections for clients.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index 1da026fe2..0beb9f881 100644
index 00751a9d9..587f00286 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2487,14 +2487,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2470,14 +2470,18 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
public void a(PacketPlayInKeepAlive packetplayinkeepalive) {
@ -40,5 +40,5 @@ index 1da026fe2..0beb9f881 100644
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From ca8e4f3b46c8477a1dc8c29f9d9799ae9c012e30 Mon Sep 17 00:00:00 2001
From 8ad7c912b5de1105857c07212ab0716f9f728506 Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Tue, 10 Oct 2017 18:45:20 +0200
Subject: [PATCH] Expose client protocol version and virtual host
@ -6,7 +6,7 @@ Subject: [PATCH] Expose client protocol version and virtual host
diff --git a/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java
new file mode 100644
index 0000000000..5caca6439d
index 000000000..5caca6439
--- /dev/null
+++ b/src/main/java/com/destroystokyo/paper/network/PaperNetworkClient.java
@@ -0,0 +1,50 @@
@ -61,7 +61,7 @@ index 0000000000..5caca6439d
+
+}
diff --git a/src/main/java/net/minecraft/server/HandshakeListener.java b/src/main/java/net/minecraft/server/HandshakeListener.java
index 6aabdc2974..a02fa29217 100644
index b4917c91b..25049a351 100644
--- a/src/main/java/net/minecraft/server/HandshakeListener.java
+++ b/src/main/java/net/minecraft/server/HandshakeListener.java
@@ -15,6 +15,7 @@ public class HandshakeListener implements PacketHandshakingInListener {
@ -72,7 +72,7 @@ index 6aabdc2974..a02fa29217 100644
public HandshakeListener(MinecraftServer minecraftserver, NetworkManager networkmanager) {
this.a = minecraftserver;
@@ -130,6 +131,10 @@ public class HandshakeListener implements PacketHandshakingInListener {
@@ -128,6 +129,10 @@ public class HandshakeListener implements PacketHandshakingInListener {
throw new UnsupportedOperationException("Invalid intention " + packethandshakinginsetprotocol.b());
}
@ -84,7 +84,7 @@ index 6aabdc2974..a02fa29217 100644
public void a(IChatBaseComponent ichatbasecomponent) {}
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
index 26da897243..4f3f88ff66 100644
index 26da89724..4f3f88ff6 100644
--- a/src/main/java/net/minecraft/server/NetworkManager.java
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
@@ -63,6 +63,10 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
@ -99,7 +99,7 @@ index 26da897243..4f3f88ff66 100644
public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
this.h = enumprotocoldirection;
diff --git a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
index 7acdac55e5..f1a3be69d0 100644
index 7acdac55e..f1a3be69d 100644
--- a/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
+++ b/src/main/java/net/minecraft/server/PacketHandshakingInSetProtocol.java
@@ -33,6 +33,7 @@ public class PacketHandshakingInSetProtocol implements Packet<PacketHandshakingI
@ -111,7 +111,7 @@ index 7acdac55e5..f1a3be69d0 100644
return this.a;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index a045ec3b22..0d76a42997 100644
index 0df834fc1..8046a2a5f 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -176,6 +176,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -136,5 +136,5 @@ index a045ec3b22..0d76a42997 100644
public double getEyeHeight(boolean ignorePose) {
if (ignorePose) {
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 152da465104aea25904a9cb90ed2b5e159c5ef36 Mon Sep 17 00:00:00 2001
From 0295ed3932dbebe229b0494888da7ab598fe1d1b Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Tue, 31 Oct 2017 03:26:18 +0100
Subject: [PATCH] Send attack SoundEffects only to players who can see the
@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index b357cb2077..b047e8e8b1 100644
index 96e3d20e3..4aa8e85ab 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -995,6 +995,15 @@ public abstract class EntityHuman extends EntityLiving {
@@ -992,6 +992,15 @@ public abstract class EntityHuman extends EntityLiving {
this.k = 0;
}
@ -25,7 +25,7 @@ index b357cb2077..b047e8e8b1 100644
public void attack(Entity entity) {
if (entity.bk()) {
if (!entity.t(this)) {
@@ -1019,7 +1028,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1016,7 +1025,7 @@ public abstract class EntityHuman extends EntityLiving {
int i = b0 + EnchantmentManager.b((EntityLiving) this);
if (this.isSprinting() && flag) {
@ -34,7 +34,7 @@ index b357cb2077..b047e8e8b1 100644
++i;
flag1 = true;
}
@@ -1097,7 +1106,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1094,7 +1103,7 @@ public abstract class EntityHuman extends EntityLiving {
}
}
@ -43,7 +43,7 @@ index b357cb2077..b047e8e8b1 100644
this.dl();
}
@@ -1127,15 +1136,15 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1124,15 +1133,15 @@ public abstract class EntityHuman extends EntityLiving {
}
if (flag2) {
@ -62,7 +62,7 @@ index b357cb2077..b047e8e8b1 100644
}
}
@@ -1191,7 +1200,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1188,7 +1197,7 @@ public abstract class EntityHuman extends EntityLiving {
this.applyExhaustion(world.spigotConfig.combatExhaustion); // Spigot - Change to use configurable value
} else {
@ -72,7 +72,7 @@ index b357cb2077..b047e8e8b1 100644
entity.extinguish();
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 686b356f0d..225ecce71a 100644
index 44ed34174..c1ede0651 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -954,6 +954,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -89,5 +89,5 @@ index 686b356f0d..225ecce71a 100644
for (int i = 0; i < this.v.size(); ++i) {
((IWorldAccess) this.v.get(i)).a(entityhuman, soundeffect, soundcategory, d0, d1, d2, f, f1);
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 0c6ce876938c0eed64a3e2934d4c6395a687a0b1 Mon Sep 17 00:00:00 2001
From 1297209afca38458f9f9f91d4dcbc873a3865d83 Mon Sep 17 00:00:00 2001
From: pkt77 <parkerkt77@gmail.com>
Date: Fri, 10 Nov 2017 23:46:34 -0500
Subject: [PATCH] Add PlayerArmorChangeEvent
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index b9227f7a7f..f5770884b0 100644
index a6457e870..fadf1df28 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1,5 +1,6 @@
@ -15,7 +15,7 @@ index b9227f7a7f..f5770884b0 100644
import com.google.common.base.Objects;
import com.google.common.collect.Maps;
import java.util.Collection;
@@ -2086,6 +2087,13 @@ public abstract class EntityLiving extends Entity {
@@ -2084,6 +2085,13 @@ public abstract class EntityLiving extends Entity {
ItemStack itemstack1 = this.getEquipment(enumitemslot);
if (!ItemStack.matches(itemstack1, itemstack)) {
@ -30,7 +30,7 @@ index b9227f7a7f..f5770884b0 100644
if (!itemstack.isEmpty()) {
this.getAttributeMap().a(itemstack.a(enumitemslot));
diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java
index a90ac68c30..49592e5572 100644
index a13515a7f..bad1020c0 100644
--- a/src/main/java/net/minecraft/server/EnumItemSlot.java
+++ b/src/main/java/net/minecraft/server/EnumItemSlot.java
@@ -20,6 +20,7 @@ public enum EnumItemSlot {
@ -42,5 +42,5 @@ index a90ac68c30..49592e5572 100644
return this.g;
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 94d320edecd9da9e43c9720be5cd42d71a89bdad Mon Sep 17 00:00:00 2001
From 11eb46a5745a6872cb071f7f2f23f1df432313af Mon Sep 17 00:00:00 2001
From: Zach Brown <zach.brown@destroystokyo.com>
Date: Sat, 27 Jan 2018 17:04:14 -0500
Subject: [PATCH] Add ArmorStand Item Meta
@ -354,10 +354,10 @@ index 000000000..0e8acf12e
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 081904dad..dacca4bc4 100644
index c00ced8e8..197563552 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -152,6 +152,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -155,6 +155,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
.put(CraftMetaCharge.class, "FIREWORK_EFFECT")
.put(CraftMetaKnowledgeBook.class, "KNOWLEDGE_BOOK")
.put(CraftMetaTropicalFishBucket.class, "TROPICAL_FISH_BUCKET")
@ -365,7 +365,7 @@ index 081904dad..dacca4bc4 100644
.put(CraftMetaItem.class, "UNSPECIFIC")
.build();
@@ -1239,7 +1240,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1280,7 +1281,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
CraftMetaCharge.EXPLOSION.NBT,
CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT,
CraftMetaKnowledgeBook.BOOK_RECIPES.NBT,
@ -414,5 +414,5 @@ index 65b8123a8..0ad0004b9 100644
assertThat("Forgotten test?", providers, hasSize(ItemStackTest.COMPOUND_MATERIALS.length - 4/* Normal item meta, skulls, eggs and tile entities */));
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 00bb5cf018de0f3d75abc87b211b2f1b0401adaa Mon Sep 17 00:00:00 2001
From 23502bc44acab3ad3bd991dff952cb88df286940 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
Date: Sat, 10 Mar 2018 00:50:24 +0100
Subject: [PATCH] Toggleable player crits, helps mitigate hacked clients.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 67b4d576a9..02c52958c8 100644
index 67b4d576a..02c52958c 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -182,6 +182,11 @@ public class PaperWorldConfig {
@ -21,10 +21,10 @@ index 67b4d576a9..02c52958c8 100644
private void allChunksAreSlimeChunks() {
allChunksAreSlimeChunks = getBoolean("all-chunks-are-slime-chunks", false);
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index b047e8e8b1..b9e6a18293 100644
index 4aa8e85ab..d5adc0a24 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1035,6 +1035,7 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1032,6 +1032,7 @@ public abstract class EntityHuman extends EntityLiving {
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround && !this.z_() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && entity instanceof EntityLiving;
@ -33,5 +33,5 @@ index b047e8e8b1..b9e6a18293 100644
if (flag2) {
f *= 1.5F;
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 8031e2f0a6c2736b55d5e96c527b6cf080b88d74 Mon Sep 17 00:00:00 2001
From 66b22bb50ee08233312675626b9ed979fed3eac9 Mon Sep 17 00:00:00 2001
From: MiniDigger <admin@minidigger.me>
Date: Sun, 18 Mar 2018 15:44:44 +0100
Subject: [PATCH] Call PortalCreateEvent for exit portals
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
index 5e899e05cf..20f2a9197c 100644
index 434589adb..7e858bab4 100644
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
@@ -48,6 +48,9 @@ public class PortalTravelAgent {
@ -53,13 +53,13 @@ index 5e899e05cf..20f2a9197c 100644
i1 = MathHelper.clamp(i1, 70, this.world.ab() - 10);
j5 = i1;
@@ -416,8 +433,11 @@ public class PortalTravelAgent {
l3 = j2 + (l2 - 1) * l5 - k2 * k5;
boolean flag1 = i3 < 0;
i4 = j2 + (i3 - 1) * l5 - k2 * k5;
boolean flag1 = l2 < 0;
- blockposition_mutableblockposition.c(j3, k3, l3);
- blockposition_mutableblockposition.c(j3, l3, i4);
- this.world.setTypeUpdate(blockposition_mutableblockposition, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ // Paper start
+ BlockPosition pos = new BlockPosition(j3, k3, l3);
+ BlockPosition pos = new BlockPosition(j3, l3, i4);
+ nmsBlocks.put(pos, flag1 ? Blocks.OBSIDIAN.getBlockData() : Blocks.AIR.getBlockData());
+ bukkitBlocks.add(this.world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
+ // Paper end
@ -67,9 +67,9 @@ index 5e899e05cf..20f2a9197c 100644
}
}
@@ -427,7 +447,11 @@ public class PortalTravelAgent {
for (l2 = -1; l2 < 4; ++l2) {
if (k2 == -1 || k2 == 2 || l2 == -1 || l2 == 3) {
blockposition_mutableblockposition.c(i5 + k2 * k5, j5 + l2, j2 + k2 * l5);
for (i3 = -1; i3 < 4; ++i3) {
if (k2 == -1 || k2 == 2 || i3 == -1 || i3 == 3) {
blockposition_mutableblockposition.c(i5 + k2 * k5, j5 + i3, j2 + k2 * l5);
- this.world.setTypeAndData(blockposition_mutableblockposition, Blocks.OBSIDIAN.getBlockData(), 3);
+ // Paper start
+ BlockPosition pos = new BlockPosition(blockposition_mutableblockposition.getX(), blockposition_mutableblockposition.getY(), blockposition_mutableblockposition.getZ());
@ -80,9 +80,9 @@ index 5e899e05cf..20f2a9197c 100644
}
}
@@ -437,10 +461,22 @@ public class PortalTravelAgent {
for (l2 = 0; l2 < 2; ++l2) {
for (i3 = 0; i3 < 3; ++i3) {
blockposition_mutableblockposition.c(i5 + l2 * k5, j5 + i3, j2 + l2 * l5);
for (i3 = 0; i3 < 2; ++i3) {
for (l2 = 0; l2 < 3; ++l2) {
blockposition_mutableblockposition.c(i5 + i3 * k5, j5 + l2, j2 + i3 * l5);
- this.world.setTypeAndData(blockposition_mutableblockposition, iblockdata, 18);
+
+ // Paper start
@ -104,5 +104,5 @@ index 5e899e05cf..20f2a9197c 100644
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 6cfc9f17e0b11859dd5255f1d21a3050a7fef30c Mon Sep 17 00:00:00 2001
From 20f385cb4b8ce6bb47708d047bde887b18d4b3ce Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 14 Apr 2018 20:20:46 +0200
Subject: [PATCH] Configurable sprint interruption on attack
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable sprint interruption on attack
If the sprint interruption is disabled players continue sprinting when they attack entities.
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
index 02c52958c8..fe56f01035 100644
index 02c52958c..fe56f0103 100644
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
@@ -409,4 +409,9 @@ public class PaperWorldConfig {
@ -20,10 +20,10 @@ index 02c52958c8..fe56f01035 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 73998e5a75..1d97a5442c 100644
index 507641fc6..2bab2ab92 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -1087,7 +1087,11 @@ public abstract class EntityHuman extends EntityLiving {
@@ -1084,7 +1084,11 @@ public abstract class EntityHuman extends EntityLiving {
this.motX *= 0.6D;
this.motZ *= 0.6D;
@ -37,5 +37,5 @@ index 73998e5a75..1d97a5442c 100644
if (flag3) {
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 42e32c7a176b27311aae7d6ac8d3614133f17f48 Mon Sep 17 00:00:00 2001
From 7caac3eb29b5b2438119eda8589590d63cf31bef Mon Sep 17 00:00:00 2001
From: 0x22 <0x22@futureclient.net>
Date: Thu, 26 Apr 2018 04:41:11 -0400
Subject: [PATCH] Fix exploit that allowed colored signs to be created
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index aec39d8f7..e1a740cb9 100644
index 371513042..871dea68f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2500,7 +2500,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2483,7 +2483,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
String[] lines = new String[4];
for (int i = 0; i < astring.length; ++i) {
@ -18,5 +18,5 @@ index aec39d8f7..e1a740cb9 100644
SignChangeEvent event = new SignChangeEvent((org.bukkit.craftbukkit.block.CraftBlock) player.getWorld().getBlockAt(x, y, z), this.server.getPlayer(this.player), lines);
this.server.getPluginManager().callEvent(event);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 027171f9caed4d7ad70d60aa8c9bc9fc2a9793a5 Mon Sep 17 00:00:00 2001
From 092619ad43618d217d2519f0054de7b7c5a05d17 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Sat, 16 Jun 2018 01:18:16 -0500
Subject: [PATCH] Make shield blocking delay configurable
@ -19,10 +19,10 @@ index a005c8c4e..bd4cca26c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 666e3aaf6..d89f1fe03 100644
index fadf1df28..67ed48652 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2703,7 +2703,7 @@ public abstract class EntityLiving extends Entity {
@@ -2700,7 +2700,7 @@ public abstract class EntityLiving extends Entity {
if (this.isHandRaised() && !this.activeItem.isEmpty()) {
Item item = this.activeItem.getItem();
@ -31,7 +31,7 @@ index 666e3aaf6..d89f1fe03 100644
} else {
return false;
}
@@ -2791,4 +2791,16 @@ public abstract class EntityLiving extends Entity {
@@ -2788,4 +2788,16 @@ public abstract class EntityLiving extends Entity {
public boolean df() {
return true;
}
@ -69,5 +69,5 @@ index 2f96842bb..8e65bfc78 100644
// Paper end
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From c0417136a7ddae5c2979f04638b1a1333c1782c4 Mon Sep 17 00:00:00 2001
From d612d82b0a3ff0130214126a54fb0de279d69ae2 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 15 Jun 2013 19:51:17 -0400
Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
@ -6,7 +6,7 @@ Subject: [PATCH] EntityShootBowEvent consumeArrow and getArrowItem API
Adds ability to get what arrow was shot, and control if it should be consumed.
diff --git a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
index f3fca99b..9ef0c22d 100644
index 4bf6fd083..566846eb0 100644
--- a/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
+++ b/src/main/java/net/minecraft/server/EntitySkeletonAbstract.java
@@ -160,7 +160,7 @@ public abstract class EntitySkeletonAbstract extends EntityMonster implements IR
@ -19,7 +19,7 @@ index f3fca99b..9ef0c22d 100644
event.getProjectile().remove();
return;
diff --git a/src/main/java/net/minecraft/server/ItemBow.java b/src/main/java/net/minecraft/server/ItemBow.java
index b0f7649b..152b179c 100644
index b0f7649b8..152b179ce 100644
--- a/src/main/java/net/minecraft/server/ItemBow.java
+++ b/src/main/java/net/minecraft/server/ItemBow.java
@@ -57,6 +57,7 @@ public class ItemBow extends Item {
@ -58,10 +58,10 @@ index b0f7649b..152b179c 100644
if (itemstack1.isEmpty()) {
entityhuman.inventory.f(itemstack1);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 36cad95a..246bd118 100644
index 8d12155c3..3f17fbd37 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -314,7 +314,7 @@ public class CraftEventFactory {
@@ -327,7 +327,7 @@ public class CraftEventFactory {
/**
* EntityShootBowEvent
*/
@ -70,7 +70,7 @@ index 36cad95a..246bd118 100644
LivingEntity shooter = (LivingEntity) who.getBukkitEntity();
CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
Arrow arrow = (Arrow) entityArrow.getBukkitEntity();
@@ -323,7 +323,7 @@ public class CraftEventFactory {
@@ -336,7 +336,7 @@ public class CraftEventFactory {
itemInHand = null;
}
@ -80,5 +80,5 @@ index 36cad95a..246bd118 100644
return event;
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 69b571c2f29805b8ffff38da2d4ac5e3b4960a52 Mon Sep 17 00:00:00 2001
From 59f1cdb547e2355cf6ab94742fd601f41954550e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 29 Jun 2018 00:21:28 -0400
Subject: [PATCH] LivingEntity Hand Raised/Item Use API
@ -6,7 +6,7 @@ Subject: [PATCH] LivingEntity Hand Raised/Item Use API
How long an entity has raised hands to charge an attack or use an item
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 18517704c..a8103ff68 100644
index 8aef335a1..3e9af4481 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -106,7 +106,7 @@ public abstract class EntityLiving extends Entity {
@ -18,7 +18,7 @@ index 18517704c..a8103ff68 100644
protected int bu;
protected int bv;
private BlockPosition bL;
@@ -2692,10 +2692,12 @@ public abstract class EntityLiving extends Entity {
@@ -2689,10 +2689,12 @@ public abstract class EntityLiving extends Entity {
return this.activeItem;
}
@ -62,5 +62,5 @@ index 8e65bfc78..52834b6da 100644
// Paper end
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 0beca9cb188e31784710a1483c321cf24f989d37 Mon Sep 17 00:00:00 2001
From 60a79fd7ebc61e53da457fbc62b43064f962b9f8 Mon Sep 17 00:00:00 2001
From: Brokkonaut <hannos17@gmx.de>
Date: Sat, 30 Jun 2018 05:45:39 +0200
Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
@ -6,10 +6,10 @@ Subject: [PATCH] Improve ProjectileHitEvent to include the BlockFace where the
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 246bd118..a7d335d3 100644
index 3f17fbd37..dfedd4c30 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -908,7 +908,7 @@ public class CraftEventFactory {
@@ -921,7 +921,7 @@ public class CraftEventFactory {
hitBlock = entity.getBukkitEntity().getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
}
@ -19,5 +19,5 @@ index 246bd118..a7d335d3 100644
return event;
}
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 37de6524ae00610270e919ea443ef399db0d6811 Mon Sep 17 00:00:00 2001
From 9b687f71b81c508894ee9af7696105e89c926ecf Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 22 Jun 2018 10:38:31 -0500
Subject: [PATCH] Add config to disable ender dragon legacy check
@ -19,10 +19,10 @@ index bd4cca26c..85296e48d 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index e69c44ee2..f4a8a4b4d 100644
index 1e22aa531..67808446c 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -29,16 +29,21 @@ public class EnderDragonBattle {
@@ -27,10 +27,11 @@ public class EnderDragonBattle {
private int h;
private int i;
private int j;
@ -30,21 +30,20 @@ index e69c44ee2..f4a8a4b4d 100644
private boolean k;
private boolean l;
private UUID m;
- private boolean n;
+ private boolean n; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER
- private boolean n = true;
+ private boolean n = true; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER
private BlockPosition o;
private EnumDragonRespawn p;
private int q;
private List<EntityEnderCrystal> r;
@@ -293,7 +294,7 @@ public class EnderDragonBattle {
hashset.add(entityplayer);
}
public EnderDragonBattle(WorldServer worldserver, NBTTagCompound nbttagcompound) {
+ // Paper start
+ setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon);
+ if (!scanForLegacyFight()) setDragonKilled(true);
+ // Paper end∂
this.c = (BossBattleServer) (new BossBattleServer(new ChatMessage("entity.minecraft.ender_dragon", new Object[0]), BossBattle.BarColor.PINK, BossBattle.BarStyle.PROGRESS)).setPlayMusic(true).c(true);
this.e = Lists.newArrayList();
this.n = true;
- HashSet hashset1 = Sets.newHashSet(this.bossBattle.getPlayers());
+ HashSet<EntityPlayer> hashset1 = Sets.newHashSet(this.bossBattle.getPlayers()); // Paper - decomp fix
hashset1.removeAll(hashset);
for(EntityPlayer entityplayer1 : hashset1) {
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From d7d53c56a57bb21a15a31521276395893f488216 Mon Sep 17 00:00:00 2001
From 5d63a3c07d358801ce32bba4d4f26098c738e4db Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Tue, 3 Jul 2018 21:56:23 -0400
Subject: [PATCH] InventoryCloseEvent Reason API
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
to "confirm" things based on if it was player triggered close or not.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 44f37f50a..864691f87 100644
index cded44bc4..101343849 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -931,7 +931,7 @@ public class Chunk implements IChunkAccess {
@ -29,7 +29,7 @@ index 44f37f50a..864691f87 100644
}
}
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index 1d97a5442..d510ef63d 100644
index 2bab2ab92..20a46e2af 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -161,7 +161,7 @@ public abstract class EntityHuman extends EntityLiving {
@ -56,7 +56,7 @@ index 1d97a5442..d510ef63d 100644
this.activeContainer = this.defaultContainer;
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index edef46ac3..9dcf29609 100644
index a615d7867..6933d8876 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -347,7 +347,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -110,10 +110,10 @@ index edef46ac3..9dcf29609 100644
this.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index e1a740cb9..f9e6c2125 100644
index 871dea68f..30d5c1734 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -2036,7 +2036,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -2019,7 +2019,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
PlayerConnectionUtils.ensureMainThread(packetplayinclosewindow, this, this.player.getWorldServer());
if (this.player.isFrozen()) return; // CraftBukkit
@ -123,7 +123,7 @@ index e1a740cb9..f9e6c2125 100644
this.player.m();
}
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
index 8412b153f..e9ca51d91 100644
index 64a86b699..e6ee5042c 100644
--- a/src/main/java/net/minecraft/server/PlayerList.java
+++ b/src/main/java/net/minecraft/server/PlayerList.java
@@ -423,7 +423,7 @@ public abstract class PlayerList {
@ -168,10 +168,10 @@ index 8699cc72f..0f1d700c7 100644
// Check if the fromWorld and toWorld are the same.
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index a7d335d30..630a43bc4 100644
index dfedd4c30..b220895c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -998,8 +998,19 @@ public class CraftEventFactory {
@@ -1011,8 +1011,19 @@ public class CraftEventFactory {
return event;
}
@ -193,5 +193,5 @@ index a7d335d30..630a43bc4 100644
human.activeContainer.transferTo(human.defaultContainer, human.getBukkitEntity());
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 0124a7c77c02dc3feaa4e4b050cc2f762d6df5bc Mon Sep 17 00:00:00 2001
From a2401ef6a6fb1f963e4fba262d19a483d57993de Mon Sep 17 00:00:00 2001
From: Minecrell <minecrell@minecrell.net>
Date: Fri, 13 Jul 2018 14:54:43 +0200
Subject: [PATCH] Refresh player inventory when cancelling
@ -16,10 +16,10 @@ Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f9e6c2125..ff03755bc 100644
index 30d5c1734..e204dbe21 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1950,6 +1950,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1934,6 +1934,7 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
if (event.isCancelled()) {
@ -28,5 +28,5 @@ index f9e6c2125..ff03755bc 100644
}
// CraftBukkit end
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 085ab94bffa4a3c2d94334a64b83e5af05902981 Mon Sep 17 00:00:00 2001
From cbad86f2de8d4863753c51a2eb06ee6fb8a8230a Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:23:00 -0400
Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for
@ -12,10 +12,10 @@ keep it vanilla in behavior
a player may teleport away, and trigger instant despawn
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
index 200d46a8a0..db9201d292 100644
index a28aa016c..d92b6a6ea 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -634,6 +634,8 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -633,6 +633,8 @@ public abstract class EntityInsentient extends EntityLiving {
if (this.persistent) {
this.ticksFarFromPlayer = 0;
} else {
@ -25,5 +25,5 @@ index 200d46a8a0..db9201d292 100644
if (entityhuman != null && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From 91b0749f983780bab7e46d67a6d2908a1209fc8e Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Thu, 19 Jul 2018 01:13:28 -0400
Subject: [PATCH] add more information to Entity.toString()
@ -6,18 +6,18 @@ Subject: [PATCH] add more information to Entity.toString()
UUID, ticks lived, valid, dead
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 5600223d9..173712659 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2498,7 +2498,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
}
public String toString() {
- return String.format(Locale.ROOT, "%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ)});
- return String.format(Locale.ROOT, "%s['%s'/%d, l='%s', x=%.2f, y=%.2f, z=%.2f]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), this.id, this.world == null ? "~NULL~" : this.world.getWorldData().getName(), this.locX, this.locY, this.locZ});
+ return String.format(Locale.ROOT, "%s[\'%s\'/%d, uuid=\'%s\', l=\'%s\', x=%.2f, y=%.2f, z=%.2f, cx=%d, cz=%d, tl=%d, v=%b, d=%b]", new Object[] { this.getClass().getSimpleName(), this.getDisplayName().getText(), Integer.valueOf(this.id), this.uniqueID.toString(), this.world == null ? "~NULL~" : this.world.getWorldData().getName(), Double.valueOf(this.locX), Double.valueOf(this.locY), Double.valueOf(this.locZ), getChunkX(), getChunkZ(), this.ticksLived, this.valid, this.dead}); // Paper - add more information
}
public boolean isInvulnerable(DamageSource damagesource) {
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 7ac07ac07ac07ac07ac07ac07ac07ac07ac07ac0 Mon Sep 17 00:00:00 2001
From c776399982299d6cd75dacdcd7f3eb0882a606bd 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 7ac07ac07ac0..7ac07ac07ac0 100644
index deb0d4f05..75b591bc2 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,7 +81,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 43583b6ba..1c5737e3f 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1,5 +1,10 @@
@ -105,7 +105,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
private boolean l;
@@ -687,6 +693,7 @@ public class Chunk implements IChunkAccess {
if (i != this.locX || j != this.locZ) {
Chunk.d.warn("Wrong location! ({}, {}) should be ({}, {}), {}", Integer.valueOf(i), Integer.valueOf(j), Integer.valueOf(this.locX), Integer.valueOf(this.locZ), entity);
Chunk.d.warn("Wrong location! ({}, {}) should be ({}, {}), {}", i, j, this.locX, this.locZ, entity);
entity.die();
+ return; // Paper
}
@ -163,7 +163,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
this.world.a(entityslice.stream().filter((entity) -> {
return !(entity instanceof EntityHuman);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index a402f71a9..6c427e9aa 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2723,6 +2723,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -175,7 +175,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
this.uniqueID = uuid;
this.au = this.uniqueID.toString();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 29c3a24f2..5557e9409 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -75,7 +75,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -188,7 +188,7 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
private final List<TileEntity> c = Lists.newArrayList();
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 7ac07ac07ac0..7ac07ac07ac0 100644
index 0bb903aab..572c54c9c 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -41,7 +41,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -219,5 +219,5 @@ index 7ac07ac07ac0..7ac07ac07ac0 100644
logger.error("Overwrote an existing entity " + old + " with " + entity);
if (DEBUG_ENTITIES) {
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From b0ce442eecdfb77849cbfa7916cdbbb7410f4704 Mon Sep 17 00:00:00 2001
From 96c562f75805dc969a5acdd9e4f9577ab3d55652 Mon Sep 17 00:00:00 2001
From: Hugo Manrique <hugmanrique@gmail.com>
Date: Mon, 23 Jul 2018 14:22:26 +0200
Subject: [PATCH] Vanished players don't have rights
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e0cd7bd857..801c3fb8e0 100644
index 6c427e9aa..f13fa7fff 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -94,7 +94,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -18,7 +18,7 @@ index e0cd7bd857..801c3fb8e0 100644
protected int k;
private Entity vehicle;
diff --git a/src/main/java/net/minecraft/server/ItemBlock.java b/src/main/java/net/minecraft/server/ItemBlock.java
index 85d364b8f4..ff6c8e2b55 100644
index 85d364b8f..ff6c8e2b5 100644
--- a/src/main/java/net/minecraft/server/ItemBlock.java
+++ b/src/main/java/net/minecraft/server/ItemBlock.java
@@ -70,7 +70,8 @@ public class ItemBlock extends Item {
@ -32,7 +32,7 @@ index 85d364b8f4..ff6c8e2b55 100644
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), player, CraftBlockData.fromData(iblockdata), defaultReturn);
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
index 1ea8464aeb..35b08a5f99 100644
index c6ec1a782..6c61718b2 100644
--- a/src/main/java/net/minecraft/server/VoxelShape.java
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
@@ -24,6 +24,7 @@ public abstract class VoxelShape {
@ -44,7 +44,7 @@ index 1ea8464aeb..35b08a5f99 100644
if (this.isEmpty()) {
throw new UnsupportedOperationException("No bounds for empty shape.");
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index fa94e41f0f..ad1011a22a 100644
index 7f23a8e2e..811311e9e 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1595,6 +1595,37 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -86,10 +86,10 @@ index fa94e41f0f..ad1011a22a 100644
if (voxelshape.isEmpty()) {
return true;
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index 630a43bc41..da779ecb3a 100644
index b220895c2..672c32858 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -889,6 +889,14 @@ public class CraftEventFactory {
@@ -902,6 +902,14 @@ public class CraftEventFactory {
Projectile projectile = (Projectile) entity.getBukkitEntity();
org.bukkit.entity.Entity collided = position.entity.getBukkitEntity();
com.destroystokyo.paper.event.entity.ProjectileCollideEvent event = new com.destroystokyo.paper.event.entity.ProjectileCollideEvent(projectile, collided);
@ -105,5 +105,5 @@ index 630a43bc41..da779ecb3a 100644
return event;
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 5b600d2b9415bea339241a122bbf8ab97ce2c103 Mon Sep 17 00:00:00 2001
From cbb9f2cdcc6a9cc78a19674821934916c512e6d9 Mon Sep 17 00:00:00 2001
From: Anthony MacAllister <anthonymmacallister@gmail.com>
Date: Thu, 26 Jul 2018 15:30:03 -0400
Subject: [PATCH] EntityTransformedEvent
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
index 709dfb07..8ba9f3bb 100644
index 175235a75..dab644930 100644
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
@@ -53,6 +53,7 @@ public class EntityMushroomCow extends EntityCow {
@ -14,13 +14,13 @@ index 709dfb07..8ba9f3bb 100644
}
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entitycow.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.SHEARED).callEvent()) return false; // Paper
this.world.addEntity(entitycow, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED);
// CraftBukkit end
this.die(); // CraftBukkit - from above
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 78a549b0..868d2483 100644
index a11e66262..e4a570e01 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -630,6 +630,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -625,6 +625,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
if (CraftEventFactory.callEntityTransformEvent(this, entitywitch, EntityTransformEvent.TransformReason.LIGHTNING).isCancelled()) {
return;
}
@ -29,7 +29,7 @@ index 78a549b0..868d2483 100644
// CraftBukkit end
this.die();
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 02bebf72..4b326bf6 100644
index dc00725f9..823d4be7f 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -247,6 +247,7 @@ public class EntityZombie extends EntityMonster {
@ -40,26 +40,26 @@ index 02bebf72..4b326bf6 100644
this.world.addEntity(entityzombie, CreatureSpawnEvent.SpawnReason.DROWNED); // CraftBukkit - added spawn reason
this.die();
}
@@ -410,6 +411,7 @@ public class EntityZombie extends EntityMonster {
@@ -409,6 +410,7 @@ public class EntityZombie extends EntityMonster {
if (CraftEventFactory.callEntityTransformEvent(this, entityzombievillager, EntityTransformEvent.TransformReason.INFECTION).isCancelled()) {
return;
}
// CraftBukkit end
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityvillager.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.INFECTED).callEvent()) return; // Paper
this.world.kill(entityvillager); // CraftBukkit - from above
this.world.addEntity(entityzombievillager, CreatureSpawnEvent.SpawnReason.INFECTION); // CraftBukkit - add SpawnReason
this.world.a((EntityHuman) null, 1026, new BlockPosition(this), 0);
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
index cbbd2197..0e5dd111 100644
index d2b2cc2fd..ab1b3ab5e 100644
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
@@ -140,6 +140,7 @@ public class EntityZombieVillager extends EntityZombie {
@@ -139,6 +139,7 @@ public class EntityZombieVillager extends EntityZombie {
if (CraftEventFactory.callEntityTransformEvent(this, entityvillager, EntityTransformEvent.TransformReason.CURED).isCancelled()) {
return;
}
// CraftBukkit end
+ if (!new com.destroystokyo.paper.event.entity.EntityTransformedEvent(this.getBukkitEntity(), entityvillager.getBukkitEntity(), com.destroystokyo.paper.event.entity.EntityTransformedEvent.TransformedReason.CURED).callEvent()) return; // Paper
this.world.kill(this); // CraftBukkit - from above
this.world.addEntity(entityvillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CURED); // CraftBukkit - add SpawnReason
if (this.bD != null) {
EntityHuman entityhuman = this.world.b(this.bD);
// CraftBukkit end
--
2.17.1
2.19.2

View File

@ -1,4 +1,4 @@
From 2c737ca36dc1dfff4e6ef70b46329b43d6a09814 Mon Sep 17 00:00:00 2001
From 01b2f97693dd5bc72e602aba07776fc468ffdd84 Mon Sep 17 00:00:00 2001
From: willies952002 <admin@domnian.com>
Date: Thu, 26 Jul 2018 02:25:46 -0400
Subject: [PATCH] Implement Expanded ArmorStand API
@ -8,7 +8,7 @@ Add the following:
- Enable/Disable slot interactions
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 6628af7778..7647311dfd 100644
index 4ecf34a40..1dcc482c0 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -36,7 +36,7 @@ public class EntityArmorStand extends EntityLiving {
@ -20,7 +20,7 @@ index 6628af7778..7647311dfd 100644
private boolean bI;
public Vector3f headPose;
public Vector3f bodyPose;
@@ -364,6 +364,7 @@ public class EntityArmorStand extends EntityLiving {
@@ -361,6 +361,7 @@ public class EntityArmorStand extends EntityLiving {
return enumitemslot;
}
@ -29,7 +29,7 @@ index 6628af7778..7647311dfd 100644
return (this.bH & 1 << enumitemslot.c()) != 0 || enumitemslot.a() == EnumItemSlot.Function.HAND && !this.hasArms();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 124c3185bc..9f5c3b92e3 100644
index 124c3185b..9f5c3b92e 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -30,11 +30,13 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
@ -126,5 +126,5 @@ index 124c3185bc..9f5c3b92e3 100644
// Paper end
}
--
2.19.0
2.19.2

View File

@ -1,11 +1,11 @@
From b9694859d9ab9153646c1652af936a96459a786b Mon Sep 17 00:00:00 2001
From d4789c35af7e28c4260ea87432196d2efe728fd0 Mon Sep 17 00:00:00 2001
From: Mark Vainomaa <mikroskeem@mikroskeem.eu>
Date: Mon, 16 Jul 2018 00:05:05 +0300
Subject: [PATCH] Add TNTPrimeEvent
diff --git a/src/main/java/net/minecraft/server/BlockFire.java b/src/main/java/net/minecraft/server/BlockFire.java
index 24573b4704..ea428e2daf 100644
index 35a265fa2..3bacd8958 100644
--- a/src/main/java/net/minecraft/server/BlockFire.java
+++ b/src/main/java/net/minecraft/server/BlockFire.java
@@ -2,6 +2,7 @@ package net.minecraft.server;
@ -18,7 +18,7 @@ index 24573b4704..ea428e2daf 100644
import java.util.Map.Entry;
@@ -234,12 +235,19 @@ public class BlockFire extends Block {
world.setTypeAndData(blockposition, (IBlockData) this.a((IBlockAccess) world, blockposition).set(BlockFire.AGE, Integer.valueOf(l)), 3);
world.setTypeAndData(blockposition, (IBlockData) this.a((IBlockAccess) world, blockposition).set(BlockFire.AGE, l), 3);
} else {
- world.setAir(blockposition);
+ if(iblockdata.getBlock() != Blocks.TNT) world.setAir(blockposition); // Paper - TNTPrimeEvent - We might be cancelling it below, move the setAir down
@ -38,7 +38,7 @@ index 24573b4704..ea428e2daf 100644
}
}
diff --git a/src/main/java/net/minecraft/server/BlockTNT.java b/src/main/java/net/minecraft/server/BlockTNT.java
index 81c5b60ea1..5fddb29612 100644
index f97fccf56..c821e6b3b 100644
--- a/src/main/java/net/minecraft/server/BlockTNT.java
+++ b/src/main/java/net/minecraft/server/BlockTNT.java
@@ -1,6 +1,7 @@
@ -112,7 +112,7 @@ index 81c5b60ea1..5fddb29612 100644
world.setAir(blockposition);
}
diff --git a/src/main/java/net/minecraft/server/EntityEnderDragon.java b/src/main/java/net/minecraft/server/EntityEnderDragon.java
index 2c735a920d..74d96a2f09 100644
index 473773724..a49f1208b 100644
--- a/src/main/java/net/minecraft/server/EntityEnderDragon.java
+++ b/src/main/java/net/minecraft/server/EntityEnderDragon.java
@@ -9,6 +9,7 @@ import org.apache.logging.log4j.Logger;
@ -136,5 +136,5 @@ index 2c735a920d..74d96a2f09 100644
this.world.setAir(new BlockPosition(blockX, blockY, blockZ));
--
2.19.0
2.19.2

View File

@ -1,11 +1,11 @@
From 8267ebfcf1993dcff3c0e19bc3552724230d7873 Mon Sep 17 00:00:00 2001
From 211bc700ef0ca2bbca2364ab75810fd0cc0fad72 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 2 Aug 2018 08:44:35 -0500
Subject: [PATCH] Add hand to bucket events
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 5f4f107d5a..b2e50f8532 100644
index c9e9b45dc..6bb80975e 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -65,7 +65,7 @@ public class EntityCow extends EntityAnimal {
@ -18,7 +18,7 @@ index 5f4f107d5a..b2e50f8532 100644
if (event.isCancelled()) {
return false;
diff --git a/src/main/java/net/minecraft/server/ItemBucket.java b/src/main/java/net/minecraft/server/ItemBucket.java
index b63da71512..b0dd30dd12 100644
index 92c596e2c..edd35fe8a 100644
--- a/src/main/java/net/minecraft/server/ItemBucket.java
+++ b/src/main/java/net/minecraft/server/ItemBucket.java
@@ -35,7 +35,7 @@ public class ItemBucket extends Item {
@ -56,8 +56,8 @@ index b63da71512..b0dd30dd12 100644
boolean flag1 = material.isReplaceable();
if (!world.isEmpty(blockposition) && !flag && !flag1 && (!(iblockdata.getBlock() instanceof IFluidContainer) || !((IFluidContainer) iblockdata.getBlock()).canPlace(world, blockposition, iblockdata, this.fluidType))) {
- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack); // CraftBukkit
+ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.a().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand
- return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.getBlockPosition().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack); // CraftBukkit
+ return movingobjectposition == null ? false : this.a(entityhuman, world, movingobjectposition.getBlockPosition().shift(movingobjectposition.direction), (MovingObjectPosition) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit // Paper - add enumhand
} else {
// CraftBukkit start
if (entityhuman != null) {
@ -67,10 +67,10 @@ index b63da71512..b0dd30dd12 100644
((EntityPlayer) entityhuman).playerConnection.sendPacket(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
// TODO: inventory not updated
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index f5fa6b13e1..396a37f69b 100644
index 672c32858..cd6ae3b8e 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -228,6 +228,20 @@ public class CraftEventFactory {
@@ -229,6 +229,20 @@ public class CraftEventFactory {
}
private static PlayerEvent getPlayerBucketEvent(boolean isFilling, EntityHuman who, int clickedX, int clickedY, int clickedZ, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.server.Item item) {
@ -91,7 +91,7 @@ index f5fa6b13e1..396a37f69b 100644
Player player = (who == null) ? null : (Player) who.getBukkitEntity();
CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item);
Material bucket = CraftMagicNumbers.getMaterial(itemstack.getItem());
@@ -240,10 +254,10 @@ public class CraftEventFactory {
@@ -241,10 +255,10 @@ public class CraftEventFactory {
PlayerEvent event = null;
if (isFilling) {
@ -105,5 +105,5 @@ index f5fa6b13e1..396a37f69b 100644
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 40c679a084928c09e974747d29b572bab11290c7 Mon Sep 17 00:00:00 2001
From a9d4649439524406e470b98743fd7309c5f42b15 Mon Sep 17 00:00:00 2001
From: kashike <kashike@vq.lc>
Date: Wed, 15 Aug 2018 01:26:09 -0700
Subject: [PATCH] Allow disabling armour stand ticking
@ -20,7 +20,7 @@ index a2656abaf..95fc2d8ed 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 7647311df..8167fe5c9 100644
index 1dcc482c0..c5bddb1da 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -45,6 +45,11 @@ public class EntityArmorStand extends EntityLiving {
@ -43,7 +43,7 @@ index 7647311df..8167fe5c9 100644
this.setSize(0.5F, 1.975F);
this.Q = 0.0F;
}
@@ -131,6 +137,7 @@ public class EntityArmorStand extends EntityLiving {
@@ -128,6 +134,7 @@ public class EntityArmorStand extends EntityLiving {
this.bF.set(enumitemslot.b(), itemstack);
}
@ -51,7 +51,7 @@ index 7647311df..8167fe5c9 100644
}
public boolean c(int i, ItemStack itemstack) {
@@ -202,6 +209,7 @@ public class EntityArmorStand extends EntityLiving {
@@ -199,6 +206,7 @@ public class EntityArmorStand extends EntityLiving {
}
nbttagcompound.set("Pose", this.z());
@ -59,7 +59,7 @@ index 7647311df..8167fe5c9 100644
}
public void a(NBTTagCompound nbttagcompound) {
@@ -233,6 +241,11 @@ public class EntityArmorStand extends EntityLiving {
@@ -230,6 +238,11 @@ public class EntityArmorStand extends EntityLiving {
this.setMarker(nbttagcompound.getBoolean("Marker"));
this.bI = !this.isMarker();
this.noclip = this.isNoGravity();
@ -71,7 +71,7 @@ index 7647311df..8167fe5c9 100644
NBTTagCompound nbttagcompound1 = nbttagcompound.getCompound("Pose");
this.g(nbttagcompound1);
@@ -556,7 +569,30 @@ public class EntityArmorStand extends EntityLiving {
@@ -553,7 +566,30 @@ public class EntityArmorStand extends EntityLiving {
}
public void tick() {
@ -102,7 +102,7 @@ index 7647311df..8167fe5c9 100644
Vector3f vector3f = (Vector3f) this.datawatcher.get(EntityArmorStand.b);
if (!this.headPose.equals(vector3f)) {
@@ -685,31 +721,37 @@ public class EntityArmorStand extends EntityLiving {
@@ -682,31 +718,37 @@ public class EntityArmorStand extends EntityLiving {
public void setHeadPose(Vector3f vector3f) {
this.headPose = vector3f;
this.datawatcher.set(EntityArmorStand.b, vector3f);
@ -141,10 +141,10 @@ index 7647311df..8167fe5c9 100644
public Vector3f r() {
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index a8103ff68..21d32178c 100644
index 3e9af4481..1dcb9a7e9 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2082,55 +2082,7 @@ public abstract class EntityLiving extends Entity {
@@ -2082,52 +2082,7 @@ public abstract class EntityLiving extends Entity {
}
}
@ -159,11 +159,9 @@ index a8103ff68..21d32178c 100644
- case HAND:
- itemstack = (ItemStack) this.bB.get(enumitemslot.b());
- break;
-
- case ARMOR:
- itemstack = (ItemStack) this.bC.get(enumitemslot.b());
- break;
-
- default:
- continue;
- }
@ -191,7 +189,6 @@ index a8103ff68..21d32178c 100644
- case HAND:
- this.bB.set(enumitemslot.b(), itemstack1.isEmpty() ? ItemStack.a : itemstack1.cloneItemStack());
- break;
-
- case ARMOR:
- this.bC.set(enumitemslot.b(), itemstack1.isEmpty() ? ItemStack.a : itemstack1.cloneItemStack());
- }
@ -201,24 +198,26 @@ index a8103ff68..21d32178c 100644
if (this.ticksLived % 20 == 0) {
this.getCombatTracker().g();
@@ -2223,6 +2175,56 @@ public abstract class EntityLiving extends Entity {
@@ -2220,6 +2175,57 @@ public abstract class EntityLiving extends Entity {
}
}
+ // Paper start - split into own method from above
+ public void updateEntityEquipment() {
+ for (EnumItemSlot enumitemslot : EnumItemSlot.values()) {
+ EnumItemSlot[] aenumitemslot = EnumItemSlot.values();
+ int j = aenumitemslot.length;
+
+ for (int k = 0; k < j; ++k) {
+ EnumItemSlot enumitemslot = aenumitemslot[k];
+ ItemStack itemstack;
+
+ switch (enumitemslot.a()) {
+ case HAND:
+ itemstack = (ItemStack) this.bB.get(enumitemslot.b());
+ break;
+
+ case ARMOR:
+ itemstack = (ItemStack) this.bC.get(enumitemslot.b());
+ break;
+
+ default:
+ continue;
+ }
@ -246,7 +245,6 @@ index a8103ff68..21d32178c 100644
+ case HAND:
+ this.bB.set(enumitemslot.b(), itemstack1.isEmpty() ? ItemStack.a : itemstack1.cloneItemStack());
+ break;
+
+ case ARMOR:
+ this.bC.set(enumitemslot.b(), itemstack1.isEmpty() ? ItemStack.a : itemstack1.cloneItemStack());
+ }
@ -279,5 +277,5 @@ index 9f5c3b92e..07ce93f17 100644
// Paper end
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 3d06b85ae5fd05a8885801d0a8d94dd2c907b4ef Mon Sep 17 00:00:00 2001
From 71d15635773d8a7f7a77483164cd4812f860dee1 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 08:18:42 -0500
Subject: [PATCH] Slime Pathfinder Events
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
index e913accd..54c5f746 100644
index f92bf02b8..81966542e 100644
--- a/src/main/java/net/minecraft/server/EntitySlime.java
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
@@ -1,6 +1,14 @@
@ -21,9 +21,9 @@ index e913accd..54c5f746 100644
+import org.bukkit.entity.Slime;
+// Paper end
// CraftBukkit start
import org.bukkit.craftbukkit.event.CraftEventFactory;
import org.bukkit.event.entity.EntityTransformEvent;
@@ -59,6 +67,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
import java.util.ArrayList;
import java.util.List;
@@ -61,6 +69,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
super.b(nbttagcompound);
nbttagcompound.setInt("Size", this.getSize() - 1);
nbttagcompound.setBoolean("wasOnGround", this.bD);
@ -31,7 +31,7 @@ index e913accd..54c5f746 100644
}
public void a(NBTTagCompound nbttagcompound) {
@@ -71,6 +80,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -73,6 +82,11 @@ public class EntitySlime extends EntityInsentient implements IMonster {
this.setSize(i + 1, false);
this.bD = nbttagcompound.getBoolean("wasOnGround");
@ -43,7 +43,7 @@ index e913accd..54c5f746 100644
}
public boolean dy() {
@@ -316,7 +330,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -323,7 +337,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
public boolean a() {
@ -52,7 +52,7 @@ index e913accd..54c5f746 100644
}
public void e() {
@@ -335,7 +349,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -342,7 +356,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
public boolean a() {
@ -61,7 +61,7 @@ index e913accd..54c5f746 100644
}
public void e() {
@@ -359,13 +373,17 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -366,13 +380,17 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
public boolean a() {
@ -81,7 +81,7 @@ index e913accd..54c5f746 100644
}
((EntitySlime.ControllerMoveSlime) this.a.getControllerMove()).a(this.b, false);
@@ -385,7 +403,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -392,7 +410,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
public boolean a() {
EntityLiving entityliving = this.a.getGoalTarget();
@ -98,7 +98,7 @@ index e913accd..54c5f746 100644
}
public void c() {
@@ -396,13 +422,28 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -403,13 +429,28 @@ public class EntitySlime extends EntityInsentient implements IMonster {
public boolean b() {
EntityLiving entityliving = this.a.getGoalTarget();
@ -128,7 +128,7 @@ index e913accd..54c5f746 100644
}
static class ControllerMoveSlime extends ControllerMove {
@@ -460,4 +501,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
@@ -467,4 +508,15 @@ public class EntitySlime extends EntityInsentient implements IMonster {
}
}
}
@ -145,7 +145,7 @@ index e913accd..54c5f746 100644
+ // Paper end
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
index 18e7ef80..8403c1e0 100644
index 18e7ef80a..8403c1e01 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -33,4 +33,14 @@ public class CraftSlime extends CraftMob implements Slime {
@ -164,5 +164,5 @@ index 18e7ef80..8403c1e0 100644
+ // Paper end
}
--
2.17.1
2.19.2

View File

@ -1,11 +1,11 @@
From a57330ca2e6771b9d6b370650a108efb8de75c35 Mon Sep 17 00:00:00 2001
From 900acad38a9935f66e793d3bc95f209d873a59d5 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Fri, 24 Aug 2018 11:50:26 -0500
Subject: [PATCH] Add More Creeper API
diff --git a/src/main/java/net/minecraft/server/EntityCreeper.java b/src/main/java/net/minecraft/server/EntityCreeper.java
index 19022b6e2..72b4735d4 100644
index 569248abb..b1752d66f 100644
--- a/src/main/java/net/minecraft/server/EntityCreeper.java
+++ b/src/main/java/net/minecraft/server/EntityCreeper.java
@@ -14,7 +14,7 @@ public class EntityCreeper extends EntityMonster {
@ -26,7 +26,7 @@ index 19022b6e2..72b4735d4 100644
if (!this.world.isClientSide) {
boolean flag = this.world.getGameRules().getBoolean("mobGriefing");
@@ -241,8 +242,19 @@ public class EntityCreeper extends EntityMonster {
return ((Boolean) this.datawatcher.get(EntityCreeper.c)).booleanValue();
return (Boolean) this.datawatcher.get(EntityCreeper.c);
}
+ // Paper start
@ -40,7 +40,7 @@ index 19022b6e2..72b4735d4 100644
+ }
+
public void dB() {
- this.datawatcher.set(EntityCreeper.c, Boolean.valueOf(true));
- this.datawatcher.set(EntityCreeper.c, true);
+ setIgnited(true);
+ // Paper end
}
@ -74,5 +74,5 @@ index ffebb54ca..ab2b20a0d 100644
+ // Paper end
}
--
2.19.0
2.19.2

View File

@ -1,4 +1,4 @@
From 386e732ca9bc7404fd11a5f37af2e001ba869e6d Mon Sep 17 00:00:00 2001
From 084c88af6e4ed0452afb265baac3a816bb78f5ea Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Wed, 29 Aug 2018 21:59:22 -0400
Subject: [PATCH] Optimize getChunkIfLoaded type calls
@ -10,10 +10,10 @@ Will improve inlining across many hot methods.
Improve getBrightness to not do double chunk map lookups.
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index 501b91138..e64cb8051 100644
index 3854464e8..dcc6e9762 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -378,7 +378,7 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -380,7 +380,7 @@ public class ChunkProviderServer implements IChunkProvider {
continue;
}
@ -23,7 +23,7 @@ index 501b91138..e64cb8051 100644
neighbor.setNeighborUnloaded(-x, -z);
chunk.setNeighborUnloaded(x, z);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index d239fc6d3..a5c655155 100644
index de591d912..5fe4734e3 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -166,7 +166,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -55,7 +55,7 @@ index d239fc6d3..a5c655155 100644
return chunk != null && !chunk.isEmpty();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 098280e6d..2f034a9fa 100644
index d5936eb19..4b8b66352 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -217,7 +217,7 @@ public class CraftWorld implements World {
@ -77,5 +77,5 @@ index 098280e6d..2f034a9fa 100644
return true;
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 46984ce90bf3c3a444595575bfc6ca250977c1cc Mon Sep 17 00:00:00 2001
From 1d1819863a8c32551ce0cda7eb22264e3581eaab Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Mon, 3 Sep 2018 18:20:03 -0500
Subject: [PATCH] Add ray tracing methods to LivingEntity
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 21d32178c..2aedfa808 100644
index 1dcb9a7e9..5ea5d4b78 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2815,6 +2815,22 @@ public abstract class EntityLiving extends Entity {
@@ -2816,6 +2816,22 @@ public abstract class EntityLiving extends Entity {
}
// Paper start
@ -31,18 +31,6 @@ index 21d32178c..2aedfa808 100644
public int shieldBlockingDelay = world.paperConfig.shieldBlockingDelay;
public int getShieldBlockingDelay() {
diff --git a/src/main/java/net/minecraft/server/MovingObjectPosition.java b/src/main/java/net/minecraft/server/MovingObjectPosition.java
index 6d5dbe89a..a31f9f607 100644
--- a/src/main/java/net/minecraft/server/MovingObjectPosition.java
+++ b/src/main/java/net/minecraft/server/MovingObjectPosition.java
@@ -28,6 +28,7 @@ public class MovingObjectPosition {
this.pos = vec3d;
}
+ public BlockPosition getBlockPosition() { return a(); } // Paper - OBFHELPER
public BlockPosition a() {
return this.e;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 52834b6da..eeab59379 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@ -72,5 +60,5 @@ index 52834b6da..eeab59379 100644
return getLineOfSight(transparent, maxDistance, 2);
}
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 9035d279e96983979992cf4965fefa63b11e48a6 Mon Sep 17 00:00:00 2001
From 7837b5e97bc04b84c20101a88dd8e38c6a4a6b7b Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Tue, 4 Sep 2018 15:02:00 -0500
Subject: [PATCH] Expose attack cooldown methods for Player
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
index d510ef63d1..2870015585 100644
index 20a46e2af..6aa3a462f 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -2059,14 +2059,17 @@ public abstract class EntityHuman extends EntityLiving {
@@ -2056,14 +2056,17 @@ public abstract class EntityHuman extends EntityLiving {
this.datawatcher.set(EntityHuman.bA, nbttagcompound);
}
@ -27,7 +27,7 @@ index d510ef63d1..2870015585 100644
this.aH = 0;
}
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 0a0ea301d9..8be0a47bae 100644
index 0a0ea301d..8be0a47ba 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -1917,6 +1917,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
@ -52,5 +52,5 @@ index 0a0ea301d9..8be0a47bae 100644
private final Player.Spigot spigot = new Player.Spigot()
{
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 24e9f7d5343918cfe10bf2f9546045d768c32695 Mon Sep 17 00:00:00 2001
From 7ca1e391b1eb3a7a712bc0c6b9a52dc05855b11c 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
@ -27,7 +27,7 @@ index 9a74601b0..6e60d15cc 100644
int i = this.f ? 300 : 100;
if (this.g && (!this.b.isAlive() || this.b.ticksLived - this.c > i)) {
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 665c85ca4..8abd71dfc 100644
index da0e9b0a3..ab8490ff9 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1539,6 +1539,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -46,7 +46,7 @@ index 665c85ca4..8abd71dfc 100644
public void b(EntityLiving entityliving) {}
protected boolean i(double d0, double d1, double d2) {
@@ -3078,6 +3080,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -3073,6 +3075,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return EnumPistonReaction.NORMAL;
}
@ -55,10 +55,10 @@ index 665c85ca4..8abd71dfc 100644
return SoundCategory.NEUTRAL;
}
diff --git a/src/main/java/net/minecraft/server/EntityArmorStand.java b/src/main/java/net/minecraft/server/EntityArmorStand.java
index 8167fe5c9..36e2c2e15 100644
index c5bddb1da..0a9666541 100644
--- a/src/main/java/net/minecraft/server/EntityArmorStand.java
+++ b/src/main/java/net/minecraft/server/EntityArmorStand.java
@@ -662,7 +662,8 @@ public class EntityArmorStand extends EntityLiving {
@@ -659,7 +659,8 @@ public class EntityArmorStand extends EntityLiving {
}
public void killEntity() {
@ -69,7 +69,7 @@ index 8167fe5c9..36e2c2e15 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 2aedfa808..83d648fff 100644
index 5ea5d4b78..46a4e37a2 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -76,14 +76,14 @@ public abstract class EntityLiving extends Entity {
@ -207,7 +207,7 @@ index 2aedfa808..83d648fff 100644
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 9dcf29609..720eb9184 100644
index 6933d8876..d429e552e 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 {
@ -306,10 +306,10 @@ index 8be0a47ba..f56ef6f71 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 e592dfb44..c70890cc5 100644
index cd6ae3b8e..4a0a456a0 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -495,9 +495,16 @@ public class CraftEventFactory {
@@ -508,9 +508,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());
@ -326,7 +326,7 @@ index e592dfb44..c70890cc5 100644
victim.expToDrop = event.getDroppedExp();
for (org.bukkit.inventory.ItemStack stack : event.getDrops()) {
@@ -513,8 +520,15 @@ public class CraftEventFactory {
@@ -526,8 +533,15 @@ public class CraftEventFactory {
CraftPlayer entity = victim.getBukkitEntity();
PlayerDeathEvent event = new PlayerDeathEvent(entity, drops, victim.getExpReward(), 0, deathMessage);
event.setKeepInventory(keepInventory);
@ -342,7 +342,7 @@ index e592dfb44..c70890cc5 100644
victim.keepLevel = event.getKeepLevel();
victim.newLevel = event.getNewLevel();
@@ -535,6 +549,31 @@ public class CraftEventFactory {
@@ -548,6 +562,31 @@ public class CraftEventFactory {
return event;
}
@ -375,5 +375,5 @@ index e592dfb44..c70890cc5 100644
* Server methods
*/
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 18a6abee2190904692bcb23a2adbaaed0b14e3bc Mon Sep 17 00:00:00 2001
From ab6ded29658de4a666f701be4a17dc2c70571b88 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 b7006b2cb..05e407f76 100644
index 8a6f79908..c1ed05d9e 100644
--- a/src/main/java/net/minecraft/server/FluidTypeFlowing.java
+++ b/src/main/java/net/minecraft/server/FluidTypeFlowing.java
@@ -186,7 +186,8 @@ public abstract class FluidTypeFlowing extends FluidType {
@ -16,7 +16,7 @@ index b7006b2cb..05e407f76 100644
+ IBlockData iblockdata1 = generatoraccess.getTypeIfLoaded(blockposition1); // Paper
+ if (iblockdata1 == null) continue; // Paper
if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.b(blockposition1), fluid1.c())) {
if (this.a(generatoraccess, blockposition, iblockdata, enumdirection, blockposition1, iblockdata1, generatoraccess.getFluid(blockposition1), fluid1.c())) {
// CraftBukkit start
@@ -213,7 +214,8 @@ public abstract class FluidTypeFlowing extends FluidType {
while (iterator.hasNext()) {
@ -75,5 +75,5 @@ index b7006b2cb..05e407f76 100644
IBlockData iblockdata1 = (IBlockData) pair.getFirst();
Fluid fluid = (Fluid) pair.getSecond();
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 75fc670b2570b9f692502fea5a0018884b5e823f Mon Sep 17 00:00:00 2001
From f47a1b4de8a002e464b4f45c7c35eea9e80aa010 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
@ -100,10 +100,10 @@ index 35c436d19..fcfb17e4e 100644
public CompletableFuture<Suggestions> a(SuggestionsBuilder suggestionsbuilder) {
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index dacca4bc4..0b040527f 100644
index 197563552..d34b017f9 100644
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -78,6 +78,12 @@ import javax.annotation.Nullable;
@@ -81,6 +81,12 @@ import javax.annotation.Nullable;
import static org.spigotmc.ValidateUtils.*;
// Spigot end
@ -116,10 +116,10 @@ index dacca4bc4..0b040527f 100644
/**
* Children must include the following:
*
@@ -252,6 +258,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
static final ItemMetaKey UNBREAKABLE = new ItemMetaKey("Unbreakable");
@@ -256,6 +262,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@Specific(Specific.To.NBT)
static final ItemMetaKey DAMAGE = new ItemMetaKey("Damage");
static final ItemMetaKey BUKKIT_CUSTOM_TAG = new ItemMetaKey("PublicBukkitValues");
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values
+ static final ItemMetaKey CAN_DESTROY = new ItemMetaKey("CanDestroy");
+ static final ItemMetaKey CAN_PLACE_ON = new ItemMetaKey("CanPlaceOn");
@ -127,7 +127,7 @@ index dacca4bc4..0b040527f 100644
private IChatBaseComponent displayName;
private IChatBaseComponent locName;
@@ -262,6 +272,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -266,6 +276,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private int hideFlag;
private boolean unbreakable;
private int damage;
@ -137,8 +137,8 @@ index dacca4bc4..0b040527f 100644
+ // Paper end
private static final Set<String> HANDLED_TAGS = Sets.newHashSet();
@@ -292,6 +306,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
private static final CraftCustomTagTypeRegistry TAG_TYPE_REGISTRY = new CraftCustomTagTypeRegistry();
@@ -298,6 +312,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
this.hideFlag = meta.hideFlag;
this.unbreakable = meta.unbreakable;
this.damage = meta.damage;
@ -152,11 +152,11 @@ index dacca4bc4..0b040527f 100644
+ }
+ // Paper end
this.unhandledTags.putAll(meta.unhandledTags);
this.publicItemTagContainer.putAll(meta.publicItemTagContainer.getRaw());
this.internalTag = meta.internalTag;
@@ -347,6 +370,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
if (tag.hasKey(DAMAGE.NBT)) {
damage = tag.getInt(DAMAGE.NBT);
@@ -361,6 +384,33 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
publicItemTagContainer.put(key, compound.get(key));
}
}
+ // Paper start - Implement an API for CanPlaceOn and CanDestroy NBT values
+ if (tag.hasKey(CAN_DESTROY.NBT)) {
@ -188,7 +188,7 @@ index dacca4bc4..0b040527f 100644
Set<String> keys = tag.getKeys();
for (String key : keys) {
@@ -468,6 +518,36 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -482,6 +532,36 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
setDamage(damage);
}
@ -225,7 +225,7 @@ index dacca4bc4..0b040527f 100644
String internal = SerializableMeta.getString(map, "internal", true);
if (internal != null) {
ByteArrayInputStream buf = new ByteArrayInputStream(Base64.decodeBase64(internal));
@@ -579,6 +659,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -598,6 +678,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
if (hasDamage()) {
itemTag.setInt(DAMAGE.NBT, damage);
}
@ -249,18 +249,18 @@ index dacca4bc4..0b040527f 100644
for (Map.Entry<String, NBTBase> e : unhandledTags.entrySet()) {
itemTag.set(e.getKey(), e.getValue());
@@ -667,7 +764,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -696,7 +793,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@Overridden
boolean isEmpty() {
- return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers());
+ return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers()
- return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || !publicItemTagContainer.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers());
+ return !(hasDisplayName() || hasLocalizedName() || hasEnchants() || hasLore() || hasRepairCost() || !unhandledTags.isEmpty() || !publicItemTagContainer.isEmpty() || hideFlag != 0 || isUnbreakable() || hasDamage() || hasAttributeModifiers()
+ || hasPlaceableKeys() || hasDestroyableKeys()); // Paper - Implement an API for CanPlaceOn and CanDestroy NBT values
}
public String getDisplayName() {
@@ -1003,7 +1101,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
&& (this.unhandledTags.equals(that.unhandledTags))
@@ -1038,7 +1136,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
&& (this.publicItemTagContainer.equals(that.publicItemTagContainer))
&& (this.hideFlag == that.hideFlag)
&& (this.isUnbreakable() == that.isUnbreakable())
- && (this.hasDamage() ? that.hasDamage() && this.damage == that.damage : !that.hasDamage());
@ -272,7 +272,7 @@ index dacca4bc4..0b040527f 100644
}
/**
@@ -1034,6 +1136,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1070,6 +1172,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
hash = 61 * hash + (isUnbreakable() ? 1231 : 1237);
hash = 61 * hash + (hasDamage() ? this.damage : 0);
hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
@ -283,7 +283,7 @@ index dacca4bc4..0b040527f 100644
return hash;
}
@@ -1054,6 +1160,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1090,6 +1196,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
clone.hideFlag = this.hideFlag;
clone.unbreakable = this.unbreakable;
clone.damage = this.damage;
@ -299,7 +299,7 @@ index dacca4bc4..0b040527f 100644
return clone;
} catch (CloneNotSupportedException e) {
throw new Error(e);
@@ -1103,6 +1218,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1139,6 +1254,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
builder.put(DAMAGE.BUKKIT, damage);
}
@ -324,7 +324,7 @@ index dacca4bc4..0b040527f 100644
final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>(unhandledTags);
serializeInternal(internalTags);
if (!internalTags.isEmpty()) {
@@ -1247,7 +1380,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1288,7 +1421,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
CraftMetaArmorStand.NO_BASE_PLATE.NBT,
CraftMetaArmorStand.SHOW_ARMS.NBT,
CraftMetaArmorStand.SMALL.NBT,
@ -335,7 +335,7 @@ index dacca4bc4..0b040527f 100644
// Paper end
));
}
@@ -1294,4 +1429,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
@@ -1335,4 +1470,147 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable {
return spigot;
}
// Spigot end
@ -484,5 +484,5 @@ index dacca4bc4..0b040527f 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,35 +1,23 @@
From 4a83ac5a4ae5fd765288ba4bb3a77b949af484d5 Mon Sep 17 00:00:00 2001
From e9e56c914dfbf0e0247dd46619c712e006ff7255 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/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 4e8eb137a..479a84a25 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -481,6 +481,7 @@ public class Chunk implements IChunkAccess {
}
}
+ public Fluid getFluid(BlockPosition blockposition) { return b(blockposition); } // Paper - OBFHELPER
public Fluid b(BlockPosition blockposition) {
return this.b(blockposition.getX(), blockposition.getY(), blockposition.getZ());
}
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java b/src/main/java/net/minecraft/server/PathfinderGoalRemoveBlock.java
index 9c72848f1..d007d0387 100644
index 2b15aa6c9..3ca32123b 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 {
private final Block f;
private final EntityInsentient g;
private final EntityInsentient entity;
private int h;
+ private World world; // Paper
public PathfinderGoalRemoveBlock(Block block, EntityCreature entitycreature, double d0, int i) {
super(entitycreature, d0, 24, i);
this.f = block;
this.g = entitycreature;
this.entity = entitycreature;
+ this.world = entitycreature.world; // Paper
}
@ -65,7 +53,7 @@ index 9c72848f1..d007d0387 100644
return block == this.f && iworldreader.getType(blockposition.up()).isAir() && iworldreader.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 800e0046a..bfa6c2eef 100644
index f252ef243..bfa6c2eef 100644
--- a/src/main/java/net/minecraft/server/RandomPositionGenerator.java
+++ b/src/main/java/net/minecraft/server/RandomPositionGenerator.java
@@ -78,6 +78,7 @@ public class RandomPositionGenerator {
@ -80,34 +68,33 @@ index 800e0046a..bfa6c2eef 100644
}
private static boolean b(BlockPosition blockposition, EntityCreature entitycreature) {
- return entitycreature.world.b(blockposition).a(TagsFluid.WATER);
- return entitycreature.world.getFluid(blockposition).a(TagsFluid.WATER);
+ Fluid fluid = entitycreature.world.getFluidIfLoaded(blockposition); // Paper
+ return fluid != null && fluid.a(TagsFluid.WATER); // Paper
}
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index a5c655155..016d50d3c 100644
index 5fe4734e3..eabf50e24 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -763,6 +763,18 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -762,7 +762,17 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
return chunk.getType(blockposition);
}
}
+ // Paper start
+ public Fluid getFluidIfLoaded(BlockPosition blockposition) {
+ if (blockposition.isInvalidYLocation()) { // Paper
+ return getFluid(blockposition);
+ } else {
+ Chunk chunk = this.getChunkIfLoaded(blockposition);
+
+ return chunk != null ? chunk.getFluid(blockposition) : null;
+ }
+ }
+ // Paper end
+ public Fluid getFluid(BlockPosition blockposition) { return b(blockposition); } // Paper - OBFHELPER
public Fluid b(BlockPosition blockposition) {
public Fluid getFluid(BlockPosition blockposition) {
if (blockposition.isInvalidYLocation()) { // Paper
return FluidTypes.a.i();
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 4c107ffe59e673bfbcf13d0da689080d0f9c5a23 Mon Sep 17 00:00:00 2001
From 9c4cf40d3f69a1a4b86e27690df94c8330c0db17 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sun, 16 Sep 2018 00:00:16 -0400
Subject: [PATCH] Optimize and Fix ExpiringMap Issues
@ -34,7 +34,7 @@ index c8c1444e8..6723343b8 100644
}
diff --git a/src/main/java/net/minecraft/server/ExpiringMap.java b/src/main/java/net/minecraft/server/ExpiringMap.java
index ee97c2b6f..795e73542 100644
index ae5a2077e..795e73542 100644
--- a/src/main/java/net/minecraft/server/ExpiringMap.java
+++ b/src/main/java/net/minecraft/server/ExpiringMap.java
@@ -2,94 +2,200 @@ package net.minecraft.server;
@ -239,10 +239,9 @@ index ee97c2b6f..795e73542 100644
}
- public T put(Long olong, T t0) {
- this.a(olong.longValue());
- return super.put(olong, t0);
+ public T put(Long olong, T object) {
+ this.a(olong);
this.a(olong);
- return super.put(olong, t0);
+ return (T)super.put(olong, object);
}
@ -288,7 +287,7 @@ index ee97c2b6f..795e73542 100644
- // CraftBukkit end
}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d83e85dbf..2105fa50b 100644
index 49a06f395..9b2703fd2 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -155,6 +155,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -330,5 +329,5 @@ index 9c2adb235..04e29f58c 100644
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 4b39bd549cd60df7ff3af7a69bc71a27ecc5061e Mon Sep 17 00:00:00 2001
From ee657098cd8e89b0772d0668bc603682ae1b2ce4 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
@ -26,7 +26,7 @@ index 729859d13..2a1dffbf4 100644
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 8abd71dfc..13c0c7ee8 100644
index ab8490ff9..522af3d53 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1734,7 +1734,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -76,7 +76,7 @@ index b4fae0d30..364a9fa7a 100644
if (this.hasWorld()) {
diff --git a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
index 480faa66e..f3ddb86d0 100644
index 22dcdc126..1467b540f 100644
--- a/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
+++ b/src/main/java/net/minecraft/server/TileEntityBrewingStand.java
@@ -236,7 +236,7 @@ public class TileEntityBrewingStand extends TileEntityContainer implements IWorl
@ -115,7 +115,7 @@ index ddd2e0eb0..21bd156e9 100644
}
diff --git a/src/main/java/net/minecraft/server/TileEntityFurnace.java b/src/main/java/net/minecraft/server/TileEntityFurnace.java
index 0ba13b790..978b9c046 100644
index 324a8431c..49e7fd064 100644
--- a/src/main/java/net/minecraft/server/TileEntityFurnace.java
+++ b/src/main/java/net/minecraft/server/TileEntityFurnace.java
@@ -218,7 +218,7 @@ public class TileEntityFurnace extends TileEntityContainer implements IWorldInve
@ -128,7 +128,7 @@ index 0ba13b790..978b9c046 100644
// Paper start - cook speed API
diff --git a/src/main/java/net/minecraft/server/TileEntityHopper.java b/src/main/java/net/minecraft/server/TileEntityHopper.java
index 10e18bf34..46069bf80 100644
index cdc576058..2dae75f45 100644
--- a/src/main/java/net/minecraft/server/TileEntityHopper.java
+++ b/src/main/java/net/minecraft/server/TileEntityHopper.java
@@ -61,7 +61,7 @@ public class TileEntityHopper extends TileEntityLootable implements IHopper, ITi
@ -141,10 +141,10 @@ index 10e18bf34..46069bf80 100644
this.f = nbttagcompound.getInt("TransferCooldown");
diff --git a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
index aa750ab91..36394aa78 100644
index d4f379db9..59a0f4b2c 100644
--- a/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
+++ b/src/main/java/net/minecraft/server/TileEntityShulkerBox.java
@@ -254,7 +254,7 @@ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldIn
@@ -249,7 +249,7 @@ public class TileEntityShulkerBox extends TileEntityLootable implements IWorldIn
}
if (nbttagcompound.hasKeyOfType("CustomName", 8)) {
@ -154,5 +154,5 @@ index aa750ab91..36394aa78 100644
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 088f091d710c0163ea15f1dd11c9c53ca6ccb6a3 Mon Sep 17 00:00:00 2001
From 8c80051f8c22caf7bcd9d9e5b7ccbbeaaa654ef6 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 21 Jul 2018 16:55:04 -0400
Subject: [PATCH] Async Chunk Loading and Generation
@ -458,7 +458,7 @@ index 000000000..8f18c2869
+
+}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 479a84a25..340b756bb 100644
index a08e7ff2e..d86e12042 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -184,6 +184,7 @@ public class Chunk implements IChunkAccess {
@ -470,7 +470,7 @@ index 479a84a25..340b756bb 100644
Iterator iterator = protochunk.s().iterator();
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
index 39ac032b0..1662e4eba 100644
index e14ae2b42..1662e4eba 100644
--- a/src/main/java/net/minecraft/server/ChunkMap.java
+++ b/src/main/java/net/minecraft/server/ChunkMap.java
@@ -14,9 +14,17 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
@ -508,7 +508,7 @@ index 39ac032b0..1662e4eba 100644
}
public Chunk a(Long olong, Chunk chunk) {
- return this.a(olong.longValue(), chunk);
- return this.a(olong, chunk);
+ return MCUtil.ensureMain("Chunk Put", () -> this.a(olong.longValue(), chunk)); // Paper
}
@ -556,7 +556,7 @@ index 39ac032b0..1662e4eba 100644
// Paper end
public Chunk a(Object object) {
- return this.a(((Long) object).longValue());
- return this.a((Long) object);
+ return MCUtil.ensureMain("Chunk Remove", () -> this.a(((Long) object).longValue())); // Paper
}
@ -576,7 +576,7 @@ index 39ac032b0..1662e4eba 100644
public Chunk remove(Object object) {
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
index e64cb8051..7a1f84886 100644
index dcc6e9762..87a1bddd0 100644
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
@@ -35,12 +35,12 @@ public class ChunkProviderServer implements IChunkProvider {
@ -709,7 +709,7 @@ index e64cb8051..7a1f84886 100644
private ReportedException a(int i, int j, Throwable throwable) {
CrashReport crashreport = CrashReport.a(throwable, "Exception generating new chunk");
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Chunk to be generated");
@@ -287,11 +357,13 @@ public class ChunkProviderServer implements IChunkProvider {
@@ -289,11 +359,13 @@ public class ChunkProviderServer implements IChunkProvider {
}
public void close() {
@ -718,7 +718,7 @@ index e64cb8051..7a1f84886 100644
+ /*try {
this.batchScheduler.a();
} catch (InterruptedException interruptedexception) {
ChunkProviderServer.a.error("Couldn\'t stop taskManager", interruptedexception);
ChunkProviderServer.a.error("Couldn't stop taskManager", interruptedexception);
- }
+ }*/
+ // Paper end
@ -726,7 +726,7 @@ index e64cb8051..7a1f84886 100644
}
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
index 9b4bc3ff6..4c22f6d75 100644
index 26a3f28cb..5ce57a6d4 100644
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
@@ -120,7 +120,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
@ -775,7 +775,7 @@ index bdfc7d81f..a5c4564d6 100644
public IBlockData getType(int i, int j, int k) {
return this.blockIds.a(i, j, k);
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
index 34019bd1b..fc9091c80 100644
index ad7e4a036..f10f235ed 100644
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
@@ -20,13 +20,14 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
@ -944,7 +944,7 @@ index 271dc41d4..bd15534c2 100644
private final MinecraftServer d;
private final java.nio.file.Path e;
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 13c0c7ee8..552be8cd8 100644
index 522af3d53..ee878191a 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -209,7 +209,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -982,7 +982,7 @@ index 49fba0979..9ad646f8d 100644
fx = fx % 360.0F;
if (fx >= 180.0F) {
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 292547be3..5049595ab 100644
index c73a61d94..17ae26cb8 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -503,6 +503,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
@ -1732,7 +1732,7 @@ index 000000000..e9a38f9d9
+
+}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 2c7c8adf7..62c524ef3 100644
index 068d203c8..cbff0d946 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -29,16 +29,59 @@ public class PlayerChunk {
@ -1834,7 +1834,7 @@ index 2c7c8adf7..62c524ef3 100644
}
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
index 95baa1dc8..9f6028586 100644
index 39e5b2484..a92557fd2 100644
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
@@ -27,10 +27,10 @@ public class PlayerChunkMap {
@ -1894,7 +1894,7 @@ index 95baa1dc8..9f6028586 100644
private void e() {
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
index 9c34319b6..7149b1472 100644
index 38f3afb48..ddd7b91a9 100644
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
@@ -35,7 +35,7 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
@ -1962,7 +1962,7 @@ index d868149d1..0d45d933e 100644
}
}
diff --git a/src/main/java/net/minecraft/server/StructurePiece.java b/src/main/java/net/minecraft/server/StructurePiece.java
index a5cf017da..def8730b8 100644
index d444eb30f..d8c96b5c3 100644
--- a/src/main/java/net/minecraft/server/StructurePiece.java
+++ b/src/main/java/net/minecraft/server/StructurePiece.java
@@ -14,7 +14,7 @@ public abstract class StructurePiece {
@ -2038,7 +2038,7 @@ index 1926c902a..1117e4ae2 100644
}
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 016d50d3c..f1495d30c 100644
index eabf50e24..f8afa6f72 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -46,7 +46,7 @@ import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
@ -2122,7 +2122,7 @@ index 016d50d3c..f1495d30c 100644
// CraftBukkit end
if (blockposition.isInvalidYLocation()) { // Paper
return Blocks.VOID_AIR.getBlockData();
@@ -1023,6 +1066,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1021,6 +1064,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
public boolean addEntity(Entity entity, SpawnReason spawnReason) { // Changed signature, added SpawnReason
@ -2282,7 +2282,7 @@ index fa99fe014..4f49786aa 100644
}
}
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 6e54b71e8..a54ea5a69 100644
index bab0c0e0f..af68074c1 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -731,7 +731,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -2295,7 +2295,7 @@ index 6e54b71e8..a54ea5a69 100644
}
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index c56511abc..648ac4d18 100644
index 2a9ff6d59..5945e1a6d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1017,8 +1017,12 @@ public final class CraftServer implements Server {
@ -2361,10 +2361,10 @@ index 7e6a7b0e9..ef5a7bc38 100644
if (isChunkLoaded(chunkCoordX + x, chunkCoordZ + z)) {
unloadChunk(chunkCoordX + x, chunkCoordZ + z);
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index c70890cc5..957ad628e 100644
index 4a0a456a0..4068b8072 100644
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -80,6 +80,7 @@ public class CraftEventFactory {
@@ -81,6 +81,7 @@ public class CraftEventFactory {
public static final DamageSource POISON = CraftDamageSource.copyOf(DamageSource.MAGIC);
public static org.bukkit.block.Block blockDamage; // For use in EntityDamageByBlockEvent
public static Entity entityDamage; // For use in EntityDamageByEntityEvent
@ -2372,7 +2372,7 @@ index c70890cc5..957ad628e 100644
// helper methods
private static boolean canBuild(CraftWorld world, Player player, int x, int z) {
@@ -369,6 +370,7 @@ public class CraftEventFactory {
@@ -382,6 +383,7 @@ public class CraftEventFactory {
CraftServer craftServer = (CraftServer) entity.getServer();
CreatureSpawnEvent event = new CreatureSpawnEvent(entity, spawnReason);
@ -2380,7 +2380,7 @@ index c70890cc5..957ad628e 100644
craftServer.getPluginManager().callEvent(event);
return event;
}
@@ -1016,6 +1018,7 @@ public class CraftEventFactory {
@@ -1029,6 +1031,7 @@ public class CraftEventFactory {
}
BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(block.getX(), block.getY(), block.getZ()), cause, igniter);
@ -2388,7 +2388,7 @@ index c70890cc5..957ad628e 100644
world.getServer().getPluginManager().callEvent(event);
return event;
}
@@ -1040,6 +1043,7 @@ public class CraftEventFactory {
@@ -1053,6 +1056,7 @@ public class CraftEventFactory {
}
BlockIgniteEvent event = new BlockIgniteEvent(bukkitWorld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), cause, bukkitIgniter);
@ -2396,7 +2396,7 @@ index c70890cc5..957ad628e 100644
world.getServer().getPluginManager().callEvent(event);
return event;
}
@@ -1247,7 +1251,8 @@ public class CraftEventFactory {
@@ -1260,7 +1264,8 @@ public class CraftEventFactory {
public static BlockPhysicsEvent callBlockPhysicsEvent(GeneratorAccess world, BlockPosition blockposition) {
org.bukkit.block.Block block = CraftBlock.at(world, blockposition);
BlockPhysicsEvent event = new BlockPhysicsEvent(block, block.getBlockData());
@ -2406,7 +2406,7 @@ index c70890cc5..957ad628e 100644
return event;
}
@@ -1283,6 +1288,7 @@ public class CraftEventFactory {
@@ -1296,6 +1301,7 @@ public class CraftEventFactory {
}
EntityPotionEffectEvent event = new EntityPotionEffectEvent((LivingEntity) entity.getBukkitEntity(), bukkitOldEffect, bukkitNewEffect, cause, action, willOverride);
@ -2414,7 +2414,7 @@ index c70890cc5..957ad628e 100644
Bukkit.getPluginManager().callEvent(event);
return event;
@@ -1301,6 +1307,7 @@ public class CraftEventFactory {
@@ -1314,6 +1320,7 @@ public class CraftEventFactory {
blockState.setData(block);
BlockFormEvent event = (entity == null) ? new BlockFormEvent(blockState.getBlock(), blockState) : new EntityBlockFormEvent(entity.getBukkitEntity(), blockState.getBlock(), blockState);
@ -2451,5 +2451,5 @@ index 04e29f58c..5fae0c6ad 100644
this.random = new Random(seed);
this.chunkManager = world.worldProvider.getChunkGenerator().getWorldChunkManager();
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 3b42f567b8c42ad2bd2020fc41c14861f81a6b89 Mon Sep 17 00:00:00 2001
From 659826fe3f74e1201299115726355f730d4aa3fd Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 20:46:29 -0400
Subject: [PATCH] Optimize Light Recalculations
@ -14,7 +14,7 @@ Also optimizes to not repeatedly look up the same chunk for
light lookups.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 340b756bb..cc0413000 100644
index d86e12042..b85a217fe 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -347,7 +347,7 @@ public class Chunk implements IChunkAccess {
@ -26,7 +26,7 @@ index 340b756bb..cc0413000 100644
}
this.x = true;
@@ -558,7 +558,7 @@ public class Chunk implements IChunkAccess {
@@ -557,7 +557,7 @@ public class Chunk implements IChunkAccess {
} else {
if (flag1) {
this.initLighting();
@ -36,7 +36,7 @@ index 340b756bb..cc0413000 100644
int i1 = iblockdata.b(this.world, blockposition);
int j1 = iblockdata1.b(this.world, blockposition);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index f1495d30c..7e7b62b1d 100644
index f8afa6f72..3c99ae7cd 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -589,8 +589,9 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -51,7 +51,7 @@ index f1495d30c..7e7b62b1d 100644
}
}
@@ -2294,6 +2295,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -2292,6 +2293,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
public boolean c(EnumSkyBlock enumskyblock, BlockPosition blockposition) {
// CraftBukkit start - Use neighbor cache instead of looking up
Chunk chunk = this.getChunkIfLoaded(blockposition.getX() >> 4, blockposition.getZ() >> 4);
@ -64,5 +64,5 @@ index f1495d30c..7e7b62b1d 100644
// CraftBukkit end
return false;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 02e6b94c373272fc2104380efa085fba07e0802d Mon Sep 17 00:00:00 2001
From 834ae3968bdf4370bb2a8f6ee313b323a1268b4b 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
@ -18,10 +18,10 @@ 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/World.java b/src/main/java/net/minecraft/server/World.java
index 7e7b62b1d..23529954b 100644
index 3c99ae7cd..2b9da597a 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -1147,7 +1147,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1145,7 +1145,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
int i = MathHelper.floor(entity.locX / 16.0D);
int j = MathHelper.floor(entity.locZ / 16.0D);
@ -30,7 +30,7 @@ index 7e7b62b1d..23529954b 100644
// Paper start - Set origin location when the entity is being added to the world
if (entity.origin == null) {
@@ -1651,7 +1651,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -1649,7 +1649,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
this.getChunkAt(entity.ae, entity.ag).a(entity, entity.af);
}
@ -40,5 +40,5 @@ index 7e7b62b1d..23529954b 100644
} else {
this.getChunkAt(i, k).a(entity);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 4ba833e6073cfbed977574a9ec3bbe902906f5e6 Mon Sep 17 00:00:00 2001
From a3996515e796f8e2daade8a978a59355a94f6629 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Fri, 28 Sep 2018 22:27:33 -0400
Subject: [PATCH] Don't recheck type after setting a block
@ -16,10 +16,10 @@ be having data corruption issues anyways.
This provides a small boost to all setType calls.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index cc0413000..8d9d5ae9e 100644
index b85a217fe..07bc23e28 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -553,7 +553,7 @@ public class Chunk implements IChunkAccess {
@@ -552,7 +552,7 @@ public class Chunk implements IChunkAccess {
this.world.n(blockposition);
}
@ -29,5 +29,5 @@ index cc0413000..8d9d5ae9e 100644
} else {
if (flag1) {
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From a709d7c592271a2d476345299d5acaa67e9b6a16 Mon Sep 17 00:00:00 2001
From 9bd565eb9c7a00c05a056cdffc13286be4049e01 Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co>
Date: Sat, 29 Sep 2018 01:18:16 -0400
Subject: [PATCH] Fix Sending Chunks to Client
@ -14,10 +14,10 @@ This fix always sends chunks to the client, and simply updates
the client anytime post processing is triggered with the new chunk data.
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 8d9d5ae9e..45c3aad70 100644
index 07bc23e28..b9242d4a2 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -1185,7 +1185,7 @@ public class Chunk implements IChunkAccess {
@@ -1184,7 +1184,7 @@ public class Chunk implements IChunkAccess {
}
public boolean isReady() {
@ -26,7 +26,7 @@ index 8d9d5ae9e..45c3aad70 100644
}
public boolean v() {
@@ -1423,6 +1423,13 @@ public class Chunk implements IChunkAccess {
@@ -1422,6 +1422,13 @@ public class Chunk implements IChunkAccess {
this.h.clear();
this.a(ChunkStatus.POSTPROCESSED);
this.m.a(this);
@ -41,7 +41,7 @@ index 8d9d5ae9e..45c3aad70 100644
}
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
index 62c524ef3..36600523f 100644
index cbff0d946..3ac09b91f 100644
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
@@ -23,7 +23,7 @@ public class PlayerChunk {
@ -62,5 +62,5 @@ index 62c524ef3..36600523f 100644
if (this.done) {
return true;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From bf52fece0030ab6d6b59c6b88c994acdd8417219 Mon Sep 17 00:00:00 2001
From 86bcfd44c4aa9ead64eddd5edf88914f3f3a3242 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 24d608399..212a50c88 100644
index 875b4f77c..93e09e42f 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;
@ -82,7 +82,7 @@ index 24d608399..212a50c88 100644
OptionParser parser = new OptionParser();
@@ -129,15 +172,90 @@ public class Commodore
cr.accept( new ClassVisitor( Opcodes.ASM7_EXPERIMENTAL, cw )
cr.accept( new ClassVisitor( Opcodes.ASM7, cw )
{
+ // Paper start - Rewrite plugins
+ @Override
@ -187,5 +187,5 @@ index 24d608399..212a50c88 100644
{
if ( owner.equals( "org/bukkit/Material" ) )
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 6a211dc82faa943d2d35fae1568ec2ada8edc859 Mon Sep 17 00:00:00 2001
From ba8e629a2b3f75fde85854071cf7f51180271543 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,7 +46,7 @@ index 19819b134..49228a884 100644
public MovingObjectPosition b(Vec3D vec3d, Vec3D vec3d1) {
return this.a(vec3d, vec3d1, (BlockPosition)null);
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index dd96b09e6..d60dab95f 100644
index 0f646ac7e..23e6f45bf 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1519,6 +1519,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -71,7 +71,7 @@ index dd96b09e6..d60dab95f 100644
return this.d(this.pitch, this.yaw);
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 83d648fff..a845856af 100644
index 46a4e37a2..34b649dad 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -3,6 +3,8 @@ package net.minecraft.server;
@ -92,7 +92,7 @@ index 83d648fff..a845856af 100644
import com.google.common.base.Function;
import com.google.common.collect.Lists;
import org.bukkit.Location;
@@ -2861,6 +2865,36 @@ public abstract class EntityLiving extends Entity {
@@ -2862,6 +2866,36 @@ public abstract class EntityLiving extends Entity {
return world.rayTrace(start, end, fluidCollisionOption);
}
@ -180,5 +180,5 @@ index eeab59379..d6a4bc64a 100644
public List<Block> getLastTwoTargetBlocks(Set<Material> transparent, int maxDistance) {
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From dc1d2eba4ad7ca6e7912c0ad98dc8b7189e888b9 Mon Sep 17 00:00:00 2001
From 37b39c722b30521882bdffa54fe17de4feb89d74 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 db9201d29..6c9776f57 100644
index d92b6a6ea..6a1c8e8bd 100644
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
@@ -1297,6 +1297,7 @@ public abstract class EntityInsentient extends EntityLiving {
@@ -1286,6 +1286,7 @@ public abstract class EntityInsentient extends EntityLiving {
return flag;
}
@ -17,10 +17,10 @@ index db9201d29..6c9776f57 100644
if (this.world.L() && !this.world.isClientSide) {
float f = this.az();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 23529954b..7914f9b60 100644
index 2b9da597a..d202360bd 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -829,6 +829,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -827,6 +827,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
}
}
@ -61,5 +61,5 @@ index 53c2d154e..40a429942 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 678b14086c37ad2be235f4c77dc2e4b3050d495a Mon Sep 17 00:00:00 2001
From ff8fe97e3d6eed64da443a63edf0cdb55106978c 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 70cf407dc..2c1db9b78 100644
index db221a6b5..37fc10fba 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -27,51 +27,63 @@ public class EntityTurtle extends EntityAnimal {
@ -34,45 +34,45 @@ index 70cf407dc..2c1db9b78 100644
+ public boolean hasEgg() { return dy(); } // Paper - OBFHELPER
public boolean dy() {
return ((Boolean) this.datawatcher.get(EntityTurtle.bE)).booleanValue();
return (Boolean) this.datawatcher.get(EntityTurtle.bE);
}
+ public void setHasEgg(boolean hasEgg) { s(hasEgg); } // Paper - OBFHELPER
private void s(boolean flag) {
this.datawatcher.set(EntityTurtle.bE, Boolean.valueOf(flag));
this.datawatcher.set(EntityTurtle.bE, flag);
}
+ public boolean isDigging() { return dz(); } // Paper - OBFHELPER
public boolean dz() {
return ((Boolean) this.datawatcher.get(EntityTurtle.bG)).booleanValue();
return (Boolean) this.datawatcher.get(EntityTurtle.bG);
}
+ public void setDigging(boolean digging) { t(digging); } // Paper - OBFHELPER
private void t(boolean flag) {
this.bK = flag ? 1 : 0;
this.datawatcher.set(EntityTurtle.bG, Boolean.valueOf(flag));
this.datawatcher.set(EntityTurtle.bG, flag);
}
+ public boolean isGoingHome() { return dC(); } // Paper - OBFHELPER
private boolean dC() {
return ((Boolean) this.datawatcher.get(EntityTurtle.bI)).booleanValue();
return (Boolean) this.datawatcher.get(EntityTurtle.bI);
}
+ public void setGoingHome(boolean goingHome) { u(goingHome); } // Paper - OBFHELPER
private void u(boolean flag) {
this.datawatcher.set(EntityTurtle.bI, Boolean.valueOf(flag));
this.datawatcher.set(EntityTurtle.bI, flag);
}
+ public boolean isTravelling() { return dH(); } // Paper - OBFHELPER
private boolean dH() {
return ((Boolean) this.datawatcher.get(EntityTurtle.bJ)).booleanValue();
return (Boolean) this.datawatcher.get(EntityTurtle.bJ);
}
+ public void setTravelling(boolean travelling) { v(travelling); } // Paper - OBFHELPER
private void v(boolean flag) {
this.datawatcher.set(EntityTurtle.bJ, Boolean.valueOf(flag));
this.datawatcher.set(EntityTurtle.bJ, flag);
}
@@ -435,14 +447,18 @@ public class EntityTurtle extends EntityAnimal {
@@ -435,14 +447,17 @@ public class EntityTurtle extends EntityAnimal {
if (!this.f.isInWater() && this.k()) {
if (this.f.bK < 1) {
@ -88,13 +88,12 @@ index 70cf407dc..2c1db9b78 100644
+ com.destroystokyo.paper.event.entity.TurtleLayEggEvent layEggEvent = new com.destroystokyo.paper.event.entity.TurtleLayEggEvent((org.bukkit.entity.Turtle) this.f.getBukkitEntity(), MCUtil.toLocation(this.f.world, this.d.up()), eggCount);
+ if (layEggEvent.callEvent() && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.f, this.d.up(), Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, layEggEvent.getEggCount())).isCancelled()) {
world.a((EntityHuman) null, blockposition, SoundEffects.ENTITY_TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
- world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, Integer.valueOf(this.f.random.nextInt(4) + 1)), 3);
- world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, this.f.random.nextInt(4) + 1), 3);
+ world.setTypeAndData(this.d.up(), (IBlockData) Blocks.TURTLE_EGG.getBlockData().set(BlockTurtleEgg.b, layEggEvent.getEggCount()), 3);
+ // Paper end
}
// CraftBukkit end
this.f.s(false);
@@ -568,7 +584,7 @@ public class EntityTurtle extends EntityAnimal {
@@ -568,7 +583,7 @@ public class EntityTurtle extends EntityAnimal {
}
public boolean a() {
@ -154,5 +153,5 @@ index 123a2c75c..8edcf7af6 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,11 +1,11 @@
From 386324ab62fb6cf1e83b10fd17625e8ce9dd250f Mon Sep 17 00:00:00 2001
From 4a2033ec2efd8d600fbb7090583867d28201d089 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 b5f676f04..41673ec9a 100644
index 896388c41..7361d4c05 100644
--- a/src/main/java/net/minecraft/server/EntityWitch.java
+++ b/src/main/java/net/minecraft/server/EntityWitch.java
@@ -1,5 +1,11 @@
@ -38,12 +38,12 @@ index b5f676f04..41673ec9a 100644
+ public void setDrinkingPotion(boolean drinkingPotion) { a(drinkingPotion); } // Paper - OBFHELPER
public void a(boolean flag) {
this.getDataWatcher().set(EntityWitch.c, Boolean.valueOf(flag));
this.getDataWatcher().set(EntityWitch.c, flag);
}
+ public boolean isDrinkingPotion() { return l(); } // Paper - OBFHELPER
public boolean l() {
return ((Boolean) this.getDataWatcher().get(EntityWitch.c)).booleanValue();
return (Boolean) this.getDataWatcher().get(EntityWitch.c);
}
@@ -100,18 +108,17 @@ public class EntityWitch extends EntityMonster implements IRangedEntity {
}
@ -136,5 +136,5 @@ index f25998eb6..ac465bda2 100644
+ // Paper end
}
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 4516b9be263260fb65341432f950a807df444661 Mon Sep 17 00:00:00 2001
From 314c9f75522a0f97d2560b4c061f976c1f9510a6 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
@ -20,7 +20,7 @@ index f94fa5df2..1a8a90261 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f54cf3802..5c1735163 100644
index 8e436c7f4..5e8c85cfb 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -342,6 +342,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@ -36,8 +36,8 @@ index f54cf3802..5c1735163 100644
+
if (d10 - d9 > Math.max(100.0D, Math.pow((double) (org.spigotmc.SpigotConfig.movedTooQuicklyMultiplier * (float) i * speed), 2)) && (!this.minecraftServer.H() || !this.minecraftServer.G().equals(entity.getDisplayName().getString()))) {
// CraftBukkit end
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), Double.valueOf(d6), Double.valueOf(d7), Double.valueOf(d8));
@@ -851,9 +858,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", entity.getDisplayName().getString(), this.player.getDisplayName().getString(), d6, d7, d8);
@@ -849,9 +856,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
double d1 = this.player.locY;
double d2 = this.player.locZ;
double d3 = this.player.locY;
@ -49,7 +49,7 @@ index f54cf3802..5c1735163 100644
float f = packetplayinflying.a(this.player.yaw);
float f1 = packetplayinflying.b(this.player.pitch);
double d7 = d4 - this.l;
@@ -893,6 +900,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -891,6 +898,13 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
speed = player.abilities.walkSpeed * 10f;
}
@ -64,5 +64,5 @@ index f54cf3802..5c1735163 100644
float f2 = this.player.dc() ? 300.0F : 100.0F;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 12a5042eaaa93ff7312841c8d10ce410da3c0247 Mon Sep 17 00:00:00 2001
From 63c725d26b2b469c15ba5d6c618ef4c8628e42b5 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <Blake.Galbreath@GMail.com>
Date: Thu, 4 Oct 2018 10:08:02 -0500
Subject: [PATCH] Use EntityTypes for living entities
@ -18,7 +18,7 @@ index 5a0cc6d05..d385f647e 100644
entitysilverfish.setPositionRotation((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
world.addEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
diff --git a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
index f7ea9f9b8..dfa3bd685 100644
index 75622fbdf..265369984 100644
--- a/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
+++ b/src/main/java/net/minecraft/server/BlockPumpkinCarved.java
@@ -52,7 +52,7 @@ public class BlockPumpkinCarved extends BlockFacingHorizontal {
@ -40,12 +40,12 @@ index f7ea9f9b8..dfa3bd685 100644
entityirongolem.setPlayerCreated(true);
entityirongolem.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.05D, (double) blockposition2.getZ() + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/BlockTurtleEgg.java b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
index 924d15649..9e9fa7d58 100644
index d2cc6bbe2..b180772ae 100644
--- a/src/main/java/net/minecraft/server/BlockTurtleEgg.java
+++ b/src/main/java/net/minecraft/server/BlockTurtleEgg.java
@@ -84,7 +84,7 @@ public class BlockTurtleEgg extends Block {
if (!world.isClientSide) {
for (int j = 0; j < ((Integer) iblockdata.get(BlockTurtleEgg.b)).intValue(); ++j) {
for (int j = 0; j < (Integer) iblockdata.get(BlockTurtleEgg.b); ++j) {
world.triggerEffect(2001, blockposition, Block.getCombinedId(iblockdata));
- EntityTurtle entityturtle = new EntityTurtle(world);
+ EntityTurtle entityturtle = EntityTypes.TURTLE.create(world); // Paper
@ -53,7 +53,7 @@ index 924d15649..9e9fa7d58 100644
entityturtle.setAgeRaw(-24000);
entityturtle.g(blockposition);
diff --git a/src/main/java/net/minecraft/server/BlockWitherSkull.java b/src/main/java/net/minecraft/server/BlockWitherSkull.java
index 7904b1262..38fc40e50 100644
index 93bf32dc1..e6063bb46 100644
--- a/src/main/java/net/minecraft/server/BlockWitherSkull.java
+++ b/src/main/java/net/minecraft/server/BlockWitherSkull.java
@@ -52,7 +52,7 @@ public class BlockWitherSkull extends BlockSkull {
@ -66,20 +66,20 @@ index 7904b1262..38fc40e50 100644
entitywither.setPositionRotation((double) blockposition2.getX() + 0.5D, (double) blockposition2.getY() + 0.55D, (double) blockposition2.getZ() + 0.5D, shapedetector_shapedetectorcollection.getFacing().k() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
index f4a8a4b4d..3d5801dd8 100644
index 67808446c..89bb2e768 100644
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
@@ -414,7 +414,7 @@ public class EnderDragonBattle {
@@ -357,7 +357,7 @@ public class EnderDragonBattle {
private EntityEnderDragon n() {
this.d.getChunkAtWorldCoords(new BlockPosition(0, 128, 0));
- EntityEnderDragon entityenderdragon = new EntityEnderDragon(this.d);
+ EntityEnderDragon entityenderdragon = EntityTypes.ENDER_DRAGON.create(this.d); // Paper
entityenderdragon.getDragonControllerManager().setControllerPhase(DragonControllerPhase.a);
entityenderdragon.setPositionRotation(0.0D, 128.0D, 0.0D, this.d.random.nextFloat() * 360.0F, 0.0F);
this.d.addEntity(entityenderdragon);
diff --git a/src/main/java/net/minecraft/server/EntityChicken.java b/src/main/java/net/minecraft/server/EntityChicken.java
index efb728d04..3bfbf4752 100644
index afbcfab55..b1af04726 100644
--- a/src/main/java/net/minecraft/server/EntityChicken.java
+++ b/src/main/java/net/minecraft/server/EntityChicken.java
@@ -96,7 +96,7 @@ public class EntityChicken extends EntityAnimal {
@ -92,7 +92,7 @@ index efb728d04..3bfbf4752 100644
public boolean f(ItemStack itemstack) {
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index b2e50f853..9c7bf12b8 100644
index 6bb80975e..180de2144 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -88,7 +88,7 @@ public class EntityCow extends EntityAnimal {
@ -105,7 +105,7 @@ index b2e50f853..9c7bf12b8 100644
public float getHeadHeight() {
diff --git a/src/main/java/net/minecraft/server/EntityEnderPearl.java b/src/main/java/net/minecraft/server/EntityEnderPearl.java
index c82b5f3ab..ba53e9b0b 100644
index 46f29272e..1d3b7edb3 100644
--- a/src/main/java/net/minecraft/server/EntityEnderPearl.java
+++ b/src/main/java/net/minecraft/server/EntityEnderPearl.java
@@ -74,7 +74,7 @@ public class EntityEnderPearl extends EntityProjectile {
@ -200,19 +200,19 @@ index 774e4d641..0cf53b69f 100644
EntityLlama entityllama2 = (EntityLlama)entityageable;
int i = this.random.nextInt(Math.max(this.getStrength(), entityllama2.getStrength())) + 1;
diff --git a/src/main/java/net/minecraft/server/EntityMushroomCow.java b/src/main/java/net/minecraft/server/EntityMushroomCow.java
index 8ba9f3bb1..c12b37f52 100644
index dab644930..737289588 100644
--- a/src/main/java/net/minecraft/server/EntityMushroomCow.java
+++ b/src/main/java/net/minecraft/server/EntityMushroomCow.java
@@ -40,7 +40,7 @@ public class EntityMushroomCow extends EntityCow {
this.world.addParticle(Particles.u, this.locX, this.locY + (double) (this.length / 2.0F), this.locZ, 0.0D, 0.0D, 0.0D);
if (!this.world.isClientSide) {
this.die();
// this.die(); // CraftBukkit - moved down
- EntityCow entitycow = new EntityCow(this.world);
+ EntityCow entitycow = EntityTypes.COW.create(world); // Paper
entitycow.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
entitycow.setHealth(this.getHealth());
@@ -72,7 +72,7 @@ public class EntityMushroomCow extends EntityCow {
@@ -74,7 +74,7 @@ public class EntityMushroomCow extends EntityCow {
}
public EntityMushroomCow c(EntityAgeable entityageable) {
@ -222,7 +222,7 @@ index 8ba9f3bb1..c12b37f52 100644
@Nullable
diff --git a/src/main/java/net/minecraft/server/EntityOcelot.java b/src/main/java/net/minecraft/server/EntityOcelot.java
index d2e25f04b..90a7e00a0 100644
index 2a5a5516a..58518a509 100644
--- a/src/main/java/net/minecraft/server/EntityOcelot.java
+++ b/src/main/java/net/minecraft/server/EntityOcelot.java
@@ -154,7 +154,7 @@ public class EntityOcelot extends EntityTameableAnimal {
@ -244,7 +244,7 @@ index d2e25f04b..90a7e00a0 100644
entityocelot.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entityocelot.setAgeRaw(-24000);
diff --git a/src/main/java/net/minecraft/server/EntityPig.java b/src/main/java/net/minecraft/server/EntityPig.java
index 23668ada3..6295cd95d 100644
index 30306256a..4d9e8c378 100644
--- a/src/main/java/net/minecraft/server/EntityPig.java
+++ b/src/main/java/net/minecraft/server/EntityPig.java
@@ -153,7 +153,7 @@ public class EntityPig extends EntityAnimal {
@ -254,9 +254,9 @@ index 23668ada3..6295cd95d 100644
- EntityPigZombie entitypigzombie = new EntityPigZombie(this.world);
+ EntityPigZombie entitypigzombie = EntityTypes.ZOMBIE_PIGMAN.create(world); // Paper
// Paper start
if (CraftEventFactory.callEntityZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
@@ -248,7 +248,7 @@ public class EntityPig extends EntityAnimal {
entitypigzombie.setSlot(EnumItemSlot.MAINHAND, new ItemStack(Items.GOLDEN_SWORD));
entitypigzombie.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
@@ -242,7 +242,7 @@ public class EntityPig extends EntityAnimal {
}
public EntityPig b(EntityAgeable entityageable) {
@ -279,7 +279,7 @@ index b9124a5b0..cb3e45f14 100644
public boolean f(ItemStack var1) {
diff --git a/src/main/java/net/minecraft/server/EntityRabbit.java b/src/main/java/net/minecraft/server/EntityRabbit.java
index b8ca53003..747409af0 100644
index a10de4e88..ea101bee9 100644
--- a/src/main/java/net/minecraft/server/EntityRabbit.java
+++ b/src/main/java/net/minecraft/server/EntityRabbit.java
@@ -251,7 +251,7 @@ public class EntityRabbit extends EntityAnimal {
@ -292,10 +292,10 @@ index b8ca53003..747409af0 100644
if (this.random.nextInt(20) != 0) {
diff --git a/src/main/java/net/minecraft/server/EntitySheep.java b/src/main/java/net/minecraft/server/EntitySheep.java
index 4a9a9f9da..db4c3aa60 100644
index caf442610..2b50bc2ea 100644
--- a/src/main/java/net/minecraft/server/EntitySheep.java
+++ b/src/main/java/net/minecraft/server/EntitySheep.java
@@ -264,7 +264,7 @@ public class EntitySheep extends EntityAnimal {
@@ -249,7 +249,7 @@ public class EntitySheep extends EntityAnimal {
public EntitySheep b(EntityAgeable entityageable) {
EntitySheep entitysheep = (EntitySheep) entityageable;
@ -305,7 +305,7 @@ index 4a9a9f9da..db4c3aa60 100644
entitysheep1.setColor(this.a((EntityAnimal) this, (EntityAnimal) entitysheep));
return entitysheep1;
diff --git a/src/main/java/net/minecraft/server/EntitySpider.java b/src/main/java/net/minecraft/server/EntitySpider.java
index 761c94bdf..ffbd572dd 100644
index 361c7831e..e46340e66 100644
--- a/src/main/java/net/minecraft/server/EntitySpider.java
+++ b/src/main/java/net/minecraft/server/EntitySpider.java
@@ -111,7 +111,7 @@ public class EntitySpider extends EntityMonster {
@ -318,7 +318,7 @@ index 761c94bdf..ffbd572dd 100644
entityskeleton.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, 0.0F);
entityskeleton.prepare(difficultydamagescaler, (GroupDataEntity) null, (NBTTagCompound) null);
diff --git a/src/main/java/net/minecraft/server/EntityTurtle.java b/src/main/java/net/minecraft/server/EntityTurtle.java
index 2c1db9b78..0d88314de 100644
index 37fc10fba..98268145e 100644
--- a/src/main/java/net/minecraft/server/EntityTurtle.java
+++ b/src/main/java/net/minecraft/server/EntityTurtle.java
@@ -218,7 +218,7 @@ public class EntityTurtle extends EntityAnimal {
@ -343,10 +343,10 @@ index 6b6fbfd79..29d5ef4c1 100644
public T a(World world) {
return this.aT.apply(world); // CraftBukkit - decompile error
diff --git a/src/main/java/net/minecraft/server/EntityVillager.java b/src/main/java/net/minecraft/server/EntityVillager.java
index 868d24830..fbf78edd3 100644
index e4a570e01..0de37ceb3 100644
--- a/src/main/java/net/minecraft/server/EntityVillager.java
+++ b/src/main/java/net/minecraft/server/EntityVillager.java
@@ -598,7 +598,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -593,7 +593,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
}
public EntityVillager b(EntityAgeable entityageable) {
@ -355,7 +355,7 @@ index 868d24830..fbf78edd3 100644
entityvillager.prepare(this.world.getDamageScaler(new BlockPosition(entityvillager)), (GroupDataEntity) null, (NBTTagCompound) null);
return entityvillager;
@@ -610,7 +610,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
@@ -605,7 +605,7 @@ public class EntityVillager extends EntityAgeable implements NPC, IMerchant {
public void onLightningStrike(EntityLightning entitylightning) {
if (!this.world.isClientSide && !this.dead) {
@ -365,7 +365,7 @@ index 868d24830..fbf78edd3 100644
// Paper start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, entitylightning, entitywitch).isCancelled()) {
diff --git a/src/main/java/net/minecraft/server/EntityWolf.java b/src/main/java/net/minecraft/server/EntityWolf.java
index af9aef76f..68db6af62 100644
index 9a52d33d6..878eac112 100644
--- a/src/main/java/net/minecraft/server/EntityWolf.java
+++ b/src/main/java/net/minecraft/server/EntityWolf.java
@@ -343,7 +343,7 @@ public class EntityWolf extends EntityTameableAnimal {
@ -378,7 +378,7 @@ index af9aef76f..68db6af62 100644
if (uuid != null) {
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
index 4b326bf6a..69a12bab3 100644
index 823d4be7f..2d87dca68 100644
--- a/src/main/java/net/minecraft/server/EntityZombie.java
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
@@ -216,7 +216,7 @@ public class EntityZombie extends EntityMonster {
@ -407,8 +407,8 @@ index 4b326bf6a..69a12bab3 100644
+ EntityZombieVillager entityzombievillager = EntityTypes.ZOMBIE_VILLAGER.create(world); // Paper
entityzombievillager.u(entityvillager);
this.world.kill(entityvillager);
@@ -457,7 +457,7 @@ public class EntityZombie extends EntityMonster {
// this.world.kill(entityvillager); // CraftBukkit - moved down
@@ -458,7 +458,7 @@ public class EntityZombie extends EntityMonster {
this.startRiding(entitychicken);
}
} else if ((double) this.world.random.nextFloat() < 0.05D) {
@ -431,7 +431,7 @@ index 85d402965..0cca7b6d5 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityZombieVillager.java b/src/main/java/net/minecraft/server/EntityZombieVillager.java
index 0e5dd1116..c11e2745a 100644
index ab1b3ab5e..dbb833e49 100644
--- a/src/main/java/net/minecraft/server/EntityZombieVillager.java
+++ b/src/main/java/net/minecraft/server/EntityZombieVillager.java
@@ -118,7 +118,7 @@ public class EntityZombieVillager extends EntityZombie {
@ -457,7 +457,7 @@ index 9e4078148..a4fab5c23 100644
entityarmorstand.setPositionRotation(d0 + 0.5D, d1, d2 + 0.5D, f, 0.0F);
diff --git a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
index 413188e97..476b840ae 100644
index 5ddf66eef..bb7e072ee 100644
--- a/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
+++ b/src/main/java/net/minecraft/server/MobSpawnerPhantom.java
@@ -59,7 +59,7 @@ public class MobSpawnerPhantom {
@ -527,7 +527,7 @@ index d53911594..83f55adba 100644
entityshulker.g(blockposition);
generatoraccess.addEntity(entityshulker);
diff --git a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
index 50fe0e16b..ceb37aab4 100644
index a542e581c..a64fef39d 100644
--- a/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenFeatureOceanRuinPieces.java
@@ -146,7 +146,7 @@ public class WorldGenFeatureOceanRuinPieces {
@ -580,10 +580,10 @@ index 6ab249ee7..c9a17e332 100644
for(WorldGenMonumentPieces.WorldGenMonumentStateTracker worldgenmonumentpieces$worldgenmonumentstatetracker4 : aworldgenmonumentpieces$worldgenmonumentstatetracker) {
if (worldgenmonumentpieces$worldgenmonumentstatetracker4 != null) {
diff --git a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
index e327e2a28..c63b535ee 100644
index 706e2b7e1..20630784a 100644
--- a/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
+++ b/src/main/java/net/minecraft/server/WorldGenVillagePieces.java
@@ -1656,7 +1656,7 @@ public class WorldGenVillagePieces {
@@ -1641,7 +1641,7 @@ public class WorldGenVillagePieces {
++this.a;
if (this.h) {
@ -592,7 +592,7 @@ index e327e2a28..c63b535ee 100644
entityzombievillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
entityzombievillager.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityzombievillager)), (GroupDataEntity) null, (NBTTagCompound) null);
@@ -1664,7 +1664,7 @@ public class WorldGenVillagePieces {
@@ -1649,7 +1649,7 @@ public class WorldGenVillagePieces {
entityzombievillager.di();
generatoraccess.addEntity(entityzombievillager, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
} else {
@ -602,18 +602,18 @@ index e327e2a28..c63b535ee 100644
entityvillager.setPositionRotation((double) j1 + 0.5D, (double) k1, (double) l1 + 0.5D, 0.0F, 0.0F);
entityvillager.setProfession(this.c(i1, generatoraccess.m().nextInt(6)));
diff --git a/src/main/java/net/minecraft/server/WorldGenWitchHut.java b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
index a05e0657b..7062b0cec 100644
index efb0379ce..3d8193c47 100644
--- a/src/main/java/net/minecraft/server/WorldGenWitchHut.java
+++ b/src/main/java/net/minecraft/server/WorldGenWitchHut.java
@@ -81,7 +81,7 @@ public class WorldGenWitchHut extends WorldGenScatteredPiece {
if (structureboundingbox.b((BaseBlockPosition) (new BlockPosition(i, j, k)))) {
if (structureboundingbox.b((BaseBlockPosition) (new BlockPosition(j, i, k)))) {
this.e = true;
- EntityWitch entitywitch = new EntityWitch(generatoraccess.getMinecraftWorld());
+ EntityWitch entitywitch = EntityTypes.WITCH.create(generatoraccess.getMinecraftWorld()); // Paper
entitywitch.di();
entitywitch.setPositionRotation((double) i + 0.5D, (double) j, (double) k + 0.5D, 0.0F, 0.0F);
entitywitch.setPositionRotation((double) j + 0.5D, (double) i, (double) k + 0.5D, 0.0F, 0.0F);
diff --git a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java b/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java
index ee401980f..9ca9306d0 100644
--- a/src/main/java/net/minecraft/server/WorldGenWoodlandMansionPieces.java
@ -686,7 +686,7 @@ index ee401980f..9ca9306d0 100644
entityvindicator.setPositionRotation(blockposition, 0.0F, 0.0F);
entityvindicator.prepare(generatoraccess.getDamageScaler(new BlockPosition(entityvindicator)), (GroupDataEntity)null, (NBTTagCompound)null);
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
index 818e4c376..4f9029c33 100644
index 899c7f5f7..aff5a62e5 100644
--- a/src/main/java/net/minecraft/server/WorldServer.java
+++ b/src/main/java/net/minecraft/server/WorldServer.java
@@ -511,7 +511,7 @@ public class WorldServer extends World implements IAsyncTaskHandler {
@ -915,5 +915,5 @@ index 10fa12253..bd118f7f0 100644
if (entity != null) {
--
2.19.1
2.19.2

View File

@ -1,14 +1,14 @@
From 0e8adf94dcf160bf8190be6477b69d482cc31fc8 Mon Sep 17 00:00:00 2001
From 42e3f9ca2869b80229ed8609c94341074ae57c3a 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 5c1735163..f1645b3ea 100644
index 5e8c85cfb..bb4498e0f 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -1229,6 +1229,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -1223,6 +1223,11 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
case START_DESTROY_BLOCK:
case ABORT_DESTROY_BLOCK:
case STOP_DESTROY_BLOCK:
@ -21,5 +21,5 @@ index 5c1735163..f1645b3ea 100644
double d1 = this.player.locY - ((double) blockposition.getY() + 0.5D) + 1.5D;
double d2 = this.player.locZ - ((double) blockposition.getZ() + 0.5D);
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From eed8d2404e12eb84f692a3fd1c50cd9a3a77d379 Mon Sep 17 00:00:00 2001
From dbfc13582cbdfb8d3f8fa7762e3aa9abbbdb635e 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
@ -954,7 +954,7 @@ index 000000000..21d9d6d7e
+ }
+}
diff --git a/src/main/java/net/minecraft/server/BlockRedstoneWire.java b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
index 80bad6755..3b45489a4 100644
index 570715ea6..f95464f64 100644
--- a/src/main/java/net/minecraft/server/BlockRedstoneWire.java
+++ b/src/main/java/net/minecraft/server/BlockRedstoneWire.java
@@ -1,5 +1,7 @@
@ -1140,7 +1140,7 @@ index 80bad6755..3b45489a4 100644
iblockdata.a(world, blockposition, 0);
world.setAir(blockposition);
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 7914f9b60..cdbb247da 100644
index d202360bd..05256ad3c 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -646,6 +646,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@ -1151,7 +1151,7 @@ index 7914f9b60..cdbb247da 100644
public void a(BlockPosition blockposition, Block block, BlockPosition blockposition1) {
if (!this.isClientSide) {
IBlockData iblockdata = this.getType(blockposition);
@@ -2667,6 +2668,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
@@ -2665,6 +2666,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
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))));
}
@ -1160,5 +1160,5 @@ index 7914f9b60..cdbb247da 100644
int i = 0;
EnumDirection[] aenumdirection = World.a;
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 1462d0f3acca2f9b77ec924db2dcbc83ed2608b0 Mon Sep 17 00:00:00 2001
From 7fcc80b90987430ca654b6ecc6aa0f01b2ed9da2 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,7 +20,7 @@ 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 32b90f30d..78ec842f2 100644
index e4c78c676..ab24ff871 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -2096,12 +2096,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@ -72,10 +72,10 @@ index 32b90f30d..78ec842f2 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 287001558..75dc93cd1 100644
index 6aa3a462f..c25a89111 100644
--- a/src/main/java/net/minecraft/server/EntityHuman.java
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
@@ -997,8 +997,11 @@ public abstract class EntityHuman extends EntityLiving {
@@ -994,8 +994,11 @@ public abstract class EntityHuman extends EntityLiving {
return -0.35D;
}
@ -90,11 +90,11 @@ index 287001558..75dc93cd1 100644
}
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index a845856af..44e0f1fe4 100644
index 34b649dad..4dd24e1d7 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2477,10 +2477,13 @@ public abstract class EntityLiving extends Entity {
return (((Byte) this.datawatcher.get(EntityLiving.aw)).byteValue() & 4) != 0;
@@ -2478,10 +2478,13 @@ public abstract class EntityLiving extends Entity {
return ((Byte) this.datawatcher.get(EntityLiving.aw) & 4) != 0;
}
- public void stopRiding() {
@ -110,7 +110,7 @@ index a845856af..44e0f1fe4 100644
this.A(entity);
}
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
index 4490b6325..342cdb4a9 100644
index 1b47d7bd4..7b8dbd00c 100644
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
@@ -776,10 +776,13 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
@ -130,5 +130,5 @@ index 4490b6325..342cdb4a9 100644
if (entity1 != entity && this.playerConnection != null) {
--
2.19.1
2.19.2

View File

@ -1,4 +1,4 @@
From 858c77b89ae39943f2efbba38eb54eb7d1ad57b2 Mon Sep 17 00:00:00 2001
From 7e63bbbab3ac2aeeb7e598d9b036544f2541933f 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
@ -22,10 +22,10 @@ index bc74ea2f0..beec4e33c 100644
+ }
}
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
index f1645b3ea..204d622f0 100644
index bb4498e0f..a9ef84d0e 100644
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
@@ -750,6 +750,38 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
@@ -748,6 +748,38 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
}
public void a(PacketPlayInBEdit packetplayinbedit) {
@ -65,5 +65,5 @@ index f1645b3ea..204d622f0 100644
PlayerConnectionUtils.ensureMainThread(packetplayinbedit, this, this.player.getWorldServer());
if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
--
2.19.1
2.19.2

Some files were not shown because too many files have changed in this diff Show More