Switch to using ForgeFlower for Paper Only mc-dev imports
ForgeFlower is better than Spigots FernFlower at decompiling the source. However, in order to maintain the CraftBukkit patches, we must keep using spigots for the primary. However, for any file that we import on top of Spigots imported files there is nothing stopping us from using better decompiled files. So these changes will use ForgeFlower to maintain a better set of decomped files, so anything we add on top of Paper can start off in a better spot.
This commit is contained in:
parent
854add2246
commit
d089acb3bd
|
@ -34,6 +34,7 @@ work/Spigot-Server
|
||||||
work/Spigot-API
|
work/Spigot-API
|
||||||
work/*.jar
|
work/*.jar
|
||||||
work/test-server
|
work/test-server
|
||||||
|
work/ForgeFlower
|
||||||
|
|
||||||
# Mac filesystem dust
|
# Mac filesystem dust
|
||||||
.DS_Store/
|
.DS_Store/
|
||||||
|
|
|
@ -1,351 +1,321 @@
|
||||||
From 35b1f286830c7abfb00224e808b8b2cab705bf56 Mon Sep 17 00:00:00 2001
|
From a745d7718cedae36f6ec9cd4222da6e69e754ae1 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
||||||
Subject: [PATCH] MC Dev fixes
|
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
|
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
index c3e990bdff..e2a7b4be2c 100644
|
index a553fb7476..4048937c63 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
@@ -93,7 +93,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
@@ -99,7 +99,7 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||||
return MoreObjects.toStringHelper(this).add("x", this.getX()).add("y", this.getY()).add("z", this.getZ()).toString();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public int compareTo(Object object) {
|
- public int compareTo(Object object) {
|
||||||
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
|
+ public int compareTo(BaseBlockPosition object) { // Paper - decompile fix
|
||||||
return this.l((BaseBlockPosition) object);
|
return this.l((BaseBlockPosition)object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 002da2a191..9f3aa24590 100644
|
index 7f8802b2ef..6ffc535146 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -150,7 +150,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -179,7 +179,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
return a(Math.min(blockposition.getX(), blockposition1.getX()), Math.min(blockposition.getY(), blockposition1.getY()), Math.min(blockposition.getZ(), blockposition1.getZ()), Math.max(blockposition.getX(), blockposition1.getX()), Math.max(blockposition.getY(), blockposition1.getY()), Math.max(blockposition.getZ(), blockposition1.getZ()));
|
}
|
||||||
}
|
|
||||||
|
|
||||||
- public static Iterable<BlockPosition> a(int i, int j, int k, int l, int i1, int j1) {
|
// $FF: synthetic method
|
||||||
+ public static Iterable<BlockPosition> a(int x0, int y0, int z0, int l, int i1, int j1) {
|
- protected Object computeNext() {
|
||||||
return () -> {
|
+ protected BlockPosition computeNext() { // Paper - decompile fix
|
||||||
return new AbstractIterator() {
|
return this.a();
|
||||||
private boolean g = true;
|
}
|
||||||
@@ -161,21 +161,21 @@ public class BlockPosition extends BaseBlockPosition {
|
};
|
||||||
protected BlockPosition a() {
|
@@ -209,8 +209,11 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
if (this.g) {
|
|
||||||
this.g = false;
|
|
||||||
- this.h = i;
|
|
||||||
- this.i = j;
|
|
||||||
- this.j = k;
|
|
||||||
- return new BlockPosition(i, j, k);
|
|
||||||
+ this.h = x0;
|
|
||||||
+ this.i = y0;
|
|
||||||
+ this.j = z0;
|
|
||||||
+ return new BlockPosition(x0, y0, z0);
|
|
||||||
} else if (this.h == l && this.i == i1 && this.j == j1) {
|
|
||||||
return (BlockPosition) this.endOfData();
|
|
||||||
} else {
|
|
||||||
if (this.h < l) {
|
|
||||||
++this.h;
|
|
||||||
} else if (this.i < i1) {
|
|
||||||
- this.h = i;
|
|
||||||
+ this.h = x0;
|
|
||||||
++this.i;
|
|
||||||
} else if (this.j < j1) {
|
|
||||||
- this.h = i;
|
|
||||||
- this.i = j;
|
|
||||||
+ this.h = x0;
|
|
||||||
+ this.i = y0;
|
|
||||||
++this.j;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -213,8 +213,11 @@ public class BlockPosition extends BaseBlockPosition {
|
|
||||||
if (this.g.b < l) {
|
if (this.g.b < l) {
|
||||||
++this.g.b;
|
++this.g.b;
|
||||||
} else if (this.g.c < i1) {
|
} else if (this.g.c < i1) {
|
||||||
+ this.g.b = i; // Paper - Readd line removed by the decompiler
|
+ this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
++this.g.c;
|
++this.g.c;
|
||||||
} else if (this.g.d < j1) {
|
} else if (this.g.d < j1) {
|
||||||
+ this.g.b = i; // Paper - Readd line removed by the decompiler
|
+ this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
+ this.g.c = j; // Paper - Readd line removed by the decompiler
|
+ this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
++this.g.d;
|
++this.g.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
@@ -219,7 +222,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
index 650ef14758..35aea4829f 100644
|
}
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
|
||||||
@@ -15,7 +15,7 @@ public class ChunkSection {
|
|
||||||
|
|
||||||
public ChunkSection(int i, boolean flag) {
|
// $FF: synthetic method
|
||||||
this.yPos = i;
|
- protected Object computeNext() {
|
||||||
- this.blockIds = new DataPaletteBlock(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData());
|
+ protected BlockPosition.MutableBlockPosition computeNext() { // Paper - decompile fix
|
||||||
+ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // Paper - Decompile error
|
return this.a();
|
||||||
this.emittedLight = new NibbleArray();
|
}
|
||||||
if (flag) {
|
};
|
||||||
this.skyLight = new NibbleArray();
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
index 20b1bc1b48..030ec87047 100644
|
index 3bd0c56d46..304e47bf20 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
@@ -75,14 +75,14 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -72,11 +72,11 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
public int onResize(int i, T t0) {
|
public int onResize(int ix, T object) {
|
||||||
this.b();
|
this.b();
|
||||||
DataBits databits = this.a;
|
DataBits databits = this.a;
|
||||||
- DataPalette datapalette = this.h;
|
- DataPalette datapalette = this.h;
|
||||||
+ DataPalette<T> datapalette = this.h; // Paper - decompile fix
|
+ DataPalette<T> datapalette = this.h; // Paper - decompile fix
|
||||||
|
this.b(ix);
|
||||||
|
|
||||||
this.b(i);
|
for(int jx = 0; jx < databits.b(); ++jx) {
|
||||||
|
- Object object1 = datapalette.a(databits.a(jx));
|
||||||
int j;
|
+ T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix
|
||||||
|
if (object1 != null) {
|
||||||
for (j = 0; j < databits.b(); ++j) {
|
this.setBlockIndex(jx, object1);
|
||||||
- Object object = datapalette.a(databits.a(j));
|
}
|
||||||
+ T object = datapalette.a(databits.a(j)); // Paper - decompile fix
|
@@ -103,7 +103,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
|
||||||
if (object != null) {
|
|
||||||
this.setBlockIndex(j, object);
|
|
||||||
@@ -111,7 +111,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected T a(int i) {
|
protected T a(int ix) {
|
||||||
- Object object = this.h.a(this.a.a(i));
|
- Object object = this.h.a(this.a.a(ix));
|
||||||
+ T object = this.h.a(this.a.a(i)); // Paper - decompile fix
|
+ T object = this.h.a(this.a.a(ix)); // Paper - decompile fix
|
||||||
|
return (T)(object == null ? this.g : object);
|
||||||
return object == null ? this.g : object;
|
|
||||||
}
|
}
|
||||||
@@ -138,7 +138,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
|
||||||
int j = along.length * 64 / 4096;
|
|
||||||
|
|
||||||
|
@@ -127,7 +127,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
long[] along = nbttagcompound.o(s1);
|
||||||
|
int jx = along.length * 64 / 4096;
|
||||||
if (this.h == this.b) {
|
if (this.h == this.b) {
|
||||||
- DataPaletteHash datapalettehash = new DataPaletteHash(this.d, i, this.c, this.e, this.f);
|
- DataPaletteHash datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f);
|
||||||
+ DataPaletteHash<T> datapalettehash = new DataPaletteHash<>(this.d, i, this.c, this.e, this.f); // Paper - decompile fix
|
+ DataPaletteHash<T> datapalettehash = new DataPaletteHash(this.d, ix, this.c, this.e, this.f); // Paper - decompile fix
|
||||||
|
|
||||||
datapalettehash.a(nbttaglist);
|
datapalettehash.a(nbttaglist);
|
||||||
DataBits databits = new DataBits(i, 4096, along);
|
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
|
diff --git a/src/main/java/net/minecraft/server/DedicatedPlayerList.java b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
index 1b91759cb2..ba1e38f8e0 100644
|
index 5eded6dc20..11f9642e6e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
--- a/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
+++ b/src/main/java/net/minecraft/server/DedicatedPlayerList.java
|
||||||
@@ -135,8 +135,4 @@ public class DedicatedPlayerList extends PlayerList {
|
@@ -136,7 +136,7 @@ public class DedicatedPlayerList extends PlayerList {
|
||||||
public boolean f(GameProfile gameprofile) {
|
|
||||||
return this.getOPs().b(gameprofile);
|
|
||||||
}
|
}
|
||||||
-
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public MinecraftServer getServer() {
|
- public MinecraftServer getServer() {
|
||||||
- return this.getServer();
|
+ public MinecraftServer getMinecraftServer() { // Paper - decompile fix
|
||||||
- }
|
return this.getServer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
index cd883e8529..bb1d00e440 100644
|
index 4dd4b01c82..987d944dbd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
@@ -88,7 +88,7 @@ public class DefinedStructure {
|
@@ -77,7 +77,7 @@ public class DefinedStructure {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) {
|
private void a(World world, BlockPosition blockposition, BlockPosition blockposition1) {
|
||||||
- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity) -> {
|
- List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1), (entity1) -> {
|
||||||
+ List list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1),(Predicate<? super Entity>) (entity) -> { // Paper - decompile fix
|
+ List<Entity> list = world.a(Entity.class, new AxisAlignedBB(blockposition, blockposition1),(java.util.function.Predicate<? super Entity>) (entity1) -> { // Paper - decompile fix
|
||||||
return !(entity instanceof EntityHuman);
|
return !(entity1 instanceof EntityHuman);
|
||||||
});
|
});
|
||||||
|
this.b.clear();
|
||||||
|
@@ -145,12 +145,12 @@ public class DefinedStructure {
|
||||||
|
if (this.a.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
- List list = definedstructureinfo.a(this.a, blockposition);
|
||||||
|
+ List<BlockInfo> list = definedstructureinfo.a(this.a, blockposition); // Paper - decompile fix
|
||||||
|
if ((!list.isEmpty() || !definedstructureinfo.h() && !this.b.isEmpty()) && this.c.getX() >= 1 && this.c.getY() >= 1 && this.c.getZ() >= 1) {
|
||||||
|
Block block = definedstructureinfo.i();
|
||||||
|
StructureBoundingBox structureboundingbox = definedstructureinfo.j();
|
||||||
|
- ArrayList arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0);
|
||||||
|
- ArrayList arraylist1 = Lists.newArrayListWithCapacity(list.size());
|
||||||
|
+ ArrayList<BlockPosition> arraylist = Lists.newArrayListWithCapacity(definedstructureinfo.m() ? list.size() : 0); // Paper - decompile fix
|
||||||
|
+ ArrayList<Pair> arraylist1 = Lists.newArrayListWithCapacity(list.size()); // Paper - decompile fix
|
||||||
|
int j = Integer.MAX_VALUE;
|
||||||
|
int k = Integer.MAX_VALUE;
|
||||||
|
int l = Integer.MAX_VALUE;
|
||||||
|
@@ -427,7 +427,7 @@ public class DefinedStructure {
|
||||||
|
nbttagcompound.set("blocks", new NBTTagList());
|
||||||
|
nbttagcompound.set("palette", new NBTTagList());
|
||||||
|
} else {
|
||||||
|
- ArrayList arraylist = Lists.newArrayList();
|
||||||
|
+ ArrayList<DefinedStructure.a> arraylist = Lists.newArrayList(); // Paper - decompile fix
|
||||||
|
DefinedStructure.a definedstructure$a = new DefinedStructure.a();
|
||||||
|
arraylist.add(definedstructure$a);
|
||||||
|
|
||||||
@@ -285,21 +285,24 @@ public class DefinedStructure {
|
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
voxelshapebitset.a(blockposition3.getX() - i2, blockposition3.getY() - j2, blockposition3.getZ() - l1, true, true);
|
index 5c2d50f974..fd6df39f17 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 {
|
||||||
|
public static void a(Map<Enchantment, Integer> map, ItemStack itemstack) {
|
||||||
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
|
|
||||||
- voxelshapebitset.a((enumdirection, i, j, k) -> {
|
- for(Entry entry : map.entrySet()) {
|
||||||
- BlockPosition blockposition = new BlockPosition(l + i, i1 + j, j1 + k);
|
+ for(Entry<Enchantment, Integer> entry : map.entrySet()) { // Paper - decompile fix
|
||||||
- BlockPosition blockposition1 = blockposition.shift(enumdirection);
|
Enchantment enchantment = (Enchantment)entry.getKey();
|
||||||
- IBlockData iblockdata = generatoraccess.getType(blockposition);
|
if (enchantment != null) {
|
||||||
+ // Paper start - decompile fixes
|
int i = entry.getValue();
|
||||||
+ int finalL = l1;
|
@@ -146,7 +146,7 @@ public class EnchantmentManager {
|
||||||
+ voxelshapebitset.a((enumdirection, i_, j_, k_) -> {
|
}
|
||||||
+ BlockPosition innerBlockposition = new BlockPosition(i2 + i_, j2 + j_, finalL + k_);
|
|
||||||
+ BlockPosition blockposition1 = innerBlockposition.shift(enumdirection);
|
|
||||||
+ IBlockData iblockdata = generatoraccess.getType(innerBlockposition);
|
|
||||||
IBlockData iblockdata1 = generatoraccess.getType(blockposition1);
|
|
||||||
- IBlockData iblockdata2 = iblockdata.updateState(enumdirection, iblockdata1, generatoraccess, blockposition, blockposition1);
|
|
||||||
+ IBlockData iblockdata2 = iblockdata.updateState(enumdirection, iblockdata1, generatoraccess, innerBlockposition, blockposition1);
|
|
||||||
|
|
||||||
if (iblockdata != iblockdata2) {
|
public static int a(Enchantment enchantment, EntityLiving entityliving) {
|
||||||
- generatoraccess.setTypeAndData(blockposition, iblockdata2, k1 & -2 | 16);
|
- List list = enchantment.a(entityliving);
|
||||||
+ generatoraccess.setTypeAndData(innerBlockposition, iblockdata2, i & -2 | 16);
|
+ List<ItemStack> list = enchantment.a(entityliving); // Paper - decompile fix
|
||||||
}
|
if (list == null) {
|
||||||
|
return 0;
|
||||||
|
} else {
|
||||||
|
@@ -224,7 +224,7 @@ public class EnchantmentManager {
|
||||||
|
}
|
||||||
|
|
||||||
- IBlockData iblockdata3 = iblockdata1.updateState(enumdirection.opposite(), iblockdata2, generatoraccess, blockposition1, blockposition);
|
public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) {
|
||||||
+ IBlockData iblockdata3 = iblockdata1.updateState(enumdirection.opposite(), iblockdata2, generatoraccess, blockposition1, innerBlockposition);
|
- List list = enchantment.a(entityliving);
|
||||||
|
+ List<ItemStack> list = enchantment.a(entityliving);// Paper - decompile fix
|
||||||
|
if (list.isEmpty()) {
|
||||||
|
return ItemStack.a;
|
||||||
|
} else {
|
||||||
|
@@ -260,7 +260,7 @@ public class EnchantmentManager {
|
||||||
|
}
|
||||||
|
|
||||||
if (iblockdata1 != iblockdata3) {
|
public static ItemStack a(Random random, ItemStack itemstack, int i, boolean flag) {
|
||||||
- generatoraccess.setTypeAndData(blockposition1, iblockdata3, k1 & -2 | 16);
|
- List list = b(random, itemstack, i, flag);
|
||||||
+ generatoraccess.setTypeAndData(blockposition1, iblockdata3, i & -2 | 16);
|
+ List<WeightedRandomEnchant> list = b(random, itemstack, i, flag); // Paper - decompile fix
|
||||||
+ // Paper end - decompile fixes
|
boolean flag1 = itemstack.getItem() == Items.BOOK;
|
||||||
}
|
if (flag1) {
|
||||||
|
itemstack = new ItemStack(Items.ENCHANTED_BOOK);
|
||||||
|
@@ -328,7 +328,7 @@ public class EnchantmentManager {
|
||||||
|
}
|
||||||
|
|
||||||
});
|
public static List<WeightedRandomEnchant> a(int i, ItemStack itemstack, boolean flag) {
|
||||||
@@ -734,7 +737,7 @@ public class DefinedStructure {
|
- ArrayList arraylist = Lists.newArrayList();
|
||||||
public IBlockData a(int i) {
|
+ ArrayList<WeightedRandomEnchant> arraylist = Lists.newArrayList();
|
||||||
IBlockData iblockdata = (IBlockData) this.b.fromId(i);
|
Item item = itemstack.getItem();
|
||||||
|
boolean flag1 = itemstack.getItem() == Items.BOOK;
|
||||||
|
|
||||||
- return iblockdata == null ? DefinedStructure.a.a : iblockdata;
|
diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
+ return iblockdata == null ? a : iblockdata; // Paper - decompile error - Blocks.AIR.getBlockData()
|
index 04cff50cb7..e746a6a0da 100644
|
||||||
}
|
--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
public Iterator<IBlockData> iterator() {
|
@@ -14,7 +14,7 @@ public class EntityDragonFireball extends EntityFireball {
|
||||||
|
protected void a(MovingObjectPosition movingobjectposition) {
|
||||||
|
if (movingobjectposition.entity == null || !movingobjectposition.entity.s(this.shooter)) {
|
||||||
|
if (!this.world.isClientSide) {
|
||||||
|
- List list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D));
|
||||||
|
+ List<EntityLiving> list = this.world.a(EntityLiving.class, this.getBoundingBox().grow(4.0D, 2.0D, 4.0D)); // Paper - decompile fix
|
||||||
|
EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.world, this.locX, this.locY, this.locZ);
|
||||||
|
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
|
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
index 188d49d820..854ad49b6c 100644
|
index 38c85f4ab7..c0853f0fcd 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
@@ -255,7 +255,7 @@ public enum EnumDirection implements INamable {
|
@@ -233,7 +233,7 @@ public enum EnumDirection implements INamable {
|
||||||
return Iterators.forArray(this.c);
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
|
- public boolean test(@Nullable Object object) {
|
||||||
|
+ public boolean test(@Nullable EnumDirection object) { // Paper - decompile fix
|
||||||
|
return super.a((EnumDirection)object);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
@@ -247,7 +247,7 @@ public enum EnumDirection implements INamable {
|
||||||
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
|
- public boolean test(@Nullable Object object) {
|
||||||
|
+ public boolean test(@Nullable EnumDirection object) { // Paper - decompile fix
|
||||||
|
return super.a((EnumDirection)object);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
@@ -261,7 +261,7 @@ public enum EnumDirection implements INamable {
|
||||||
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
|
- public boolean test(@Nullable Object object) {
|
||||||
|
+ public boolean test(@Nullable EnumDirection object) { // Paper - decompile fix
|
||||||
|
return super.a((EnumDirection)object);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
@@ -316,7 +316,7 @@ public enum EnumDirection implements INamable {
|
||||||
|
public abstract double a(double var1, double var3, double var5);
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public boolean test(@Nullable Object object) {
|
- public boolean test(@Nullable Object object) {
|
||||||
+ public boolean test(@Nullable EnumDirection object) { // Paper - Decompile fix
|
+ public boolean test(@Nullable EnumDirection object) { // Paper - decompile fix
|
||||||
return this.a((EnumDirection) object);
|
return this.a((EnumDirection)object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -293,9 +293,10 @@ public enum EnumDirection implements INamable {
|
@@ -367,7 +367,7 @@ public enum EnumDirection implements INamable {
|
||||||
return d0;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public boolean test(@Nullable Object object) {
|
|
||||||
- return super.a((EnumDirection) object);
|
|
||||||
- }
|
|
||||||
+ // Paper - Decompile fix
|
|
||||||
+ //public boolean test(@Nullable Object object) {
|
|
||||||
+ // return super.a((EnumDirection) object);
|
|
||||||
+ //}
|
|
||||||
},
|
|
||||||
Y("y") {
|
|
||||||
;
|
|
||||||
@@ -307,9 +308,10 @@ public enum EnumDirection implements INamable {
|
|
||||||
return d1;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public boolean test(@Nullable Object object) {
|
|
||||||
- return super.a((EnumDirection) object);
|
|
||||||
- }
|
|
||||||
+ // Paper - Decompile fix
|
|
||||||
+ //public boolean test(@Nullable Object object) {
|
|
||||||
+ // return super.a((EnumDirection) object);
|
|
||||||
+ //}
|
|
||||||
},
|
|
||||||
Z("z") {
|
|
||||||
;
|
|
||||||
@@ -321,9 +323,10 @@ public enum EnumDirection implements INamable {
|
|
||||||
return d2;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public boolean test(@Nullable Object object) {
|
|
||||||
- return super.a((EnumDirection) object);
|
|
||||||
- }
|
|
||||||
+ // Paper - Decompile fix
|
|
||||||
+ //public boolean test(@Nullable Object object) {
|
|
||||||
+ // return super.a((EnumDirection) object);
|
|
||||||
+ //}
|
|
||||||
};
|
|
||||||
|
|
||||||
private static final Map<String, EnumDirection.EnumAxis> d = (Map) Arrays.stream(values()).collect(Collectors.toMap(EnumDirection.EnumAxis::a, (enumdirection_enumaxis) -> {
|
|
||||||
@@ -377,7 +380,7 @@ public enum EnumDirection implements INamable {
|
|
||||||
|
|
||||||
public abstract double a(double d0, double d1, double d2);
|
|
||||||
|
|
||||||
- public boolean test(@Nullable Object object) {
|
|
||||||
+ public boolean test(@Nullable EnumDirection object) { // Paper - Decompile fix
|
|
||||||
return this.a((EnumDirection) object);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
|
- public boolean test(@Nullable Object object) {
|
||||||
|
+ public boolean test(@Nullable EnumDirection object) { // Paper - decompile fix
|
||||||
|
return this.a((EnumDirection)object);
|
||||||
|
}
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
index 8f06c58485..4361b2cee5 100644
|
index 0c9249cd8d..0648c76a07 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
@@ -34,7 +34,7 @@ public class LocaleLanguage {
|
@@ -27,7 +27,7 @@ public class LocaleLanguage {
|
||||||
Entry entry = (Entry) iterator.next();
|
JsonElement jsonelement = (JsonElement)(new Gson()).fromJson(new InputStreamReader(inputstream, StandardCharsets.UTF_8), JsonElement.class);
|
||||||
String s = LocaleLanguage.b.matcher(ChatDeserializer.a((JsonElement) entry.getValue(), (String) entry.getKey())).replaceAll("%$1s");
|
JsonObject jsonobject = ChatDeserializer.m(jsonelement, "strings");
|
||||||
|
|
||||||
- this.d.put(entry.getKey(), s);
|
- for(Entry entry : jsonobject.entrySet()) {
|
||||||
+ this.d.put((String) entry.getKey(), s); // Paper - Decompile fix
|
+ for(Entry<String, JsonElement> entry : jsonobject.entrySet()) {// Paper - Decompile fix
|
||||||
|
String s = b.matcher(ChatDeserializer.a((JsonElement)entry.getValue(), (String)entry.getKey())).replaceAll("%$1s");
|
||||||
|
this.d.put(entry.getKey(), s);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e = SystemUtils.b();
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
index 3cd5045636..3d501aee30 100644
|
index 9d01b70c7f..8daccdd6e9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
@@ -85,11 +85,11 @@ public abstract class LootSelectorEntry {
|
@@ -83,12 +83,12 @@ public abstract class LootSelectorEntry {
|
||||||
return jsonobject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||||
+ public JsonElement serialize(LootSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
+ public JsonElement serialize(LootSelectorEntry object, Type type, JsonSerializationContext jsonserializationcontext) {// Paper - Decompile fix
|
||||||
return this.a((LootSelectorEntry) object, type, jsonserializationcontext);
|
return this.a((LootSelectorEntry)object, type, jsonserializationcontext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||||
+ public LootSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
+ public LootSelectorEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {// Paper - Decompile fix
|
||||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
|
||||||
index 28fb88dade..5329102dd7 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
|
||||||
@@ -8,7 +8,7 @@ import java.util.function.IntPredicate;
|
|
||||||
public class MathHelper {
|
|
||||||
|
|
||||||
public static final float a = c(2.0F);
|
|
||||||
- private static final float[] b = (float[]) SystemUtils.a((Object) (new float[65536]), (afloat) -> {
|
|
||||||
+ private static final float[] b = (float[]) SystemUtils.a((new float[65536]), (afloat) -> { // Paper - Decompile fix
|
|
||||||
for (int i = 0; i < afloat.length; ++i) {
|
|
||||||
afloat[i] = (float) Math.sin((double) i * 3.141592653589793D * 2.0D / 65536.0D);
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
index 8170a84280..e21e60b003 100644
|
index 7e88bcd6e4..b98dfe27d5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||||
@@ -20,7 +20,7 @@ public interface NBTBase {
|
@@ -87,7 +87,7 @@ public interface NBTBase {
|
||||||
|
|
||||||
byte getTypeId();
|
|
||||||
|
|
||||||
- static default NBTBase createTag(byte b0) {
|
|
||||||
+ static NBTBase createTag(byte b0) { // Paper - decompile fix
|
|
||||||
switch (b0) {
|
|
||||||
case 0:
|
|
||||||
return new NBTTagEnd();
|
|
||||||
@@ -66,7 +66,7 @@ public interface NBTBase {
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- static default String n(int i) {
|
- NBTBase clone();
|
||||||
+ static String n(int i) { // Paper - decompile fix
|
+ public NBTBase clone(); // Paper - decompile fix
|
||||||
switch (i) {
|
|
||||||
case 0:
|
default String b_() {
|
||||||
return "TAG_End";
|
return this.toString();
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTList.java b/src/main/java/net/minecraft/server/NBTList.java
|
||||||
index 1a81d8e5f6..057c2077a0 100644
|
index 456b5f4925..54f2935c08 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTList.java
|
--- a/src/main/java/net/minecraft/server/NBTList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
+++ b/src/main/java/net/minecraft/server/NBTList.java
|
||||||
@@ -13,7 +13,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
@@ -25,6 +25,7 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||||
|
public abstract void b(int var1);
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
|
+ /* // Paper start- Decompile fix
|
||||||
|
public Object set(int i, Object object) {
|
||||||
|
return this.set(i, (NBTBase)object);
|
||||||
}
|
}
|
||||||
|
@@ -32,5 +33,9 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
||||||
public T set(int i, T t0) {
|
// $FF: synthetic method
|
||||||
- NBTBase nbtbase = this.get(i);
|
public Object get(int i) {
|
||||||
+ T nbtbase = this.get(i); // Paper - decompile fix
|
return this.get(i);
|
||||||
|
|
||||||
this.a(i, t0);
|
|
||||||
return nbtbase;
|
|
||||||
@@ -25,11 +25,5 @@ public abstract class NBTList<T extends NBTBase> extends AbstractList<T> impleme
|
|
||||||
|
|
||||||
public abstract void b(int i);
|
|
||||||
|
|
||||||
- public Object set(int i, Object object) {
|
|
||||||
- return this.set(i, (NBTBase) object);
|
|
||||||
- }
|
- }
|
||||||
-
|
+ }*/
|
||||||
- public Object get(int i) {
|
+
|
||||||
- return this.get(i);
|
+ @Override
|
||||||
- }
|
+ public abstract NBTBase clone();
|
||||||
+ public abstract NBTList<T> clone(); // Paper - decompile fix
|
+ // Paper end- Decompile fix
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagByteArray.java b/src/main/java/net/minecraft/server/NBTTagByteArray.java
|
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 11ffa6c342..5d61cf70bc 100644
|
||||||
|
@ -375,227 +345,134 @@ index f5c9b97d5c..d121ad4f7a 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
index b3c944d701..a8280acf94 100644
|
index 5b54cbde18..769d599c59 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
@@ -14,7 +14,7 @@ import org.apache.logging.log4j.Logger;
|
@@ -12,7 +12,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class NBTTagList extends NBTList<NBTBase> {
|
|
||||||
|
|
||||||
|
public class NBTTagList extends NBTList<NBTBase> {
|
||||||
private static final Logger f = LogManager.getLogger();
|
private static final Logger f = LogManager.getLogger();
|
||||||
- private List<NBTBase> list = Lists.newArrayList();
|
- private List<NBTBase> list = Lists.newArrayList();
|
||||||
+ public List<NBTBase> list = Lists.newArrayList(); // Paper
|
+ public List<NBTBase> list = Lists.newArrayList(); // Paper
|
||||||
private byte type = 0;
|
private byte type = 0;
|
||||||
|
|
||||||
public NBTTagList() {}
|
public NBTTagList() {
|
||||||
@@ -294,23 +294,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
@@ -286,6 +286,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||||
return this.type;
|
|
||||||
}
|
|
||||||
|
|
||||||
- public NBTBase clone() {
|
|
||||||
+ public NBTTagList clone() {
|
|
||||||
return this.c();
|
return this.c();
|
||||||
}
|
}
|
||||||
-
|
|
||||||
- public Object remove(int i) {
|
+ /* // Paper start - Decompile fix
|
||||||
- return this.remove(i);
|
// $FF: synthetic method
|
||||||
- }
|
public Object remove(int i) {
|
||||||
-
|
return this.remove(i);
|
||||||
- public Object set(int i, Object object) {
|
@@ -305,4 +306,5 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||||
- return this.set(i, (NBTBase) object);
|
public boolean add(Object object) {
|
||||||
- }
|
return this.add((NBTBase)object);
|
||||||
-
|
}
|
||||||
- public Object get(int i) {
|
+ */ // Paper end - Decompile fix
|
||||||
- return this.get(i);
|
|
||||||
- }
|
|
||||||
-
|
|
||||||
- public boolean add(Object object) {
|
|
||||||
- return this.add((NBTBase) object);
|
|
||||||
- }
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
diff --git a/src/main/java/net/minecraft/server/Registry.java b/src/main/java/net/minecraft/server/Registry.java
|
||||||
index 528eb255ec..541435d3e5 100644
|
index 5be9f0ff2f..9efec49d66 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
--- a/src/main/java/net/minecraft/server/Registry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
+++ b/src/main/java/net/minecraft/server/Registry.java
|
||||||
@@ -65,7 +65,7 @@ public class ProtoChunk implements IChunkAccess {
|
@@ -1,4 +1,8 @@
|
||||||
this.b = chunkcoordintpair;
|
package net.minecraft.server;
|
||||||
this.p = chunkconverter;
|
|
||||||
Predicate predicate = (block) -> {
|
|
||||||
- return block == null || block.getBlockData().isAir();
|
|
||||||
+ return block == null || ((Block) block).getBlockData().isAir(); // Paper - decompile fix
|
|
||||||
};
|
|
||||||
IRegistry iregistry = IRegistry.BLOCK;
|
|
||||||
|
|
||||||
@@ -325,8 +325,8 @@ public class ProtoChunk implements IChunkAccess {
|
-public interface Registry extends Iterable {
|
||||||
}
|
+import java.util.Iterator;
|
||||||
|
+public interface Registry<T> extends Iterable<T> { // Paper - decompile fix
|
||||||
private HeightMap c(HeightMap.Type heightmap_type) {
|
+
|
||||||
- return (HeightMap) this.f.computeIfAbsent(heightmap_type, (heightmap_type) -> {
|
+ @Override
|
||||||
- HeightMap heightmap = new HeightMap(this, heightmap_type);
|
+ Iterator<T> iterator(); // Paper - decompile fix
|
||||||
+ return (HeightMap) this.f.computeIfAbsent(heightmap_type, (heightmap_type1) -> { // Paper - decompile fix
|
}
|
||||||
+ HeightMap heightmap = new HeightMap(this, heightmap_type1); // Paper - decompile fix
|
|
||||||
|
|
||||||
heightmap.a();
|
|
||||||
return heightmap;
|
|
||||||
@@ -372,13 +372,13 @@ public class ProtoChunk implements IChunkAccess {
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
public LongSet b(String s) {
|
|
||||||
- return (LongSet) this.o.computeIfAbsent(s, (s) -> {
|
|
||||||
+ return (LongSet) this.o.computeIfAbsent(s, (s1) -> { // Paper - decompile fix
|
|
||||||
return new LongOpenHashSet();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void a(String s, long i) {
|
|
||||||
- ((LongSet) this.o.computeIfAbsent(s, (s) -> {
|
|
||||||
+ ((LongSet) this.o.computeIfAbsent(s, (s1) -> { // Paper - decompile fix
|
|
||||||
return new LongOpenHashSet();
|
|
||||||
})).add(i);
|
|
||||||
this.c = true;
|
|
||||||
@@ -493,7 +493,7 @@ public class ProtoChunk implements IChunkAccess {
|
|
||||||
}
|
|
||||||
|
|
||||||
public BitSet a(WorldGenStage.Features worldgenstage_features) {
|
|
||||||
- return (BitSet) this.t.computeIfAbsent(worldgenstage_features, (worldgenstage_features) -> {
|
|
||||||
+ return (BitSet) this.t.computeIfAbsent(worldgenstage_features, (worldgenstage_features1) -> { // Paper - decompile fix
|
|
||||||
return new BitSet(65536);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
index ef332d6517..7cc7eb7735 100644
|
index 8d1f9237aa..a21006290c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
@@ -8,7 +8,7 @@ import java.util.Iterator;
|
@@ -26,7 +26,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||||
import java.util.List;
|
this.b.put(object, i);
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
-public class RegistryBlockID<T> implements Registry<T> {
|
while(this.c.size() <= i) {
|
||||||
+public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
- this.c.add((Object)null);
|
||||||
|
|
||||||
private int a;
|
|
||||||
private final IdentityHashMap<T, Integer> b;
|
|
||||||
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
|
||||||
this.b.put(t0, Integer.valueOf(i));
|
|
||||||
|
|
||||||
while (this.c.size() <= i) {
|
|
||||||
- this.c.add((Object) null);
|
|
||||||
+ this.c.add(null); // Paper - decompile fix
|
+ this.c.add(null); // Paper - decompile fix
|
||||||
}
|
}
|
||||||
|
|
||||||
this.c.set(i, t0);
|
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
|
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
index 3b8f6ec167..bde5714dd6 100644
|
index 03c6033622..d03ac0e70c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
@@ -6,7 +6,7 @@ import java.util.Arrays;
|
@@ -49,7 +49,7 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
import java.util.Iterator;
|
|
||||||
import javax.annotation.Nullable;
|
|
||||||
|
|
||||||
-public class RegistryID<K> implements Registry<K> {
|
|
||||||
+public class RegistryID<K> implements Registry { // Paper - decompile fix
|
|
||||||
|
|
||||||
private static final Object a = null;
|
|
||||||
private K[] b;
|
|
||||||
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
|
|
||||||
|
|
||||||
public RegistryID(int i) {
|
|
||||||
i = (int) ((float) i / 0.8F);
|
|
||||||
- this.b = (Object[]) (new Object[i]);
|
|
||||||
+ this.b = (K[]) (new Object[i]); // Paper - decompile fix
|
|
||||||
this.c = new int[i];
|
|
||||||
- this.d = (Object[]) (new Object[i]);
|
|
||||||
+ this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
|
||||||
}
|
|
||||||
|
|
||||||
public int getId(@Nullable K k0) {
|
|
||||||
@@ -51,12 +51,12 @@ public class RegistryID<K> implements Registry<K> {
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void d(int i) {
|
private void d(int i) {
|
||||||
- Object[] aobject = this.b;
|
- Object[] aobject = this.b;
|
||||||
+ K[] aobject = this.b; // Paper - decompile fix
|
+ K[] aobject = this.b; // Paper - decompile fix
|
||||||
int[] aint = this.c;
|
int[] aint = this.c;
|
||||||
|
this.b = (K[])(new Object[i]);
|
||||||
- this.b = (Object[]) (new Object[i]);
|
|
||||||
+ this.b = (K[]) (new Object[i]); // Paper - decompile fix
|
|
||||||
this.c = new int[i];
|
this.c = new int[i];
|
||||||
- this.d = (Object[]) (new Object[i]);
|
|
||||||
+ this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
|
||||||
this.e = 0;
|
|
||||||
this.f = 0;
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
index 2179664a0c..d7e1ecc031 100644
|
index 7b8a8064b8..615aa2cd04 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
@@ -102,11 +102,11 @@ public class ServerPing {
|
@@ -101,12 +101,12 @@ public class ServerPing {
|
||||||
return jsonobject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||||
+ public JsonElement serialize(ServerPing object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
+ public JsonElement serialize(ServerPing object, Type type, JsonSerializationContext jsonserializationcontext) {// Paper - Decompile fix
|
||||||
return this.a((ServerPing) object, type, jsonserializationcontext);
|
return this.a((ServerPing)object, type, jsonserializationcontext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||||
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
+ public ServerPing deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {// Paper - Decompile fix
|
||||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -147,11 +147,11 @@ public class ServerPing {
|
@@ -145,12 +145,12 @@ public class ServerPing {
|
||||||
return jsonobject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||||
+ public JsonElement serialize(ServerPing.ServerData object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
+ public JsonElement serialize(ServerPing.ServerData object, Type type, JsonSerializationContext jsonserializationcontext) {// Paper - Decompile fix
|
||||||
return this.a((ServerPing.ServerData) object, type, jsonserializationcontext);
|
return this.a((ServerPing.ServerData)object, type, jsonserializationcontext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||||
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
+ public ServerPing.ServerData deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {// Paper - Decompile fix
|
||||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -235,11 +235,11 @@ public class ServerPing {
|
@@ -229,12 +229,12 @@ public class ServerPing {
|
||||||
return jsonobject;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) {
|
||||||
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample object, Type type, JsonSerializationContext jsonserializationcontext) { // Paper - decompile fix
|
+ public JsonElement serialize(ServerPing.ServerPingPlayerSample object, Type type, JsonSerializationContext jsonserializationcontext) {// Paper - Decompile fix
|
||||||
return this.a((ServerPing.ServerPingPlayerSample) object, type, jsonserializationcontext);
|
return this.a((ServerPing.ServerPingPlayerSample)object, type, jsonserializationcontext);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {
|
||||||
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // Paper - decompile fix
|
+ public ServerPing.ServerPingPlayerSample deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException {// Paper - Decompile fix
|
||||||
return this.a(jsonelement, type, jsondeserializationcontext);
|
return this.a(jsonelement, type, jsondeserializationcontext);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
index 43596cb2d5..3faf74a22f 100644
|
index ef9d8e06fe..0c9910d9a5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
@@ -171,7 +171,7 @@ public class ShapeDetector {
|
@@ -107,7 +107,7 @@ public class ShapeDetector {
|
||||||
return new ShapeDetectorBlock(this.a, blockposition, this.b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public Object load(Object object) throws Exception {
|
- public Object load(Object object) throws Exception {
|
||||||
+ public ShapeDetectorBlock load(BlockPosition object) throws Exception { // Paper - Decompile fix
|
+ public ShapeDetectorBlock load(BlockPosition object) throws Exception {// Paper - Decompile fix
|
||||||
return this.a((BlockPosition) object);
|
return this.a((BlockPosition)object);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
|
||||||
index 0b3141d3e7..700900256b 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
|
||||||
@@ -69,7 +69,7 @@ public abstract class VoxelShape {
|
|
||||||
ArrayList arraylist = Lists.newArrayList();
|
|
||||||
|
|
||||||
this.b((d0, d1, d2, d3, d4, d5) -> {
|
|
||||||
- list.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5));
|
|
||||||
+ arraylist.add(new AxisAlignedBB(d0, d1, d2, d3, d4, d5)); // Paper - decompile fix
|
|
||||||
});
|
|
||||||
return arraylist;
|
|
||||||
}
|
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,31 @@
|
||||||
From 00a8a9abe20b6993d8063665ac50086f2a36b3d4 Mon Sep 17 00:00:00 2001
|
From b5a8729e2faa400beaa6db9bf7b65d496ba30353 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||||
Subject: [PATCH] MC Utils
|
Subject: [PATCH] MC Utils
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 9f3aa2459..ca5c56c2b 100644
|
index 6ffc535146..5ed34cf7e3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -10,7 +10,7 @@ import org.apache.logging.log4j.Logger;
|
@@ -9,7 +9,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
|
||||||
@Immutable
|
@Immutable
|
||||||
public class BlockPosition extends BaseBlockPosition {
|
public class BlockPosition extends BaseBlockPosition {
|
||||||
|
|
||||||
- private static final Logger b = LogManager.getLogger();
|
- private static final Logger b = LogManager.getLogger();
|
||||||
+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used
|
+ //private static final Logger b = LogManager.getLogger(); // Paper - variable name conflict, logger isn't used
|
||||||
public static final BlockPosition ZERO = new BlockPosition(0, 0, 0);
|
public static final BlockPosition ZERO = new BlockPosition(0, 0, 0);
|
||||||
private static final int c = 1 + MathHelper.e(MathHelper.c(30000000));
|
private static final int c = 1 + MathHelper.e(MathHelper.c(30000000));
|
||||||
private static final int d = BlockPosition.c;
|
private static final int d = c;
|
||||||
@@ -45,6 +45,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -44,6 +44,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double) this.getX() + d0, (double) this.getY() + d1, (double) this.getZ() + d2);
|
return d0 == 0.0D && d1 == 0.0D && d2 == 0.0D ? this : new BlockPosition((double)this.getX() + d0, (double)this.getY() + d1, (double)this.getZ() + d2);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public BlockPosition add(int i, int j, int k) {return a(i, j, k);} // Paper - OBFHELPER
|
+ public BlockPosition add(int i, int j, int k) {return a(i, j, k);} // Paper - OBFHELPER
|
||||||
public BlockPosition a(int i, int j, int k) {
|
public BlockPosition a(int ix, int jx, int kx) {
|
||||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k);
|
return ix == 0 && jx == 0 && kx == 0 ? this : new BlockPosition(this.getX() + ix, this.getY() + jx, this.getZ() + kx);
|
||||||
}
|
}
|
||||||
@@ -385,6 +386,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -282,6 +283,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
return this.d;
|
return this.d;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ index 9f3aa2459..ca5c56c2b 100644
|
||||||
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
public BlockPosition.MutableBlockPosition c(int i, int j, int k) {
|
||||||
this.b = i;
|
this.b = i;
|
||||||
this.c = j;
|
this.c = j;
|
||||||
@@ -392,6 +394,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -289,6 +291,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ index 9f3aa2459..ca5c56c2b 100644
|
||||||
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
return this.c(MathHelper.floor(d0), MathHelper.floor(d1), MathHelper.floor(d2));
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index fe5328ef4..b7c40d5ce 100644
|
index fe5328ef47..b7c40d5ce6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
|
@@ -28,7 +28,7 @@ import com.google.common.collect.Lists; // CraftBukkit
|
||||||
|
@ -63,20 +63,20 @@ index fe5328ef4..b7c40d5ce 100644
|
||||||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
index 34586bca6..b0c004b1f 100644
|
index 744762b8b9..d9608121b6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||||
@@ -24,6 +24,8 @@ public class ChunkCoordIntPair {
|
@@ -23,6 +23,8 @@ public class ChunkCoordIntPair {
|
||||||
return a(this.x, this.z);
|
return a(this.x, this.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
|
+ public static long asLong(final BlockPosition pos) { return a(pos.getX() >> 4, pos.getZ() >> 4); } // Paper - OBFHELPER
|
||||||
+ public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER
|
+ public static long asLong(int x, int z) { return a(x, z); } // Paper - OBFHELPER
|
||||||
public static long a(int i, int j) {
|
public static long a(int i, int j) {
|
||||||
return (long) i & 4294967295L | ((long) j & 4294967295L) << 32;
|
return (long)i & 4294967295L | ((long)j & 4294967295L) << 32;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
index 3b6b3b9a9..22af9c188 100644
|
index 3b6b3b9a99..22af9c1885 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
@@ -16,7 +16,7 @@ import org.apache.logging.log4j.Logger;
|
@@ -16,7 +16,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
@ -89,10 +89,10 @@ index 3b6b3b9a9..22af9c188 100644
|
||||||
private final IChunkLoader e;
|
private final IChunkLoader e;
|
||||||
private final IAsyncTaskHandler f;
|
private final IAsyncTaskHandler f;
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
index d24ec3d53..9e83610f1 100644
|
index 95ca5f6d80..0dc948a375 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
@@ -60,6 +60,7 @@ public class DataBits {
|
@@ -54,6 +54,7 @@ public class DataBits {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,34 +101,37 @@ index d24ec3d53..9e83610f1 100644
|
||||||
return this.a;
|
return this.a;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
index dae40b9cd..0be0b0ef5 100644
|
index 7f905b1e09..5a88e8c911 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||||
@@ -4,8 +4,10 @@ import javax.annotation.Nullable;
|
@@ -3,10 +3,11 @@ package net.minecraft.server;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public interface DataPalette<T> {
|
public interface DataPalette<T> {
|
||||||
|
|
||||||
+ default int getDataBits(T object) { return this.a(object); } // Paper - OBFHELPER
|
+ default int getDataBits(T object) { return this.a(object); } // Paper - OBFHELPER
|
||||||
int a(T t0);
|
int a(T var1);
|
||||||
|
|
||||||
|
- @Nullable
|
||||||
|
- T a(int var1);
|
||||||
+ @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER
|
+ @Nullable default T getObject(int dataBits) { return this.a(dataBits); } // Paper - OBFHELPER
|
||||||
@Nullable
|
+ @Nullable T a(int var1);
|
||||||
T a(int i);
|
|
||||||
|
void b(PacketDataSerializer var1);
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
index 030ec8704..575f9b558 100644
|
index 304e47bf20..6e7454b134 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
@@ -9,7 +9,7 @@ import java.util.stream.Collectors;
|
@@ -7,7 +7,7 @@ import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
|
|
||||||
- private final DataPalette<T> b;
|
- private final DataPalette<T> b;
|
||||||
+ private final DataPalette<T> b; private final DataPalette<T> getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER
|
+ private final DataPalette<T> b;private final DataPalette<T> getDataPaletteGlobal() { return this.b; } // Paper - OBFHELPER
|
||||||
private final DataPaletteExpandable<T> c = (i, object) -> {
|
private final DataPaletteExpandable<T> c = (var0, var1) -> {
|
||||||
return 0;
|
return 0;
|
||||||
};
|
};
|
||||||
@@ -17,9 +17,9 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -15,9 +15,9 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
private final Function<NBTTagCompound, T> e;
|
private final Function<NBTTagCompound, T> e;
|
||||||
private final Function<T, NBTTagCompound> f;
|
private final Function<T, NBTTagCompound> f;
|
||||||
private final T g;
|
private final T g;
|
||||||
|
@ -141,16 +144,16 @@ index 030ec8704..575f9b558 100644
|
||||||
private final ReentrantLock j = new ReentrantLock();
|
private final ReentrantLock j = new ReentrantLock();
|
||||||
|
|
||||||
private void b() {
|
private void b() {
|
||||||
@@ -54,6 +54,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -51,6 +51,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
return j << 8 | k << 4 | i;
|
return jx << 8 | k << 4 | ix;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ private void initialize(int bitsPerObject) { this.b(bitsPerObject); } // Paper - OBFHELPER
|
+ private void initialize(int bitsPerObject) { this.b(bitsPerObject); } // Paper - OBFHELPER
|
||||||
private void b(int i) {
|
private void b(int ix) {
|
||||||
if (i != this.i) {
|
if (ix != this.i) {
|
||||||
this.i = i;
|
this.i = ix;
|
||||||
@@ -116,6 +117,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -107,6 +108,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
return object == null ? this.g : object;
|
return (T)(object == null ? this.g : object);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
+ public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
||||||
|
@ -158,43 +161,56 @@ index 030ec8704..575f9b558 100644
|
||||||
this.b();
|
this.b();
|
||||||
packetdataserializer.writeByte(this.i);
|
packetdataserializer.writeByte(this.i);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
index 2c6fbd1d6..3790039f1 100644
|
index 2c6fbd1d6f..a5c147b989 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
@@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
@@ -6,6 +6,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||||
|
|
||||||
public abstract class EntityCreature extends EntityInsentient {
|
public abstract class EntityCreature extends EntityInsentient {
|
||||||
|
|
||||||
+ public org.bukkit.craftbukkit.entity.CraftCreature getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
|
+ public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
|
||||||
private BlockPosition a;
|
private BlockPosition a;
|
||||||
private float b;
|
private float b;
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
|
index ebb177927f..60b1dcd8ea 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
|
@@ -124,6 +124,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
|
return this.goalTarget;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public org.bukkit.craftbukkit.entity.CraftMob getBukkitMob() { return (org.bukkit.craftbukkit.entity.CraftMob) super.getBukkitEntity(); } // Paper
|
||||||
|
public void setGoalTarget(@Nullable EntityLiving entityliving) {
|
||||||
|
// CraftBukkit start - fire event
|
||||||
|
setGoalTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index fd050c5f3..91c478588 100644
|
index fd050c5f32..8d33c16580 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -122,6 +122,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
public org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
public org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||||
public boolean collides = true;
|
public boolean collides = true;
|
||||||
public boolean canPickUpLoot;
|
public boolean canPickUpLoot;
|
||||||
+ public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
|
+ public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public float getBukkitYaw() {
|
public float getBukkitYaw() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
index 96e012215..a3449e9a8 100644
|
index c0f48bbc29..f3cc2cef0a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
@@ -1,6 +1,8 @@
|
||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
public abstract class EntityMonster extends EntityCreature implements IMonster {
|
public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||||
|
+
|
||||||
+ public org.bukkit.craftbukkit.entity.CraftMonster getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftMonster) super.getBukkitEntity(); } // Paper
|
+ public org.bukkit.craftbukkit.entity.CraftMonster getBukkitMonster() { return (org.bukkit.craftbukkit.entity.CraftMonster) super.getBukkitEntity(); } // Paper
|
||||||
protected EntityMonster(EntityTypes<?> entitytypes, World world) {
|
protected EntityMonster(EntityTypes<?> entitytypes, World world) {
|
||||||
super(entitytypes, world);
|
super(entitytypes, world);
|
||||||
this.b_ = 5;
|
this.b_ = 5;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
index 17bfa356f..5c1ab6a0b 100644
|
index 17bfa356f1..5c1ab6a0b6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||||
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
@@ -3,6 +3,7 @@ package net.minecraft.server;
|
||||||
|
@ -245,7 +261,7 @@ index 17bfa356f..5c1ab6a0b 100644
|
||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
index c54275bc2..318c4204d 100644
|
index c54275bc2f..318c4204df 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||||
@@ -26,6 +26,7 @@ import org.bukkit.TreeType;
|
@@ -26,6 +26,7 @@ import org.bukkit.TreeType;
|
||||||
|
@ -276,7 +292,7 @@ index c54275bc2..318c4204d 100644
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..9f9341c98
|
index 0000000000..9f9341c98f
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||||
@@ -0,0 +1,296 @@
|
@@ -0,0 +1,296 @@
|
||||||
|
@ -577,19 +593,19 @@ index 000000000..9f9341c98
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
index 7fc9b5ff3..e658816c2 100644
|
index 41cd3ceabe..2a66a30264 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
@@ -24,7 +24,7 @@ public class NBTTagCompound implements NBTBase {
|
@@ -23,7 +23,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
public class NBTTagCompound implements NBTBase {
|
||||||
private static final Logger f = LogManager.getLogger();
|
private static final Logger f = LogManager.getLogger();
|
||||||
private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+");
|
private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+");
|
||||||
- private final Map<String, NBTBase> map = Maps.newHashMap();
|
- private final Map<String, NBTBase> map = Maps.newHashMap();
|
||||||
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
|
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
|
||||||
|
|
||||||
public NBTTagCompound() {}
|
public NBTTagCompound() {
|
||||||
|
}
|
||||||
@@ -96,11 +96,13 @@ public class NBTTagCompound implements NBTBase {
|
@@ -89,11 +89,13 @@ public class NBTTagCompound implements NBTBase {
|
||||||
this.map.put(s, new NBTTagLong(i));
|
this.map.put(s, new NBTTagLong(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,17 +619,26 @@ index 7fc9b5ff3..e658816c2 100644
|
||||||
@Nullable
|
@Nullable
|
||||||
public UUID a(String s) {
|
public UUID a(String s) {
|
||||||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||||
@@ -492,8 +494,4 @@ public class NBTTagCompound implements NBTBase {
|
@@ -322,7 +324,7 @@ public class NBTTagCompound implements NBTBase {
|
||||||
return chatcomponenttext;
|
|
||||||
}
|
public String toString() {
|
||||||
|
StringBuilder stringbuilder = new StringBuilder("{");
|
||||||
|
- Object object = this.map.keySet();
|
||||||
|
+ Collection<String> object = this.map.keySet(); // Paper - decompile fix
|
||||||
|
if (f.isDebugEnabled()) {
|
||||||
|
ArrayList arraylist = Lists.newArrayList(this.map.keySet());
|
||||||
|
Collections.sort(arraylist);
|
||||||
|
@@ -476,7 +478,7 @@ public class NBTTagCompound implements NBTBase {
|
||||||
}
|
}
|
||||||
-
|
|
||||||
|
// $FF: synthetic method
|
||||||
- public NBTBase clone() {
|
- public NBTBase clone() {
|
||||||
- return this.clone();
|
+ public NBTBase clone_bad() { // Paper - decompile fix
|
||||||
- }
|
return this.clone();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index 0afaea810..26da89724 100644
|
index 0afaea8109..26da897243 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -44,7 +44,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
@ -654,7 +679,7 @@ index 0afaea810..26da89724 100644
|
||||||
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||||
this.a = packet;
|
this.a = packet;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
index d04afceb7..a63a5811d 100644
|
index d04afceb70..a63a5811d6 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
--- a/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
+++ b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||||
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
@@ -33,6 +33,7 @@ public class PacketDataSerializer extends ByteBuf {
|
||||||
|
@ -666,10 +691,10 @@ index d04afceb7..a63a5811d 100644
|
||||||
for (int j = 1; j < 5; ++j) {
|
for (int j = 1; j < 5; ++j) {
|
||||||
if ((i & -1 << j * 7) == 0) {
|
if ((i & -1 << j * 7) == 0) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
index a8363f47b..33436ac65 100644
|
index 12d6c99cf0..af382815f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
@@ -13,7 +13,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -11,7 +11,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
private int a;
|
private int a;
|
||||||
private int b;
|
private int b;
|
||||||
private int c;
|
private int c;
|
||||||
|
@ -678,7 +703,7 @@ index a8363f47b..33436ac65 100644
|
||||||
private List<NBTTagCompound> e;
|
private List<NBTTagCompound> e;
|
||||||
private boolean f;
|
private boolean f;
|
||||||
|
|
||||||
@@ -97,6 +97,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -85,6 +85,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
return bytebuf;
|
return bytebuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -687,7 +712,7 @@ index a8363f47b..33436ac65 100644
|
||||||
int j = 0;
|
int j = 0;
|
||||||
ChunkSection[] achunksection = chunk.getSections();
|
ChunkSection[] achunksection = chunk.getSections();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 43bd6aba9..7dee734a7 100644
|
index d465608f37..1c57f6e738 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -68,9 +68,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -68,9 +68,9 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||||
|
@ -704,10 +729,10 @@ index 43bd6aba9..7dee734a7 100644
|
||||||
private volatile int chatThrottle;
|
private volatile int chatThrottle;
|
||||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
index 7cc7eb773..a804a67e1 100644
|
index a21006290c..6c6f006f3a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||||
@@ -56,6 +56,7 @@ public class RegistryBlockID<T> implements Registry { // Paper - decompile fix
|
@@ -54,6 +54,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||||
return Iterators.filter(this.c.iterator(), Predicates.notNull());
|
return Iterators.filter(this.c.iterator(), Predicates.notNull());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4292492f940a001ab9538708c54fd6525c918f99 Mon Sep 17 00:00:00 2001
|
From e4063a497d5fc1ab2b32054b7277edbb39807d03 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||||
Subject: [PATCH] Timings v2
|
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
|
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..984044b0
|
index 0000000000..984044b02a
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
|
||||||
@@ -0,0 +1,129 @@
|
@@ -0,0 +1,129 @@
|
||||||
|
@ -141,7 +141,7 @@ index 00000000..984044b0
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
diff --git a/src/main/java/co/aikar/timings/WorldTimingsHandler.java b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 00000000..145cb274
|
index 0000000000..145cb274b0
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
+++ b/src/main/java/co/aikar/timings/WorldTimingsHandler.java
|
||||||
@@ -0,0 +1,104 @@
|
@@ -0,0 +1,104 @@
|
||||||
|
@ -250,7 +250,7 @@ index 00000000..145cb274
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
index d2efcca8..4812da0d 100644
|
index d2efcca80a..4812da0dac 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||||
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
|
@@ -14,11 +14,14 @@ import java.util.concurrent.TimeUnit;
|
||||||
|
@ -294,7 +294,7 @@ index d2efcca8..4812da0d 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||||
index 8811dbc9..7818a3b6 100644
|
index 8811dbc9b3..7818a3b6a7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Block.java
|
--- a/src/main/java/net/minecraft/server/Block.java
|
||||||
+++ b/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 {
|
@@ -23,6 +23,15 @@ public class Block implements IMaterial {
|
||||||
|
@ -314,7 +314,7 @@ index 8811dbc9..7818a3b6 100644
|
||||||
private final float frictionFactor;
|
private final float frictionFactor;
|
||||||
protected final BlockStateList<Block, IBlockData> blockStateList;
|
protected final BlockStateList<Block, IBlockData> blockStateList;
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkMap.java b/src/main/java/net/minecraft/server/ChunkMap.java
|
||||||
index e3d1761b..fbebd459 100644
|
index e3d1761b49..fbebd4591c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkMap.java
|
--- a/src/main/java/net/minecraft/server/ChunkMap.java
|
||||||
+++ b/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> {
|
@@ -14,6 +14,7 @@ public class ChunkMap extends Long2ObjectOpenHashMap<Chunk> {
|
||||||
|
@ -345,7 +345,7 @@ index e3d1761b..fbebd459 100644
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 9e805c5d..0034956a 100644
|
index 9e805c5d22..0034956af9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/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 {
|
@@ -90,7 +90,7 @@ public class ChunkProviderServer implements IChunkProvider {
|
||||||
|
@ -386,7 +386,7 @@ index 9e805c5d..0034956a 100644
|
||||||
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
|
this.chunkLoader.saveChunk(this.world, ichunkaccess, unloaded); // Spigot
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index df07b2b8..f969c036 100644
|
index df07b2b889..f969c036f3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -433,7 +433,7 @@ index df07b2b8..f969c036 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
|
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
index b7cdc495..8b9b076d 100644
|
index b7cdc495a3..8b9b076ded 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CustomFunction.java
|
--- a/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
|
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||||
@@ -13,12 +13,22 @@ public class CustomFunction {
|
@@ -13,12 +13,22 @@ public class CustomFunction {
|
||||||
|
@ -460,7 +460,7 @@ index b7cdc495..8b9b076d 100644
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||||
index 4d7e1517..40ff72f7 100644
|
index 4d7e151793..40ff72f725 100644
|
||||||
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||||
+++ b/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 {
|
@@ -109,7 +109,7 @@ public class CustomFunctionData implements ITickable, IResourcePackListener {
|
||||||
|
@ -473,7 +473,7 @@ index 4d7e1517..40ff72f7 100644
|
||||||
int j = 0;
|
int j = 0;
|
||||||
CustomFunction.c[] acustomfunction_c = customfunction.b();
|
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
|
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
index efa738d4..dabad6b0 100644
|
index efa738d4ec..dabad6b055 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||||
+++ b/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;
|
@@ -29,7 +29,7 @@ import org.apache.logging.log4j.Level;
|
||||||
|
@ -526,7 +526,7 @@ index efa738d4..dabad6b0 100644
|
||||||
return waitable.get();
|
return waitable.get();
|
||||||
} catch (java.util.concurrent.ExecutionException e) {
|
} 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
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||||
index 591ae114..ec5c9fd7 100644
|
index 591ae114cf..ec5c9fd735 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||||
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
||||||
|
@ -565,7 +565,7 @@ index 591ae114..ec5c9fd7 100644
|
||||||
|
|
||||||
protected float ab() {
|
protected float ab() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 91c47858..8a41a1dc 100644
|
index 8d33c16580..603208caf8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
@@ -32,7 +32,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||||
|
@ -641,7 +641,7 @@ index 91c47858..8a41a1dc 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTracker.java b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
index ae31935c..70c9b1f5 100644
|
index ae31935c48..70c9b1f50c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
--- a/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
+++ b/src/main/java/net/minecraft/server/EntityTracker.java
|
||||||
@@ -168,7 +168,7 @@ public class EntityTracker {
|
@@ -168,7 +168,7 @@ public class EntityTracker {
|
||||||
|
@ -672,7 +672,7 @@ index ae31935c..70c9b1f5 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 2c69e682..0ebe7546 100644
|
index 2c69e68276..0ebe754619 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -825,7 +825,7 @@ index 2c69e682..0ebe7546 100644
|
||||||
this.methodProfiler.e();
|
this.methodProfiler.e();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
index ac6d8cc6..d975c2cc 100644
|
index ac6d8cc6e6..d975c2ccf1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -919,7 +919,7 @@ index ac6d8cc6..d975c2cc 100644
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 7dee734a..37284fae 100644
|
index 1c57f6e738..ca19c6c172 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory;
|
@@ -59,6 +59,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||||
|
@ -958,19 +958,17 @@ index 7dee734a..37284fae 100644
|
||||||
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
|
// this.minecraftServer.getCommandDispatcher().a(this.player.getCommandListener(), s);
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
index 889b3228..69da194f 100644
|
index 616797dc6e..3a5daf6705 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnectionUtils.java
|
||||||
@@ -1,11 +1,17 @@
|
@@ -1,10 +1,16 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
+import co.aikar.timings.MinecraftTimings; // Paper
|
+import co.aikar.timings.MinecraftTimings; // Paper
|
||||||
+import co.aikar.timings.Timing; // Paper
|
+import co.aikar.timings.Timing; // Paper
|
||||||
+
|
+
|
||||||
public class PlayerConnectionUtils {
|
public class PlayerConnectionUtils {
|
||||||
|
public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T packetlistener, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException {
|
||||||
- public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T t0, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException {
|
|
||||||
+ public static <T extends PacketListener> void ensureMainThread(Packet<T> packet, T packetlistener, IAsyncTaskHandler iasynctaskhandler) throws CancelledPacketHandleException { // Paper fix name of param
|
|
||||||
if (!iasynctaskhandler.isMainThread()) {
|
if (!iasynctaskhandler.isMainThread()) {
|
||||||
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper
|
+ Timing timing = MinecraftTimings.getPacketTiming(packet); // Paper
|
||||||
iasynctaskhandler.postToMainThread(() -> {
|
iasynctaskhandler.postToMainThread(() -> {
|
||||||
|
@ -981,7 +979,7 @@ index 889b3228..69da194f 100644
|
||||||
throw CancelledPacketHandleException.INSTANCE;
|
throw CancelledPacketHandleException.INSTANCE;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
index ead9697e..26df2ff3 100644
|
index ead9697e65..26df2ff32f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1005,7 +1003,7 @@ index ead9697e..26df2ff3 100644
|
||||||
|
|
||||||
public WhiteList getWhitelist() {
|
public WhiteList getWhitelist() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
diff --git a/src/main/java/net/minecraft/server/TickListServer.java b/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
index a0789593..ee5c2421 100644
|
index a07895935e..ee5c2421bb 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
--- a/src/main/java/net/minecraft/server/TickListServer.java
|
||||||
+++ b/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> {
|
@@ -24,13 +24,19 @@ public class TickListServer<T> implements TickList<T> {
|
||||||
|
@ -1059,7 +1057,7 @@ index a0789593..ee5c2421 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
index c6920949..68ac014a 100644
|
index c69209497b..68ac014aab 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||||
+++ b/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;
|
@@ -4,12 +4,13 @@ import javax.annotation.Nullable;
|
||||||
|
@ -1079,7 +1077,7 @@ index c6920949..68ac014a 100644
|
||||||
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
|
private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
|
||||||
protected World world;
|
protected World world;
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 02867837..c3c435ca 100644
|
index 169294b3c3..2f7fab0907 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1194,7 +1192,7 @@ index 02867837..c3c435ca 100644
|
||||||
|
|
||||||
public boolean a(@Nullable Entity entity, VoxelShape voxelshape) {
|
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
|
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
index c276c259..badec349 100644
|
index c276c259ae..badec349b7 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1301,7 +1299,7 @@ index c276c259..badec349 100644
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
index 46a9ff94..9ba50a2d 100644
|
index 46a9ff9482..9ba50a2daa 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||||
@@ -1867,12 +1867,31 @@ public final class CraftServer implements Server {
|
@@ -1867,12 +1867,31 @@ public final class CraftServer implements Server {
|
||||||
|
@ -1338,7 +1336,7 @@ index 46a9ff94..9ba50a2d 100644
|
||||||
org.spigotmc.RestartCommand.restart();
|
org.spigotmc.RestartCommand.restart();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||||
deleted file mode 100644
|
deleted file mode 100644
|
||||||
index 4c8ab2bc..00000000
|
index 4c8ab2bc97..0000000000
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||||
+++ /dev/null
|
+++ /dev/null
|
||||||
@@ -1,174 +0,0 @@
|
@@ -1,174 +0,0 @@
|
||||||
|
@ -1517,7 +1515,7 @@ index 4c8ab2bc..00000000
|
||||||
- }
|
- }
|
||||||
-}
|
-}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
index 413dd35f..52a8c48f 100644
|
index 413dd35f06..52a8c48fa4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
--- a/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/chunkio/ChunkIOProvider.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
|
@ -1553,7 +1551,7 @@ index 413dd35f..52a8c48f 100644
|
||||||
|
|
||||||
public void callStage3(QueuedChunk queuedChunk, Chunk chunk, Runnable runnable) throws RuntimeException {
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 9f78f2c4..b8bdcb6b 100644
|
index 9f78f2c4ae..b8bdcb6b74 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
@@ -1715,6 +1715,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1715,6 +1715,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
|
@ -1570,7 +1568,7 @@ index 9f78f2c4..b8bdcb6b 100644
|
||||||
|
|
||||||
public Player.Spigot spigot()
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
index f11bd754..93b9134d 100644
|
index f11bd7545f..93b9134d6e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
@@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
@@ -14,6 +14,7 @@ import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
@ -1646,7 +1644,7 @@ index f11bd754..93b9134d 100644
|
||||||
|
|
||||||
private boolean isReady(final int currentTick) {
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
index 7e7ce9a8..46029ce2 100644
|
index 7e7ce9a81b..46029ce246 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
|
||||||
@@ -1,8 +1,8 @@
|
@@ -1,8 +1,8 @@
|
||||||
|
@ -1728,7 +1726,7 @@ index 7e7ce9a8..46029ce2 100644
|
||||||
- // Spigot end
|
- // Spigot end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java b/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||||
index e52ef47b..3d90b342 100644
|
index e52ef47b78..3d90b34268 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
||||||
+++ b/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;
|
@@ -5,6 +5,7 @@ import org.bukkit.util.CachedServerIcon;
|
||||||
|
@ -1740,7 +1738,7 @@ index e52ef47b..3d90b342 100644
|
||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
index e60fe5a9..f68e42c4 100644
|
index e60fe5a920..f68e42c4d4 100644
|
||||||
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
--- a/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||||
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;
|
@@ -30,7 +30,7 @@ import net.minecraft.server.EntityWither;
|
||||||
|
@ -1801,5 +1799,5 @@ index e60fe5a9..f68e42c4 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.16.2.windows.1
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 4796b2090e28ed3bbd5f9c26752a9e2d31763434 Mon Sep 17 00:00:00 2001
|
From f7425160315958110c7f90c5248e4b681133ef3f Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
||||||
Subject: [PATCH] Allow nerfed mobs to jump
|
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
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index cacf58607c..de8680e4dd 100644
|
index a55163a458..341038fc4d 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -87,4 +87,9 @@ public class PaperWorldConfig {
|
@@ -87,4 +87,9 @@ public class PaperWorldConfig {
|
||||||
|
@ -19,10 +19,10 @@ index cacf58607c..de8680e4dd 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
|
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
|
||||||
index 4ed5192c65..489beed269 100644
|
index 74a40671e9..5d6260ded1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ControllerJump.java
|
--- a/src/main/java/net/minecraft/server/ControllerJump.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ControllerJump.java
|
+++ b/src/main/java/net/minecraft/server/ControllerJump.java
|
||||||
@@ -13,6 +13,7 @@ public class ControllerJump {
|
@@ -12,6 +12,7 @@ public class ControllerJump {
|
||||||
this.a = true;
|
this.a = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ index 4ed5192c65..489beed269 100644
|
||||||
this.b.o(this.a);
|
this.b.o(this.a);
|
||||||
this.a = false;
|
this.a = false;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index 25413c70b5..6e324ad589 100644
|
index 60b1dcd8ea..cc74150dae 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/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 {
|
@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
|
@ -42,7 +42,7 @@ index 25413c70b5..6e324ad589 100644
|
||||||
public PathfinderGoalSelector targetSelector;
|
public PathfinderGoalSelector targetSelector;
|
||||||
private EntityLiving goalTarget;
|
private EntityLiving goalTarget;
|
||||||
private final EntitySenses bC;
|
private final EntitySenses bC;
|
||||||
@@ -646,6 +647,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -647,6 +648,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
if ( this.fromMobSpawner )
|
if ( this.fromMobSpawner )
|
||||||
{
|
{
|
||||||
|
@ -56,10 +56,10 @@ index 25413c70b5..6e324ad589 100644
|
||||||
}
|
}
|
||||||
// Spigot End
|
// Spigot End
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
index 0d95051383..38a0b2db1e 100644
|
index 15c04f890d..7db180fa90 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||||
@@ -6,14 +6,17 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
@@ -5,14 +5,17 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||||
|
|
||||||
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||||
this.a = entityinsentient;
|
this.a = entityinsentient;
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From e8b18bc8a81789c57bb9b9af47ba408d3fb10756 Mon Sep 17 00:00:00 2001
|
From 96a39a206b1aa7c7e2352d77ddde5cac303fc270 Mon Sep 17 00:00:00 2001
|
||||||
From: Suddenly <suddenly@suddenly.coffee>
|
From: Suddenly <suddenly@suddenly.coffee>
|
||||||
Date: Tue, 1 Mar 2016 13:51:54 -0600
|
Date: Tue, 1 Mar 2016 13:51:54 -0600
|
||||||
Subject: [PATCH] Add configurable despawn distances for living entities
|
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
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index de8680e4dd..02f7e506e3 100644
|
index 341038fc4d..3e1f4be10f 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -92,4 +92,20 @@ public class PaperWorldConfig {
|
@@ -92,4 +92,20 @@ public class PaperWorldConfig {
|
||||||
|
@ -30,10 +30,10 @@ index de8680e4dd..02f7e506e3 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index 6e324ad589..98b28e8573 100644
|
index cc74150dae..9e95ede7fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -625,13 +625,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -626,13 +626,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
double d2 = entityhuman.locZ - this.locZ;
|
double d2 = entityhuman.locZ - this.locZ;
|
||||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From ecb394dbc65b8055e6ad852c4544a8a396f94577 Mon Sep 17 00:00:00 2001
|
From efeb6f9214e94370e797ab1ea0dd4350515ee516 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 1 Mar 2016 14:32:43 -0600
|
Date: Tue, 1 Mar 2016 14:32:43 -0600
|
||||||
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||||
|
@ -6,17 +6,17 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
diff --git a/src/main/java/net/minecraft/server/EULA.java b/src/main/java/net/minecraft/server/EULA.java
|
||||||
index 220ca7bca0..eb4b08be46 100644
|
index b64cac2523..cc333de50b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EULA.java
|
--- a/src/main/java/net/minecraft/server/EULA.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EULA.java
|
+++ b/src/main/java/net/minecraft/server/EULA.java
|
||||||
@@ -52,13 +52,12 @@ public class EULA {
|
@@ -49,13 +49,12 @@ public class EULA {
|
||||||
|
Properties properties = new Properties();
|
||||||
fileoutputstream = new FileOutputStream(this.b);
|
fileoutputstream = new FileOutputStream(this.b);
|
||||||
properties.setProperty("eula", "false");
|
properties.setProperty("eula", "false");
|
||||||
- properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
|
- properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).");
|
||||||
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag);
|
+ properties.store(fileoutputstream, "By changing the setting below to TRUE you are indicating your agreement to our EULA (https://account.mojang.com/documents/minecraft_eula).\nYou also agree that tacos are tasty, and the best food in the world."); // Paper - fix lag);
|
||||||
} catch (Exception exception) {
|
} catch (Exception exception) {
|
||||||
EULA.a.warn("Failed to save {}", this.b, exception);
|
a.warn("Failed to save {}", this.b, exception);
|
||||||
} finally {
|
} finally {
|
||||||
IOUtils.closeQuietly(fileoutputstream);
|
IOUtils.closeQuietly(fileoutputstream);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From aee8a7585f861c88ebca81c869f19e645de71abb Mon Sep 17 00:00:00 2001
|
From 68ff51ddebbce42ce5b66cde1a790887799d0fc0 Mon Sep 17 00:00:00 2001
|
||||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||||
Date: Tue, 1 Mar 2016 14:47:52 -0600
|
Date: Tue, 1 Mar 2016 14:47:52 -0600
|
||||||
Subject: [PATCH] Player affects spawning API
|
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
|
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
index 72477ec9ad..63f78924cb 100644
|
index 9996c7f77b..89f3d17f24 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||||
@@ -72,6 +72,9 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -72,6 +72,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
|
@ -19,10 +19,10 @@ index 72477ec9ad..63f78924cb 100644
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
public boolean fauxSleeping;
|
public boolean fauxSleeping;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index d4e688d4c0..ec06f4badb 100644
|
index 9e95ede7fe..6f5f3f8cd0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -619,7 +619,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -620,7 +620,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
} else {
|
} else {
|
||||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ index cbdd2431fd..9e24b77ad1 100644
|
||||||
|
|
||||||
j = MathHelper.floor(entityhuman.locZ / 16.0D);
|
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
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 30a46a50fb..dc49d9917e 100644
|
index 237e6136f1..ce97cc99fa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
@@ -34,6 +34,7 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
|
|
|
@ -1,11 +1,24 @@
|
||||||
From 13443f9b6f42a4de1fa7b993ef0a6b9bb3be23e2 Mon Sep 17 00:00:00 2001
|
From fe5d1f6d166e14ba309e16fb90c12c82ab35e5c4 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 8 Mar 2015 22:55:25 -0600
|
Date: Sun, 8 Mar 2015 22:55:25 -0600
|
||||||
Subject: [PATCH] Optimize TileEntity Ticking
|
Subject: [PATCH] Optimize TileEntity Ticking
|
||||||
|
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
|
index 9ffec378a9..5401f7d754 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
|
@@ -216,7 +216,7 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean b(World world, BlockPosition blockposition) {
|
||||||
|
- List list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1)));
|
||||||
|
+ List<EntityOcelot> list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix
|
||||||
|
if (!list.isEmpty()) {
|
||||||
|
for(EntityOcelot entityocelot : list) {
|
||||||
|
if (entityocelot.isSitting()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityChest.java b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
index a534c441a..591524f1e 100644
|
index ad601a39d9..9573a4ecdf 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
--- a/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityChest.java
|
||||||
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
@@ -7,7 +7,7 @@ import org.bukkit.craftbukkit.entity.CraftHumanEntity;
|
||||||
|
@ -91,7 +104,7 @@ index a534c441a..591524f1e 100644
|
||||||
int newPower = Math.max(0, Math.min(15, this.f));
|
int newPower = Math.max(0, Math.min(15, this.f));
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityEnderChest.java b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
index 61edd7cc6..9407a8c97 100644
|
index 05de26405e..bc851d2a04 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||||
@@ -1,6 +1,6 @@
|
@@ -1,6 +1,6 @@
|
||||||
|
@ -99,10 +112,10 @@ index 61edd7cc6..9407a8c97 100644
|
||||||
|
|
||||||
-public class TileEntityEnderChest extends TileEntity implements ITickable {
|
-public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
+public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable
|
+public class TileEntityEnderChest extends TileEntity { // Paper - Remove ITickable
|
||||||
|
|
||||||
public float a;
|
public float a;
|
||||||
public float e;
|
public float e;
|
||||||
@@ -17,19 +17,37 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
public int f;
|
||||||
|
@@ -16,16 +16,34 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e = this.a;
|
this.e = this.a;
|
||||||
|
@ -111,9 +124,7 @@ index 61edd7cc6..9407a8c97 100644
|
||||||
int i = this.position.getX();
|
int i = this.position.getX();
|
||||||
int j = this.position.getY();
|
int j = this.position.getY();
|
||||||
int k = this.position.getZ();
|
int k = this.position.getZ();
|
||||||
float f = 0.1F;
|
float fx = 0.1F;
|
||||||
double d0;
|
|
||||||
-
|
|
||||||
+ */
|
+ */
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ }
|
+ }
|
||||||
|
@ -121,13 +132,11 @@ index 61edd7cc6..9407a8c97 100644
|
||||||
+ int i = this.position.getX();
|
+ int i = this.position.getX();
|
||||||
+ int j = this.position.getY();
|
+ int j = this.position.getY();
|
||||||
+ int k = this.position.getZ();
|
+ int k = this.position.getZ();
|
||||||
+ double d0;
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (this.f > 0 && this.a == 0.0F) {
|
if (this.f > 0 && this.a == 0.0F) {
|
||||||
double d1 = (double) i + 0.5D;
|
double d0 = (double)i + 0.5D;
|
||||||
|
double d1 = (double)k + 0.5D;
|
||||||
d0 = (double) k + 0.5D;
|
this.world.a((EntityHuman)null, d0, (double)j + 0.5D, d1, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
||||||
this.world.a((EntityHuman) null, d1, (double) j + 0.5D, d0, SoundEffects.BLOCK_ENDER_CHEST_OPEN, SoundCategory.BLOCKS, 0.5F, this.world.random.nextFloat() * 0.1F + 0.9F);
|
|
||||||
}
|
}
|
||||||
-
|
-
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -140,9 +149,9 @@ index 61edd7cc6..9407a8c97 100644
|
||||||
+ double d0;
|
+ double d0;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
|
if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
|
||||||
float f1 = this.a;
|
float f2 = this.a;
|
||||||
|
if (this.f > 0) {
|
||||||
@@ -76,11 +94,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
@@ -69,11 +87,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
public void c() {
|
public void c() {
|
||||||
++this.f;
|
++this.f;
|
||||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
|
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 461fec266464fc475ee8800bed57be571fcd9670 Mon Sep 17 00:00:00 2001
|
From 43ff1bdb607251450bc4ff1afb74108eddb1d4d2 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||||
Subject: [PATCH] Entity Origin API
|
Subject: [PATCH] Entity Origin API
|
||||||
|
@ -89,19 +89,19 @@ index 5ceb3f2068..87f3205f82 100644
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
index a8280acf94..38dd8f17a6 100644
|
index 769d599c59..e37da10e09 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||||
@@ -182,6 +182,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
@@ -174,6 +174,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||||
return new int[0];
|
return new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public final double getDoubleAt(int i) { return this.k(i); } // Paper - OBFHELPER
|
+ public final double getDoubleAt(int i) { return this.k(i); } // Paper - OBFHELPER
|
||||||
public double k(int i) {
|
public double k(int i) {
|
||||||
if (i >= 0 && i < this.list.size()) {
|
if (i >= 0 && i < this.list.size()) {
|
||||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
NBTBase nbtbase = (NBTBase)this.list.get(i);
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index dc49d9917e..be2feb441d 100644
|
index ce97cc99fa..cf359d6d9e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -961,6 +961,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -961,6 +961,12 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 450ef34e2ad19b38f7904431dc535982919b165d Mon Sep 17 00:00:00 2001
|
From b24a519f9092f69021b72e5a48e3c8514669932a Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 01:13:45 -0600
|
Date: Thu, 3 Mar 2016 01:13:45 -0600
|
||||||
Subject: [PATCH] Configurable Disabling Cat Chest Detection
|
Subject: [PATCH] Configurable Disabling Cat Chest Detection
|
||||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection
|
||||||
Offers a gameplay feature to stop cats from blocking chests
|
Offers a gameplay feature to stop cats from blocking chests
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index f8d2aae08..d91b48b0a 100644
|
index 34007dbf4f..b27934cfc5 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -173,4 +173,9 @@ public class PaperWorldConfig {
|
@@ -173,4 +173,9 @@ public class PaperWorldConfig {
|
||||||
|
@ -20,10 +20,10 @@ index f8d2aae08..d91b48b0a 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
index 0f6902747..1ad39aca3 100644
|
index 5401f7d754..27e6d2b5f2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
@@ -235,6 +235,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
|
@@ -216,6 +216,11 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean b(World world, BlockPosition blockposition) {
|
private boolean b(World world, BlockPosition blockposition) {
|
||||||
|
@ -32,9 +32,9 @@ index 0f6902747..1ad39aca3 100644
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
List list = world.a(EntityOcelot.class, new AxisAlignedBB((double) blockposition.getX(), (double) (blockposition.getY() + 1), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 2), (double) (blockposition.getZ() + 1)));
|
List<EntityOcelot> list = world.a(EntityOcelot.class, new AxisAlignedBB((double)blockposition.getX(), (double)(blockposition.getY() + 1), (double)blockposition.getZ(), (double)(blockposition.getX() + 1), (double)(blockposition.getY() + 2), (double)(blockposition.getZ() + 1))); // Paper - decompile fix
|
||||||
|
|
||||||
if (!list.isEmpty()) {
|
if (!list.isEmpty()) {
|
||||||
|
for(EntityOcelot entityocelot : list) {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From a582f2795d2b29ef1c1d52de9dafde6db552ec36 Mon Sep 17 00:00:00 2001
|
From 715fb2ad02cc5da7554f941ec7d7958406f0bffb Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 02:02:07 -0600
|
Date: Thu, 3 Mar 2016 02:02:07 -0600
|
||||||
Subject: [PATCH] Optimize Pathfinding
|
Subject: [PATCH] Optimize Pathfinding
|
||||||
|
@ -7,10 +7,10 @@ Prevents pathfinding from spamming failures for things such as
|
||||||
arrow attacks.
|
arrow attacks.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
index 62cb81516..8111317e3 100644
|
index d1d16b25d0..5d6f726d05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
@@ -122,10 +122,26 @@ public abstract class NavigationAbstract {
|
@@ -113,9 +113,26 @@ public abstract class NavigationAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(Entity entity, double d0) {
|
public boolean a(Entity entity, double d0) {
|
||||||
|
@ -20,8 +20,8 @@ index 62cb81516..8111317e3 100644
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
PathEntity pathentity = this.a(entity);
|
PathEntity pathentity = this.a(entity);
|
||||||
|
|
||||||
- return pathentity != null && this.a(pathentity, d0);
|
- return pathentity != null && this.a(pathentity, d0);
|
||||||
|
+
|
||||||
+ if (pathentity != null && this.a(pathentity, d0)) {
|
+ if (pathentity != null && this.a(pathentity, d0)) {
|
||||||
+ this.lastFailure = 0;
|
+ this.lastFailure = 0;
|
||||||
+ this.pathfindFailures = 0;
|
+ this.pathfindFailures = 0;
|
||||||
|
@ -38,7 +38,7 @@ index 62cb81516..8111317e3 100644
|
||||||
|
|
||||||
public boolean a(@Nullable PathEntity pathentity, double d0) {
|
public boolean a(@Nullable PathEntity pathentity, double d0) {
|
||||||
if (pathentity == null) {
|
if (pathentity == null) {
|
||||||
@@ -258,6 +274,7 @@ public abstract class NavigationAbstract {
|
@@ -241,6 +258,7 @@ public abstract class NavigationAbstract {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void q() {
|
public void q() {
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
From 5e5577be71456db68a07895d330eb51ef93d542a Mon Sep 17 00:00:00 2001
|
From 912940219423c9a3d0ceacbc4d7628285dcd35f4 Mon Sep 17 00:00:00 2001
|
||||||
From: Techcable <Techcable@outlook.com>
|
From: Techcable <Techcable@outlook.com>
|
||||||
Date: Thu, 3 Mar 2016 02:32:10 -0600
|
Date: Thu, 3 Mar 2016 02:32:10 -0600
|
||||||
Subject: [PATCH] Player Tab List and Title APIs
|
Subject: [PATCH] Player Tab List and Title APIs
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||||
index 7b18c16402..900bd83570 100644
|
index 267b69de30..29cbe15a82 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||||
@@ -11,6 +11,18 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
@@ -12,6 +12,17 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
||||||
private int d;
|
|
||||||
private int e;
|
|
||||||
|
|
||||||
|
public PacketPlayOutTitle() {
|
||||||
|
}
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
|
+ public net.md_5.bungee.api.chat.BaseComponent[] components;
|
||||||
+
|
+
|
||||||
|
@ -23,13 +23,12 @@ index 7b18c16402..900bd83570 100644
|
||||||
+ this.e = fadeOut;
|
+ this.e = fadeOut;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
|
||||||
public PacketPlayOutTitle() {}
|
|
||||||
|
|
||||||
public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle_enumtitleaction, IChatBaseComponent ichatbasecomponent) {
|
public PacketPlayOutTitle(PacketPlayOutTitle.EnumTitleAction packetplayouttitle$enumtitleaction, IChatBaseComponent ichatbasecomponent) {
|
||||||
@@ -46,7 +58,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
this(packetplayouttitle$enumtitleaction, ichatbasecomponent, -1, -1, -1);
|
||||||
|
@@ -46,7 +57,13 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
||||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
packetdataserializer.a((Enum) this.a);
|
packetdataserializer.a((Enum)this.a);
|
||||||
if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) {
|
if (this.a == PacketPlayOutTitle.EnumTitleAction.TITLE || this.a == PacketPlayOutTitle.EnumTitleAction.SUBTITLE || this.a == PacketPlayOutTitle.EnumTitleAction.ACTIONBAR) {
|
||||||
- packetdataserializer.a(this.b);
|
- packetdataserializer.a(this.b);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 46bd7a802f08c9106ebb2057d140b8f59e423e7e Mon Sep 17 00:00:00 2001
|
From f619275b362dced2e0f375bb68620b2c7e20355d Mon Sep 17 00:00:00 2001
|
||||||
From: Joseph Hirschfeld <joe@ibj.io>
|
From: Joseph Hirschfeld <joe@ibj.io>
|
||||||
Date: Thu, 3 Mar 2016 03:15:41 -0600
|
Date: Thu, 3 Mar 2016 03:15:41 -0600
|
||||||
Subject: [PATCH] Add exception reporting event
|
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
|
diff --git a/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..93397188b
|
index 0000000000..93397188b7
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
|
+++ b/src/main/java/com/destroystokyo/paper/ServerSchedulerReportingWrapper.java
|
||||||
@@ -0,0 +1,38 @@
|
@@ -0,0 +1,38 @@
|
||||||
|
@ -50,7 +50,7 @@ index 000000000..93397188b
|
||||||
+}
|
+}
|
||||||
\ No newline at end of file
|
\ 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
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index d41cd7a6e..68f845986 100644
|
index d41cd7a6e9..68f8459861 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -89,7 +89,7 @@ index d41cd7a6e..68f845986 100644
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
index 1379b574e..6b041f06e 100644
|
index 1379b574ef..6b041f06e4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||||
+++ b/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;
|
@@ -15,6 +15,7 @@ import java.util.function.BooleanSupplier;
|
||||||
|
@ -118,7 +118,7 @@ index 1379b574e..6b041f06e 100644
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
diff --git a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
index 1d830dff6..58d971cf2 100644
|
index 1d830dff64..58d971cf20 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
--- a/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
+++ b/src/main/java/net/minecraft/server/NameReferencingFileConverter.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -145,7 +145,7 @@ index 1d830dff6..58d971cf2 100644
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index 31899549d..cc7cad8be 100644
|
index f991fddf7d..e888c9bdba 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -155,7 +155,7 @@ index 31899549d..cc7cad8be 100644
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import java.io.BufferedInputStream;
|
import java.io.BufferedInputStream;
|
||||||
import java.io.BufferedOutputStream;
|
import java.io.BufferedOutputStream;
|
||||||
@@ -82,6 +83,7 @@ public class RegionFile {
|
@@ -75,6 +76,7 @@ public class RegionFile {
|
||||||
}
|
}
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
ioexception.printStackTrace();
|
ioexception.printStackTrace();
|
||||||
|
@ -163,8 +163,8 @@ index 31899549d..cc7cad8be 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -237,6 +239,7 @@ public class RegionFile {
|
@@ -221,6 +223,7 @@ public class RegionFile {
|
||||||
this.b(i, j, (int) (SystemUtils.d() / 1000L));
|
this.b(i, j, (int)(SystemUtils.d() / 1000L));
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
ioexception.printStackTrace();
|
ioexception.printStackTrace();
|
||||||
+ ServerInternalException.reportInternalException(ioexception); // Paper
|
+ ServerInternalException.reportInternalException(ioexception); // Paper
|
||||||
|
@ -172,7 +172,7 @@ index 31899549d..cc7cad8be 100644
|
||||||
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFileCache.java b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
index d18921271..e5115863e 100644
|
index d18921271f..e5115863ec 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
--- a/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
+++ b/src/main/java/net/minecraft/server/RegionFileCache.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -191,7 +191,7 @@ index d18921271..e5115863e 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
index 9e24b77ad..f32191c5a 100644
|
index 9e24b77ad1..f32191c5a2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
||||||
+++ b/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;
|
@@ -10,6 +10,7 @@ import org.apache.logging.log4j.LogManager;
|
||||||
|
@ -219,7 +219,7 @@ index 9e24b77ad..f32191c5a 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
|
diff --git a/src/main/java/net/minecraft/server/VillageSiege.java b/src/main/java/net/minecraft/server/VillageSiege.java
|
||||||
index e649d662a..560edb523 100644
|
index e649d662ae..560edb523f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/VillageSiege.java
|
--- a/src/main/java/net/minecraft/server/VillageSiege.java
|
||||||
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
|
+++ b/src/main/java/net/minecraft/server/VillageSiege.java
|
||||||
@@ -1,5 +1,7 @@
|
@@ -1,5 +1,7 @@
|
||||||
|
@ -239,7 +239,7 @@ index e649d662a..560edb523 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 8af8cf2ee..561bcd07b 100644
|
index 8af8cf2ee5..561bcd07b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
|
@ -276,7 +276,7 @@ index 8af8cf2ee..561bcd07b 100644
|
||||||
this.tileEntityListTick.remove(tileTickPosition--);
|
this.tileEntityListTick.remove(tileTickPosition--);
|
||||||
continue;
|
continue;
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||||
index 65931bfb5..625335c60 100644
|
index 65931bfb5f..625335c60f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
|
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||||
@@ -138,6 +138,7 @@ public class WorldPersistentData {
|
@@ -138,6 +138,7 @@ public class WorldPersistentData {
|
||||||
|
@ -288,7 +288,7 @@ index 65931bfb5..625335c60 100644
|
||||||
throw throwable1;
|
throw throwable1;
|
||||||
} finally {
|
} finally {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
index 93b9134d6..26753fac5 100644
|
index 93b9134d6e..26753fac5e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
--- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
|
||||||
@@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference;
|
@@ -15,6 +15,9 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 5cf50182ea6201707d4281655d44182f4272fd8f Mon Sep 17 00:00:00 2001
|
From e5c85fe8b8be9af8965d9b2ab7aa871edfa14b96 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 4 Mar 2016 18:18:37 -0600
|
Date: Fri, 4 Mar 2016 18:18:37 -0600
|
||||||
Subject: [PATCH] Chunk save queue improvements
|
Subject: [PATCH] Chunk save queue improvements
|
||||||
|
@ -137,15 +137,15 @@ index f969c036f3..2b0a088a6a 100644
|
||||||
NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream);
|
NBTCompressedStreamTools.a(nbttagcompound, (DataOutput) dataoutputstream);
|
||||||
dataoutputstream.close();
|
dataoutputstream.close();
|
||||||
diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java
|
diff --git a/src/main/java/net/minecraft/server/FileIOThread.java b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||||
index 8c3537ab8d..3c688f546c 100644
|
index a3aba244af..97917551a4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/FileIOThread.java
|
--- a/src/main/java/net/minecraft/server/FileIOThread.java
|
||||||
+++ b/src/main/java/net/minecraft/server/FileIOThread.java
|
+++ b/src/main/java/net/minecraft/server/FileIOThread.java
|
||||||
@@ -38,20 +38,21 @@ public class FileIOThread implements Runnable {
|
@@ -35,20 +35,21 @@ public class FileIOThread implements Runnable {
|
||||||
IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver) this.c.get(i);
|
for(int i = 0; i < this.c.size(); ++i) {
|
||||||
|
IAsyncChunkSaver iasyncchunksaver = (IAsyncChunkSaver)this.c.get(i);
|
||||||
boolean flag;
|
boolean flag;
|
||||||
|
- synchronized(iasyncchunksaver) {
|
||||||
- synchronized (iasyncchunksaver) {
|
+ //synchronized(iasyncchunksaver) { // Paper - remove synchronized
|
||||||
+ //synchronized (iasyncchunksaver) { // Paper - remove synchronized
|
|
||||||
flag = iasyncchunksaver.a();
|
flag = iasyncchunksaver.a();
|
||||||
- }
|
- }
|
||||||
+ //} // Paper
|
+ //} // Paper
|
||||||
|
@ -159,8 +159,8 @@ index 8c3537ab8d..3c688f546c 100644
|
||||||
try {
|
try {
|
||||||
- Thread.sleep(this.f ? 0L : 10L);
|
- Thread.sleep(this.f ? 0L : 10L);
|
||||||
+ Thread.sleep(this.f ? 0L : 1L); // Paper
|
+ Thread.sleep(this.f ? 0L : 1L); // Paper
|
||||||
} catch (InterruptedException interruptedexception) {
|
} catch (InterruptedException interruptedexception1) {
|
||||||
interruptedexception.printStackTrace();
|
interruptedexception1.printStackTrace();
|
||||||
- }
|
- }
|
||||||
+ }} // Paper
|
+ }} // Paper
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 63f3b781dc0ddb6de219759f112f4d18cae510a5 Mon Sep 17 00:00:00 2001
|
From 3cd840042adadf44252ecfc09aa287e8d531c74b Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 4 Mar 2013 23:46:10 -0500
|
Date: Mon, 4 Mar 2013 23:46:10 -0500
|
||||||
Subject: [PATCH] Chunk Save Reattempt
|
Subject: [PATCH] Chunk Save Reattempt
|
||||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Chunk Save Reattempt
|
||||||
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
We commonly have "Stream Closed" errors on chunk saving, so this code should re-try to save the chunk in the event of failure and hopefully prevent rollbacks.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index cc7cad8be4..b8b514c874 100644
|
index e888c9bdba..f4405be395 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -238,8 +238,7 @@ public class RegionFile {
|
@@ -222,8 +222,7 @@ public class RegionFile {
|
||||||
|
|
||||||
this.b(i, j, (int) (SystemUtils.d() / 1000L));
|
this.b(i, j, (int)(SystemUtils.d() / 1000L));
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
- ioexception.printStackTrace();
|
- ioexception.printStackTrace();
|
||||||
- ServerInternalException.reportInternalException(ioexception); // Paper
|
- ServerInternalException.reportInternalException(ioexception); // Paper
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9bea77a9d0eb0bba8a3c97c3782630e66e802bd5 Mon Sep 17 00:00:00 2001
|
From 75b8c8e24cd6b38751500103dee0b8add52379a5 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 18 Mar 2016 21:22:56 -0400
|
Date: Fri, 18 Mar 2016 21:22:56 -0400
|
||||||
Subject: [PATCH] Optimized Light Level Comparisons
|
Subject: [PATCH] Optimized Light Level Comparisons
|
||||||
|
@ -47,15 +47,14 @@ index 4fc8c5d3c6..0fc39bb9fb 100644
|
||||||
|
|
||||||
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
|
if (random.nextInt((int) ((100.0F / (this == Blocks.PUMPKIN_STEM ? world.spigotConfig.pumpkinModifier : world.spigotConfig.melonModifier)) * (25.0F / f)) + 1) == 0) { // Spigot
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
index a3449e9a8d..5f60bf04e6 100644
|
index f3cc2cef0a..7cba60e475 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||||
@@ -65,9 +65,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
@@ -63,8 +63,18 @@ public abstract class EntityMonster extends EntityCreature implements IMonster {
|
||||||
if (this.world.getBrightness(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) {
|
if (this.world.getBrightness(EnumSkyBlock.SKY, blockposition) > this.random.nextInt(32)) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
- int i = this.world.Y() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition);
|
- int i = this.world.Y() ? this.world.d(blockposition, 10) : this.world.getLightLevel(blockposition);
|
||||||
-
|
|
||||||
- return i <= this.random.nextInt(8);
|
- return i <= this.random.nextInt(8);
|
||||||
+ // Paper start - optimized light check, returns faster
|
+ // Paper start - optimized light check, returns faster
|
||||||
+ boolean passes;
|
+ boolean passes;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4bf18616eaab7071c7f2b337dd9195d419103f4e Mon Sep 17 00:00:00 2001
|
From e1a7033e3c4af7eb6dae4c51bf3a2f02ea02654d Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
Date: Sat, 19 Mar 2016 15:16:54 -0400
|
||||||
Subject: [PATCH] Pass world to Village creation
|
Subject: [PATCH] Pass world to Village creation
|
||||||
|
@ -6,18 +6,18 @@ Subject: [PATCH] Pass world to Village creation
|
||||||
fixes NPE bug #95
|
fixes NPE bug #95
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
|
diff --git a/src/main/java/net/minecraft/server/PersistentVillage.java b/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||||
index 98c6bbc183..7a9fb97530 100644
|
index d58f6b2a86..d14a9e3a3e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
--- a/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
+++ b/src/main/java/net/minecraft/server/PersistentVillage.java
|
||||||
@@ -237,7 +237,7 @@ public class PersistentVillage extends PersistentBase {
|
@@ -202,7 +202,7 @@ public class PersistentVillage extends PersistentBase {
|
||||||
|
|
||||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
for(int i = 0; i < nbttaglist.size(); ++i) {
|
||||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
||||||
- Village village = new Village();
|
- Village village = new Village();
|
||||||
+ Village village = new Village(world); // Paper
|
+ Village village = new Village(world); // Paper
|
||||||
|
|
||||||
village.a(nbttagcompound1);
|
village.a(nbttagcompound1);
|
||||||
this.villages.add(village);
|
this.villages.add(village);
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
diff --git a/src/main/java/net/minecraft/server/Village.java b/src/main/java/net/minecraft/server/Village.java
|
||||||
index f87e8e05af..bda67faefe 100644
|
index f87e8e05af..bda67faefe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Village.java
|
--- a/src/main/java/net/minecraft/server/Village.java
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 2a68d81ec369c7a193a9c0923daddb9f92db523d Mon Sep 17 00:00:00 2001
|
From be2605540c49de075459ddf5825d142b945c57eb Mon Sep 17 00:00:00 2001
|
||||||
From: Gabscap <git@gabscap.de>
|
From: Gabscap <git@gabscap.de>
|
||||||
Date: Sat, 19 Mar 2016 22:25:11 +0100
|
Date: Sat, 19 Mar 2016 22:25:11 +0100
|
||||||
Subject: [PATCH] Waving banner workaround
|
Subject: [PATCH] Waving banner workaround
|
||||||
|
@ -6,13 +6,13 @@ Subject: [PATCH] Waving banner workaround
|
||||||
This patch is a workaround for MC-63720
|
This patch is a workaround for MC-63720
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||||
index c5c3f40ce0..6413f76e78 100644
|
index 731b96dea2..2a0fd2fbc0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutUpdateTime.java
|
||||||
@@ -4,7 +4,13 @@ import java.io.IOException;
|
@@ -3,7 +3,13 @@ package net.minecraft.server;
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
||||||
|
|
||||||
+ // World Age in ticks
|
+ // World Age in ticks
|
||||||
+ // Not changed by server commands
|
+ // Not changed by server commands
|
||||||
+ // World Age must not be negative
|
+ // World Age must not be negative
|
||||||
|
@ -22,7 +22,7 @@ index c5c3f40ce0..6413f76e78 100644
|
||||||
+ // Displayed in the debug screen (F3)
|
+ // Displayed in the debug screen (F3)
|
||||||
private long b;
|
private long b;
|
||||||
|
|
||||||
public PacketPlayOutUpdateTime() {}
|
public PacketPlayOutUpdateTime() {
|
||||||
@@ -19,6 +25,9 @@ public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
@@ -19,6 +25,9 @@ public class PacketPlayOutUpdateTime implements Packet<PacketListenerPlayOut> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From fab7f2c8c325f68616b896713a552c7336180264 Mon Sep 17 00:00:00 2001
|
From 2429e8939eb62f6c57e3b5a6ab067e0942371932 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Mar 2016 02:07:55 -0600
|
Date: Thu, 3 Mar 2016 02:07:55 -0600
|
||||||
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
|
Subject: [PATCH] Optimize isValidLocation, getType and getBlockData for inling
|
||||||
|
@ -12,10 +12,10 @@ Replace all calls to the new place to the unnecessary forward.
|
||||||
Optimize getType and getBlockData to manually inline and optimize the calls
|
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
|
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
index e2a7b4be2c..58f8b4b720 100644
|
index 4048937c63..680764b342 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
@@ -10,6 +10,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
@@ -9,6 +9,14 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||||
private final int a;
|
private final int a;
|
||||||
private final int b;
|
private final int b;
|
||||||
private final int c;
|
private final int c;
|
||||||
|
@ -31,10 +31,10 @@ index e2a7b4be2c..58f8b4b720 100644
|
||||||
public BaseBlockPosition(int i, int j, int k) {
|
public BaseBlockPosition(int i, int j, int k) {
|
||||||
this.a = i;
|
this.a = i;
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index ca5c56c2b6..42e5e9ad8f 100644
|
index 5ed34cf7e3..f4ed98d2d9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -342,6 +342,16 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -239,6 +239,16 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
protected int b;
|
protected int b;
|
||||||
protected int c;
|
protected int c;
|
||||||
protected int d;
|
protected int d;
|
||||||
|
@ -52,7 +52,7 @@ index ca5c56c2b6..42e5e9ad8f 100644
|
||||||
public MutableBlockPosition() {
|
public MutableBlockPosition() {
|
||||||
this(0, 0, 0);
|
this(0, 0, 0);
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index d86b925f0d..30dc4fb6df 100644
|
index dcd122d8b5..dee1f7bfe9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -427,12 +427,24 @@ public class Chunk implements IChunkAccess {
|
@@ -427,12 +427,24 @@ public class Chunk implements IChunkAccess {
|
||||||
|
@ -84,10 +84,10 @@ index d86b925f0d..30dc4fb6df 100644
|
||||||
IBlockData iblockdata = null;
|
IBlockData iblockdata = null;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
index 35aea4829f..233cbb6d60 100644
|
index 274c449480..7e4c79a1ce 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
@@ -9,7 +9,7 @@ public class ChunkSection {
|
@@ -6,7 +6,7 @@ public class ChunkSection {
|
||||||
private int nonEmptyBlockCount;
|
private int nonEmptyBlockCount;
|
||||||
private int tickingBlockCount;
|
private int tickingBlockCount;
|
||||||
private int e;
|
private int e;
|
||||||
|
@ -97,7 +97,7 @@ index 35aea4829f..233cbb6d60 100644
|
||||||
private NibbleArray skyLight;
|
private NibbleArray skyLight;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index fd6f070417..45b0880607 100644
|
index 94872593b1..ee5d4c5272 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -263,11 +263,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -263,11 +263,11 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From da0eaa98bb3f62b2ddc2b3c3b4a29719605594da Mon Sep 17 00:00:00 2001
|
From dcfdcaf5f2a8ecd65785d2c4b729e674bf262523 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 28 Mar 2016 21:22:26 -0400
|
Date: Mon, 28 Mar 2016 21:22:26 -0400
|
||||||
Subject: [PATCH] EntityPathfindEvent
|
Subject: [PATCH] EntityPathfindEvent
|
||||||
|
@ -6,34 +6,34 @@ Subject: [PATCH] EntityPathfindEvent
|
||||||
Fires when an Entity decides to start moving to a location.
|
Fires when an Entity decides to start moving to a location.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
index 8111317e31..76d1f4bd21 100644
|
index 5d6f726d05..a8b070ed32 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
@@ -4,7 +4,7 @@ import javax.annotation.Nullable;
|
@@ -3,7 +3,7 @@ package net.minecraft.server;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class NavigationAbstract {
|
public abstract class NavigationAbstract {
|
||||||
|
|
||||||
- protected EntityInsentient a;
|
- protected EntityInsentient a;
|
||||||
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
+ protected EntityInsentient a; public Entity getEntity() { return a; } // Paper - OBFHELPER
|
||||||
protected World b;
|
protected World b;
|
||||||
@Nullable
|
@Nullable
|
||||||
protected PathEntity c;
|
protected PathEntity c;
|
||||||
@@ -78,6 +78,7 @@ public abstract class NavigationAbstract {
|
@@ -74,6 +74,7 @@ public abstract class NavigationAbstract {
|
||||||
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||||
return this.c;
|
return this.c;
|
||||||
} else {
|
} else {
|
||||||
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(getEntity().world, blockposition), null).callEvent()) { return null; } // Paper
|
||||||
this.q = blockposition;
|
this.q = blockposition;
|
||||||
float f = this.j();
|
float fx = this.j();
|
||||||
|
this.b.methodProfiler.a("pathfind");
|
||||||
@@ -102,6 +103,7 @@ public abstract class NavigationAbstract {
|
@@ -95,6 +96,7 @@ public abstract class NavigationAbstract {
|
||||||
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||||
return this.c;
|
return this.c;
|
||||||
} else {
|
} else {
|
||||||
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
|
+ if (!new com.destroystokyo.paper.event.entity.EntityPathfindEvent(getEntity().getBukkitEntity(), MCUtil.toLocation(entity.world, blockposition), entity.getBukkitEntity()).callEvent()) { return null; } // Paper
|
||||||
this.q = blockposition;
|
this.q = blockposition;
|
||||||
float f = this.j();
|
float fx = this.j();
|
||||||
|
this.b.methodProfiler.a("pathfind");
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 37a926f3964c8a76bead6516f01cf84b75646f00 Mon Sep 17 00:00:00 2001
|
From 7e1a19b733518affda90a116c3576335ae14f565 Mon Sep 17 00:00:00 2001
|
||||||
From: Antony Riley <antony@cyberiantiger.org>
|
From: Antony Riley <antony@cyberiantiger.org>
|
||||||
Date: Tue, 29 Mar 2016 06:56:23 +0300
|
Date: Tue, 29 Mar 2016 06:56:23 +0300
|
||||||
Subject: [PATCH] Reduce IO ops opening a new region file.
|
Subject: [PATCH] Reduce IO ops opening a new region file.
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index b8b514c874..cba2373125 100644
|
index f4405be395..5d2853b9ce 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -8,9 +8,12 @@ import java.io.ByteArrayInputStream;
|
@@ -8,9 +8,12 @@ import java.io.ByteArrayInputStream;
|
||||||
|
@ -21,9 +21,9 @@ index b8b514c874..cba2373125 100644
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.zip.DeflaterOutputStream;
|
import java.util.zip.DeflaterOutputStream;
|
||||||
import java.util.zip.GZIPInputStream;
|
import java.util.zip.GZIPInputStream;
|
||||||
@@ -67,8 +70,16 @@ public class RegionFile {
|
@@ -60,8 +63,16 @@ public class RegionFile {
|
||||||
|
this.f.set(1, false);
|
||||||
int k;
|
this.c.seek(0L);
|
||||||
|
|
||||||
+ // Paper Start
|
+ // Paper Start
|
||||||
+ ByteBuffer header = ByteBuffer.allocate(8192);
|
+ ByteBuffer header = ByteBuffer.allocate(8192);
|
||||||
|
@ -33,19 +33,19 @@ index b8b514c874..cba2373125 100644
|
||||||
+ header.clear();
|
+ header.clear();
|
||||||
+ IntBuffer headerAsInts = header.asIntBuffer();
|
+ IntBuffer headerAsInts = header.asIntBuffer();
|
||||||
+ // Paper End
|
+ // Paper End
|
||||||
for (j = 0; j < 1024; ++j) {
|
for(int j1 = 0; j1 < 1024; ++j1) {
|
||||||
- k = this.c.readInt();
|
- int k = this.c.readInt();
|
||||||
+ k = headerAsInts.get(); // Paper
|
+ int k = headerAsInts.get(); // Paper
|
||||||
this.d[j] = k;
|
this.d[j1] = k;
|
||||||
if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) {
|
if (k != 0 && (k >> 8) + (k & 255) <= this.f.size()) {
|
||||||
for (int l = 0; l < (k & 255); ++l) {
|
for(int l = 0; l < (k & 255); ++l) {
|
||||||
@@ -78,7 +89,7 @@ public class RegionFile {
|
@@ -71,7 +82,7 @@ public class RegionFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
for (j = 0; j < 1024; ++j) {
|
for(int k1 = 0; k1 < 1024; ++k1) {
|
||||||
- k = this.c.readInt();
|
- int l1 = this.c.readInt();
|
||||||
+ k = headerAsInts.get(); // Paper
|
+ int l1 = headerAsInts.get(); // Paper
|
||||||
this.e[j] = k;
|
this.e[k1] = l1;
|
||||||
}
|
}
|
||||||
} catch (IOException ioexception) {
|
} catch (IOException ioexception) {
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,24 +1,24 @@
|
||||||
From 1a421550b37ed9ab1ebc5ce9982d279eb701db40 Mon Sep 17 00:00:00 2001
|
From a4e04803a51a04f1963738c2c8b147ad162daed0 Mon Sep 17 00:00:00 2001
|
||||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||||
Date: Sat, 2 Apr 2016 05:09:16 -0400
|
Date: Sat, 2 Apr 2016 05:09:16 -0400
|
||||||
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
Subject: [PATCH] Add PlayerUseUnknownEntityEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
||||||
index 77440ac81f..8711462e16 100644
|
index a4b98c81f5..53d38ea40f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayInUseEntity.java
|
||||||
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
|
@@ -4,7 +4,7 @@ import java.io.IOException;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public class PacketPlayInUseEntity implements Packet<PacketListenerPlayIn> {
|
public class PacketPlayInUseEntity implements Packet<PacketListenerPlayIn> {
|
||||||
|
|
||||||
- private int a;
|
- private int a;
|
||||||
+ private int a; public int getEntityId() { return this.a; } // Paper - add accessor
|
+ private int a; public int getEntityId() { return this.a; } // Paper - add accessor
|
||||||
private PacketPlayInUseEntity.EnumEntityUseAction action;
|
private PacketPlayInUseEntity.EnumEntityUseAction action;
|
||||||
private Vec3D c;
|
private Vec3D c;
|
||||||
private EnumHand d;
|
private EnumHand d;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
index 3257f41713..096e4e0d8c 100644
|
index 62f35d2672..306ef5bf79 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||||
@@ -1903,6 +1903,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
@@ -1903,6 +1903,16 @@ public class PlayerConnection implements PacketListenerPlayIn, ITickable {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 662ab65f604cf092e448c87a514adb3150c11449 Mon Sep 17 00:00:00 2001
|
From 1285cf28b6ff0e40cd76bc64122577d31fcbbcc5 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 5 Apr 2016 19:42:22 -0400
|
Date: Tue, 5 Apr 2016 19:42:22 -0400
|
||||||
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
|
Subject: [PATCH] Don't spam reload spawn chunks in nether/end
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 0cdebf702a..8abe3cdd92 100644
|
index 4ea7bc53e6..f5741b2b36 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -2864,6 +2864,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -2864,6 +2864,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||||
|
@ -25,11 +25,11 @@ index 0cdebf702a..8abe3cdd92 100644
|
||||||
ForcedChunk forcedchunk = (ForcedChunk) this.a(this.worldProvider.getDimensionManager(), ForcedChunk::new, "chunks");
|
ForcedChunk forcedchunk = (ForcedChunk) this.a(this.worldProvider.getDimensionManager(), ForcedChunk::new, "chunks");
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
diff --git a/src/main/java/net/minecraft/server/WorldProvider.java b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||||
index bca5e50d98..088e7306cb 100644
|
index 517b1e7124..0e654ebf70 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
--- a/src/main/java/net/minecraft/server/WorldProvider.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
+++ b/src/main/java/net/minecraft/server/WorldProvider.java
|
||||||
@@ -69,7 +69,7 @@ public abstract class WorldProvider {
|
@@ -72,7 +72,7 @@ public abstract class WorldProvider {
|
||||||
public void l() {}
|
}
|
||||||
|
|
||||||
public boolean a(int i, int j) {
|
public boolean a(int i, int j) {
|
||||||
- return !this.b.f(i, j);
|
- return !this.b.f(i, j);
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From ca661277ab0b0df75c267368ac65590de2561fff Mon Sep 17 00:00:00 2001
|
From 15c0961341cb53d2ff8701e59812bd92a462b07e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 5 Apr 2016 21:38:58 -0400
|
Date: Tue, 5 Apr 2016 21:38:58 -0400
|
||||||
Subject: [PATCH] Remove Debug checks from DataBits
|
Subject: [PATCH] Remove Debug checks from DataBits
|
||||||
|
@ -9,34 +9,34 @@ Before: http://i.imgur.com/nQsMzAE.png
|
||||||
After: http://i.imgur.com/nJ46crB.png
|
After: http://i.imgur.com/nJ46crB.png
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
index d24ec3d53c..0fb3162e65 100644
|
index 0dc948a375..f4de7fcf4b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||||
@@ -14,7 +14,7 @@ public class DataBits {
|
@@ -13,7 +13,7 @@ public class DataBits {
|
||||||
}
|
}
|
||||||
|
|
||||||
public DataBits(int i, int j, long[] along) {
|
public DataBits(int i, int j, long[] along) {
|
||||||
- Validate.inclusiveBetween(1L, 32L, (long) i);
|
- Validate.inclusiveBetween(1L, 32L, (long)i);
|
||||||
+ //Validate.inclusiveBetween(1L, 32L, (long) i); // Paper
|
+ //Validate.inclusiveBetween(1L, 32L, (long)i); // Paper
|
||||||
this.d = j;
|
this.d = j;
|
||||||
this.b = i;
|
this.b = i;
|
||||||
this.a = along;
|
this.a = along;
|
||||||
@@ -27,8 +27,8 @@ public class DataBits {
|
@@ -25,8 +25,8 @@ public class DataBits {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(int i, int j) {
|
public void a(int i, int j) {
|
||||||
- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i);
|
- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i);
|
||||||
- Validate.inclusiveBetween(0L, this.c, (long) j);
|
- Validate.inclusiveBetween(0L, this.c, (long)j);
|
||||||
+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper
|
+ //Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i); // Paper
|
||||||
+ //Validate.inclusiveBetween(0L, this.c, (long) j); // Paper
|
+ //Validate.inclusiveBetween(0L, this.c, (long)j); // Paper
|
||||||
int k = i * this.b;
|
int k = i * this.b;
|
||||||
int l = k / 64;
|
int l = k / 64;
|
||||||
int i1 = ((i + 1) * this.b - 1) / 64;
|
int i1 = ((i + 1) * this.b - 1) / 64;
|
||||||
@@ -45,7 +45,7 @@ public class DataBits {
|
@@ -41,7 +41,7 @@ public class DataBits {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a(int i) {
|
public int a(int i) {
|
||||||
- Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i);
|
- Validate.inclusiveBetween(0L, (long)(this.d - 1), (long)i);
|
||||||
+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper
|
+ //Validate.inclusiveBetween(0L, (long) (this.d - 1), (long) i); // Paper
|
||||||
int j = i * this.b;
|
int j = i * this.b;
|
||||||
int k = j / 64;
|
int k = j / 64;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 6a566069cdf12ba0a87144cc0f2da39bdbee1b82 Mon Sep 17 00:00:00 2001
|
From 2646887209eb8d478346b5d4ec3ff68011d4405b Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 13 Apr 2016 02:10:49 -0400
|
Date: Wed, 13 Apr 2016 02:10:49 -0400
|
||||||
Subject: [PATCH] Configurable Player Collision
|
Subject: [PATCH] Configurable Player Collision
|
||||||
|
@ -19,7 +19,7 @@ index a6042ca607..9fe1311143 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
index 3fe374acb2..b45cdcd09f 100644
|
index f96da53b18..c7791dd925 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||||
@@ -424,6 +424,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
@@ -424,6 +424,19 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
||||||
|
@ -43,16 +43,16 @@ index 3fe374acb2..b45cdcd09f 100644
|
||||||
|
|
||||||
protected void a(File file, WorldData worlddata) {
|
protected void a(File file, WorldData worlddata) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||||
index a6aed2531f..575e3762b2 100644
|
index f7a9b9d885..7befd80cf5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutScoreboardTeam.java
|
||||||
@@ -94,7 +94,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
|
@@ -92,7 +92,7 @@ public class PacketPlayOutScoreboardTeam implements Packet<PacketListenerPlayOut
|
||||||
packetdataserializer.a(this.b);
|
packetdataserializer.a(this.b);
|
||||||
packetdataserializer.writeByte(this.j);
|
packetdataserializer.writeByte(this.j);
|
||||||
packetdataserializer.a(this.e);
|
packetdataserializer.a(this.e);
|
||||||
- packetdataserializer.a(this.f);
|
- packetdataserializer.a(this.f);
|
||||||
+ packetdataserializer.a(!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions ? "never" : this.f); // Paper
|
+ packetdataserializer.a(!com.destroystokyo.paper.PaperConfig.enablePlayerCollisions ? "never" : this.f); // Paper
|
||||||
packetdataserializer.a((Enum) this.g);
|
packetdataserializer.a((Enum)this.g);
|
||||||
packetdataserializer.a(this.c);
|
packetdataserializer.a(this.c);
|
||||||
packetdataserializer.a(this.d);
|
packetdataserializer.a(this.d);
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 511600f9b9163449450704bd92e49f97283903a6 Mon Sep 17 00:00:00 2001
|
From 6d27d1a5c0d2e8c63b6cc0e401a4a2bd8e6cf71f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 16 Apr 2016 00:39:33 -0400
|
Date: Sat, 16 Apr 2016 00:39:33 -0400
|
||||||
Subject: [PATCH] Configurable RCON IP address
|
Subject: [PATCH] Configurable RCON IP address
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable RCON IP address
|
||||||
For servers with multiple IP's, ability to bind to a specific interface.
|
For servers with multiple IP's, ability to bind to a specific interface.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
diff --git a/src/main/java/net/minecraft/server/RemoteControlListener.java b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||||
index f91da84ff9..3d831b358b 100644
|
index 32244b55a2..4bfd41af18 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
|
--- a/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
+++ b/src/main/java/net/minecraft/server/RemoteControlListener.java
|
||||||
@@ -24,7 +24,7 @@ public class RemoteControlListener extends RemoteConnectionThread {
|
@@ -23,7 +23,7 @@ public class RemoteControlListener extends RemoteConnectionThread {
|
||||||
super(iminecraftserver, "RCON Listener");
|
super(iminecraftserver, "RCON Listener");
|
||||||
this.h = iminecraftserver.a("rcon.port", 0);
|
this.h = iminecraftserver.a("rcon.port", 0);
|
||||||
this.l = iminecraftserver.a("rcon.password", "");
|
this.l = iminecraftserver.a("rcon.password", "");
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From b10a2ee44d33c6b5cd078b16becfba07f9b57fa3 Mon Sep 17 00:00:00 2001
|
From 20e4fb71f59a552f2df178ab805c5c911a76d2e2 Mon Sep 17 00:00:00 2001
|
||||||
From: kashike <kashike@vq.lc>
|
From: kashike <kashike@vq.lc>
|
||||||
Date: Thu, 21 Apr 2016 23:51:55 -0700
|
Date: Thu, 21 Apr 2016 23:51:55 -0700
|
||||||
Subject: [PATCH] Add ability to configure frosted_ice properties
|
Subject: [PATCH] Add ability to configure frosted_ice properties
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 56a25531b4..25a5333219 100644
|
index 3628ddb4db..df2863ce1b 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -247,4 +247,14 @@ public class PaperWorldConfig {
|
@@ -247,4 +247,14 @@ public class PaperWorldConfig {
|
||||||
|
@ -24,26 +24,32 @@ index 56a25531b4..25a5333219 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
index 39b3c88d64..302d420512 100644
|
index af6c744ad3..7bea86f52b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
@@ -12,6 +12,7 @@ public class BlockIceFrost extends BlockIce {
|
@@ -11,19 +11,20 @@ public class BlockIceFrost extends BlockIce {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Random random) {
|
||||||
+ if (!world.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice
|
+ if (!world.paperConfig.frostedIceEnabled) return; // Paper - add ability to disable frosted ice
|
||||||
if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - ((Integer) iblockdata.get(BlockIceFrost.a)).intValue() - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) {
|
if ((random.nextInt(3) == 0 || this.a(world, blockposition, 4)) && world.getLightLevel(blockposition) > 11 - iblockdata.get(a) - iblockdata.b(world, blockposition) && this.c(iblockdata, world, blockposition)) {
|
||||||
BlockPosition.b blockposition_b = BlockPosition.b.r();
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
||||||
Throwable throwable = null;
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
||||||
@@ -27,7 +28,7 @@ public class BlockIceFrost extends BlockIce {
|
blockposition$b.j(blockposition).d(enumdirection);
|
||||||
IBlockData iblockdata1 = world.getType(blockposition_b);
|
IBlockData iblockdata1 = world.getType(blockposition$b);
|
||||||
|
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) {
|
||||||
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) {
|
- world.J().a(blockposition$b, this, MathHelper.nextInt(random, 20, 40));
|
||||||
- world.J().a(blockposition_b, this, MathHelper.nextInt(random, 20, 40));
|
+ world.J().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
||||||
+ world.J().a(blockposition_b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Throwable throwable1) {
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
- world.J().a(blockposition, this, MathHelper.nextInt(random, 20, 40));
|
||||||
|
+ world.J().a(blockposition, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From f87b03b9d893ea3c081afef79107c62f14ca2407 Mon Sep 17 00:00:00 2001
|
From e3250da854818c3f910dbc641c51a86995c4df86 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 1 May 2016 21:19:14 -0400
|
Date: Sun, 1 May 2016 21:19:14 -0400
|
||||||
Subject: [PATCH] LootTable API & Replenishable Lootables Feature
|
Subject: [PATCH] LootTable API & Replenishable Lootables Feature
|
||||||
|
@ -591,13 +591,13 @@ index 8945ab275b..184809b832 100644
|
||||||
|
|
||||||
if (this.lootTableSeed == 0L) {
|
if (this.lootTableSeed == 0L) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntityLootable.java b/src/main/java/net/minecraft/server/TileEntityLootable.java
|
||||||
index 60d200f9eb..228d6b2800 100644
|
index 25328bf414..6e3779c417 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
|
--- a/src/main/java/net/minecraft/server/TileEntityLootable.java
|
||||||
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
|
+++ b/src/main/java/net/minecraft/server/TileEntityLootable.java
|
||||||
@@ -5,9 +5,10 @@ import javax.annotation.Nullable;
|
@@ -4,9 +4,10 @@ import java.util.Random;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class TileEntityLootable extends TileEntityContainer implements ILootable {
|
public abstract class TileEntityLootable extends TileEntityContainer implements ILootable {
|
||||||
|
|
||||||
- protected MinecraftKey g;
|
- protected MinecraftKey g;
|
||||||
- protected long h;
|
- protected long h;
|
||||||
+ protected MinecraftKey g; public MinecraftKey getLootTableKey() { return g; } public void setLootTable(MinecraftKey key) { g = key; } // Paper - OBFHELPER
|
+ protected MinecraftKey g; public MinecraftKey getLootTableKey() { return g; } public void setLootTable(MinecraftKey key) { g = key; } // Paper - OBFHELPER
|
||||||
|
@ -607,7 +607,7 @@ index 60d200f9eb..228d6b2800 100644
|
||||||
|
|
||||||
protected TileEntityLootable(TileEntityTypes<?> tileentitytypes) {
|
protected TileEntityLootable(TileEntityTypes<?> tileentitytypes) {
|
||||||
super(tileentitytypes);
|
super(tileentitytypes);
|
||||||
@@ -23,16 +24,18 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
|
@@ -21,16 +22,18 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
|
||||||
}
|
}
|
||||||
|
|
||||||
protected boolean d(NBTTagCompound nbttagcompound) {
|
protected boolean d(NBTTagCompound nbttagcompound) {
|
||||||
|
@ -627,7 +627,7 @@ index 60d200f9eb..228d6b2800 100644
|
||||||
if (this.g == null) {
|
if (this.g == null) {
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
@@ -41,15 +44,15 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
|
@@ -39,14 +42,14 @@ public abstract class TileEntityLootable extends TileEntityContainer implements
|
||||||
nbttagcompound.setLong("LootTableSeed", this.h);
|
nbttagcompound.setLong("LootTableSeed", this.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -640,12 +640,11 @@ index 60d200f9eb..228d6b2800 100644
|
||||||
- if (this.g != null && this.world.getMinecraftServer() != null) {
|
- if (this.g != null && this.world.getMinecraftServer() != null) {
|
||||||
+ if (lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper
|
+ if (lootableData.shouldReplenish(entityhuman) && this.world.getMinecraftServer() != null) { // Paper
|
||||||
LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.g);
|
LootTable loottable = this.world.getMinecraftServer().getLootTableRegistry().getLootTable(this.g);
|
||||||
|
|
||||||
- this.g = null;
|
- this.g = null;
|
||||||
+ lootableData.processRefill(entityhuman); // Paper
|
+ lootableData.processRefill(entityhuman); // Paper
|
||||||
Random random;
|
Random random;
|
||||||
|
|
||||||
if (this.h == 0L) {
|
if (this.h == 0L) {
|
||||||
|
random = new Random();
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||||
index ac9b4297b2..0558cafe31 100644
|
index ac9b4297b2..0558cafe31 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||||
|
@ -681,7 +680,7 @@ index dff5bb5171..c3e40aa172 100644
|
||||||
public CraftChest(final Block block) {
|
public CraftChest(final Block block) {
|
||||||
super(block, TileEntityChest.class);
|
super(block, TileEntityChest.class);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
index d519252521..a2324c7c8b 100644
|
index 7ef68bb626..daf183fb10 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
|
|
@ -1,17 +1,17 @@
|
||||||
From b24b2307edfb6818ab904d60d55288bbf7a318ff Mon Sep 17 00:00:00 2001
|
From 4e72245ef416b9e944f5ab2db64458f4fde5c065 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 19 Jan 2016 00:13:19 -0500
|
Date: Tue, 19 Jan 2016 00:13:19 -0500
|
||||||
Subject: [PATCH] Do not load chunks for pathfinding
|
Subject: [PATCH] Do not load chunks for pathfinding
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
index 96c0c762ac..7020152a2d 100644
|
index ff740bc1a7..78adbf9062 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||||
@@ -26,7 +26,7 @@ public class ChunkCache implements IIBlockAccess {
|
@@ -21,7 +21,7 @@ public class ChunkCache implements IIBlockAccess {
|
||||||
|
|
||||||
for (l = this.a; l <= j; ++l) {
|
for(int l = this.a; l <= j; ++l) {
|
||||||
for (i1 = this.b; i1 <= k; ++i1) {
|
for(int i1 = this.b; i1 <= k; ++i1) {
|
||||||
- this.c[l - this.a][i1 - this.b] = world.getChunkAt(l, i1);
|
- this.c[l - this.a][i1 - this.b] = world.getChunkAt(l, i1);
|
||||||
+ this.c[l - this.a][i1 - this.b] = world.getChunkIfLoaded(l, i1); // Paper
|
+ this.c[l - this.a][i1 - this.b] = world.getChunkIfLoaded(l, i1); // Paper
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From b4fa1d376f3a2981f359620f3b5814a1bd71fc98 Mon Sep 17 00:00:00 2001
|
From e55c4df2d0b9ab32522e632bb4db0b35066f3f70 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 7 May 2016 23:33:08 -0400
|
Date: Sat, 7 May 2016 23:33:08 -0400
|
||||||
Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat
|
Subject: [PATCH] Don't save empty scoreboard teams to scoreboard.dat
|
||||||
|
@ -19,17 +19,17 @@ index 9fe1311143..a1110da38e 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
diff --git a/src/main/java/net/minecraft/server/PersistentScoreboard.java b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
||||||
index 0260fb7ec9..45d8de1b7b 100644
|
index f2e8eface3..895ea0eb41 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
--- a/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
+++ b/src/main/java/net/minecraft/server/PersistentScoreboard.java
|
||||||
@@ -177,6 +177,7 @@ public class PersistentScoreboard extends PersistentBase {
|
@@ -160,6 +160,7 @@ public class PersistentScoreboard extends PersistentBase {
|
||||||
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
|
|
||||||
while (iterator.hasNext()) {
|
for(ScoreboardTeam scoreboardteam : this.b.getTeams()) {
|
||||||
ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
|
|
||||||
+ if (!com.destroystokyo.paper.PaperConfig.saveEmptyScoreboardTeams && scoreboardteam.getPlayerNameSet().isEmpty()) continue; // Paper
|
+ if (!com.destroystokyo.paper.PaperConfig.saveEmptyScoreboardTeams && scoreboardteam.getPlayerNameSet().isEmpty()) continue; // Paper
|
||||||
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
NBTTagCompound nbttagcompound = new NBTTagCompound();
|
||||||
|
|
||||||
nbttagcompound.setString("Name", scoreboardteam.getName());
|
nbttagcompound.setString("Name", scoreboardteam.getName());
|
||||||
|
nbttagcompound.setString("DisplayName", IChatBaseComponent.ChatSerializer.a(scoreboardteam.getDisplayName()));
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 80700c3208205e80f59a8d4b0f0f3c1f73bb6d2d Mon Sep 17 00:00:00 2001
|
From f272cc446d703160be856e5630def2168f8f002e Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 17 Jun 2016 20:50:11 -0400
|
Date: Fri, 17 Jun 2016 20:50:11 -0400
|
||||||
Subject: [PATCH] Fix Old Sign Conversion
|
Subject: [PATCH] Fix Old Sign Conversion
|
||||||
|
@ -9,18 +9,18 @@ Subject: [PATCH] Fix Old Sign Conversion
|
||||||
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
diff --git a/src/main/java/net/minecraft/server/DefinedStructure.java b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
index bb1d00e440..9f29225cbd 100644
|
index 987d944dbd..5f6fb44ffa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
--- a/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
+++ b/src/main/java/net/minecraft/server/DefinedStructure.java
|
||||||
@@ -218,9 +218,11 @@ public class DefinedStructure {
|
@@ -190,9 +190,11 @@ public class DefinedStructure {
|
||||||
definedstructure_blockinfo1.c.setInt("x", blockposition1.getX());
|
definedstructure$blockinfo1.c.setInt("x", blockposition1.getX());
|
||||||
definedstructure_blockinfo1.c.setInt("y", blockposition1.getY());
|
definedstructure$blockinfo1.c.setInt("y", blockposition1.getY());
|
||||||
definedstructure_blockinfo1.c.setInt("z", blockposition1.getZ());
|
definedstructure$blockinfo1.c.setInt("z", blockposition1.getZ());
|
||||||
+ tileentity.isLoadingStructure = true; // Paper
|
+ tileentity2.isLoadingStructure = true; // Paper
|
||||||
tileentity.load(definedstructure_blockinfo1.c);
|
tileentity2.load(definedstructure$blockinfo1.c);
|
||||||
tileentity.a(definedstructureinfo.b());
|
tileentity2.a(definedstructureinfo.b());
|
||||||
tileentity.a(definedstructureinfo.c());
|
tileentity2.a(definedstructureinfo.c());
|
||||||
+ tileentity.isLoadingStructure = false; // Paper
|
+ tileentity2.isLoadingStructure = false; // Paper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,39 +1,42 @@
|
||||||
From dd5091874dfece083093092af4cbda9ba622537c Mon Sep 17 00:00:00 2001
|
From 6d92bd624a75098dfeae5b99362e4fd0e13df989 Mon Sep 17 00:00:00 2001
|
||||||
From: Alfie Cleveland <alfeh@me.com>
|
From: Alfie Cleveland <alfeh@me.com>
|
||||||
Date: Fri, 19 Aug 2016 01:52:56 +0100
|
Date: Fri, 19 Aug 2016 01:52:56 +0100
|
||||||
Subject: [PATCH] Optimise BlockStateEnum hashCode and equals
|
Subject: [PATCH] Optimise BlockStateEnum hashCode and equals
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||||
index 725087de59..5e6cb5d7de 100644
|
index 73623a21c5..9d8a03be8d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
|
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||||
@@ -17,6 +17,11 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
@@ -8,6 +8,7 @@ import java.util.Arrays;
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Optional;
|
||||||
|
+import java.util.concurrent.atomic.AtomicInteger;
|
||||||
|
import java.util.function.Predicate;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@@ -15,11 +16,17 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
||||||
private final ImmutableSet<T> a;
|
private final ImmutableSet<T> a;
|
||||||
private final Map<String, T> b = Maps.newHashMap();
|
private final Map<String, T> b = Maps.newHashMap();
|
||||||
|
|
||||||
+ // Paper start - BlockStateEnum is a singleton, so we can use our own hashCode
|
+ // Paper start - BlockStateEnum is a singleton, so we can use our own hashCode
|
||||||
+ private static int hashId = 0;
|
+ private static AtomicInteger hashId = new AtomicInteger(1);
|
||||||
+ private int hashCode;
|
+ private int hashCode;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
+
|
||||||
protected BlockStateEnum(String s, Class<T> oclass, Collection<T> collection) {
|
protected BlockStateEnum(String s, Class<T> oclass, Collection<T> collection) {
|
||||||
super(s, oclass);
|
super(s, oclass);
|
||||||
this.a = ImmutableSet.copyOf(collection);
|
this.a = ImmutableSet.copyOf(collection);
|
||||||
@@ -30,9 +35,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
|
||||||
throw new IllegalArgumentException("Multiple values have the same name \'" + s1 + "\'");
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.b.put(s1, oenum);
|
- for(Enum oenum : collection) {
|
||||||
+ this.b.put(s1, (T) oenum); // Paper - decompile fix
|
+ this.hashCode = hashId.getAndIncrement() * 61; // Paper
|
||||||
}
|
+ for(T oenum : collection) { // Paper - decompile fix
|
||||||
|
String s1 = ((INamable)oenum).getName();
|
||||||
+ this.hashCode = hashId++; // Paper
|
if (this.b.containsKey(s1)) {
|
||||||
}
|
throw new IllegalArgumentException("Multiple values have the same name '" + s1 + "'");
|
||||||
|
@@ -42,22 +49,14 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
||||||
public Collection<T> d() {
|
return ((INamable)oenum).getName();
|
||||||
@@ -47,24 +53,14 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
|
||||||
return ((INamable) t0).getName();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ @Override // Paper start - override equals as BlockStateEnum is a singleton
|
+ @Override // Paper start - override equals as BlockStateEnum is a singleton
|
||||||
|
@ -41,9 +44,8 @@ index 725087de59..5e6cb5d7de 100644
|
||||||
- if (this == object) {
|
- if (this == object) {
|
||||||
- return true;
|
- return true;
|
||||||
- } else if (object instanceof BlockStateEnum && super.equals(object)) {
|
- } else if (object instanceof BlockStateEnum && super.equals(object)) {
|
||||||
- BlockStateEnum blockstateenum = (BlockStateEnum) object;
|
- BlockStateEnum blockstateenum1 = (BlockStateEnum)object;
|
||||||
-
|
- return this.a.equals(blockstateenum1.a) && this.b.equals(blockstateenum1.b);
|
||||||
- return this.a.equals(blockstateenum.a) && this.b.equals(blockstateenum.b);
|
|
||||||
- } else {
|
- } else {
|
||||||
- return false;
|
- return false;
|
||||||
- }
|
- }
|
||||||
|
@ -53,7 +55,6 @@ index 725087de59..5e6cb5d7de 100644
|
||||||
|
|
||||||
public int c() {
|
public int c() {
|
||||||
- int i = super.c();
|
- int i = super.c();
|
||||||
-
|
|
||||||
- i = 31 * i + this.a.hashCode();
|
- i = 31 * i + this.a.hashCode();
|
||||||
- i = 31 * i + this.b.hashCode();
|
- i = 31 * i + this.b.hashCode();
|
||||||
- return i;
|
- return i;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d1ec7e8b6b6c83d3f142b5533340ae10a2ac9048 Mon Sep 17 00:00:00 2001
|
From 73c75f27648ff2c90326d37c4be63ca064278ea4 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 3 Nov 2016 20:28:12 -0400
|
Date: Thu, 3 Nov 2016 20:28:12 -0400
|
||||||
Subject: [PATCH] Don't load Chunks from Hoppers and other things
|
Subject: [PATCH] Don't load Chunks from Hoppers and other things
|
||||||
|
@ -13,11 +13,11 @@ This of course is undesirable, so just return the loaded side as "primary"
|
||||||
and treat it as a single chest if the other sides are unloaded
|
and treat it as a single chest if the other sides are unloaded
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
index dd2d62bfba..8afd48de96 100644
|
index 27e6d2b5f2..b3882930ea 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
||||||
@@ -196,7 +196,12 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
|
@@ -181,7 +181,12 @@ public class BlockChest extends BlockTileEntity implements IFluidSource, IFluidC
|
||||||
return (ITileInventory) object;
|
return (ITileInventory)object;
|
||||||
} else {
|
} else {
|
||||||
BlockPosition blockposition1 = blockposition.shift(k(iblockdata));
|
BlockPosition blockposition1 = blockposition.shift(k(iblockdata));
|
||||||
- IBlockData iblockdata1 = world.getType(blockposition1);
|
- IBlockData iblockdata1 = world.getType(blockposition1);
|
||||||
|
@ -27,9 +27,9 @@ index dd2d62bfba..8afd48de96 100644
|
||||||
+ return null;
|
+ return null;
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
if (iblockdata1.getBlock() == this) {
|
if (iblockdata1.getBlock() == this) {
|
||||||
BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType) iblockdata1.get(BlockChest.b);
|
BlockPropertyChestType blockpropertychesttype1 = (BlockPropertyChestType)iblockdata1.get(b);
|
||||||
|
if (blockpropertychesttype1 != BlockPropertyChestType.SINGLE && blockpropertychesttype != blockpropertychesttype1 && iblockdata1.get(FACING) == iblockdata.get(FACING)) {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From a51800a28e394769c3410665328f4e43337f980b Mon Sep 17 00:00:00 2001
|
From f35437d281706ae7e892fd454f2bd8035bbafde9 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Mon, 19 Dec 2016 23:07:42 -0500
|
Date: Mon, 19 Dec 2016 23:07:42 -0500
|
||||||
Subject: [PATCH] Prevent Pathfinding out of World Border
|
Subject: [PATCH] Prevent Pathfinding out of World Border
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Prevent Pathfinding out of World Border
|
||||||
This prevents Entities from trying to run outside of the World Border
|
This prevents Entities from trying to run outside of the World Border
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
diff --git a/src/main/java/net/minecraft/server/NavigationAbstract.java b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
index 76d1f4bd21..76b2787bae 100644
|
index a8b070ed32..452da80f11 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
--- a/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
+++ b/src/main/java/net/minecraft/server/NavigationAbstract.java
|
||||||
@@ -73,6 +73,7 @@ public abstract class NavigationAbstract {
|
@@ -69,6 +69,7 @@ public abstract class NavigationAbstract {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public PathEntity b(BlockPosition blockposition) {
|
public PathEntity b(BlockPosition blockposition) {
|
||||||
|
@ -17,14 +17,14 @@ index 76d1f4bd21..76b2787bae 100644
|
||||||
if (!this.b()) {
|
if (!this.b()) {
|
||||||
return null;
|
return null;
|
||||||
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
} else if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||||
@@ -99,6 +100,7 @@ public abstract class NavigationAbstract {
|
@@ -93,6 +94,7 @@ public abstract class NavigationAbstract {
|
||||||
return null;
|
return null;
|
||||||
} else {
|
} else {
|
||||||
BlockPosition blockposition = new BlockPosition(entity);
|
BlockPosition blockposition = new BlockPosition(entity);
|
||||||
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border
|
+ if (!getEntity().getWorld().getWorldBorder().isInBounds(blockposition)) return null; // Paper - don't path out of world border
|
||||||
|
|
||||||
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
if (this.c != null && !this.c.b() && blockposition.equals(this.q)) {
|
||||||
return this.c;
|
return this.c;
|
||||||
|
} else {
|
||||||
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
diff --git a/src/main/java/net/minecraft/server/WorldBorder.java b/src/main/java/net/minecraft/server/WorldBorder.java
|
||||||
index acd76e13bb..1a87480f09 100644
|
index acd76e13bb..1a87480f09 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
--- a/src/main/java/net/minecraft/server/WorldBorder.java
|
||||||
|
|
|
@ -1,24 +1,36 @@
|
||||||
From e0b6b4859c0c2753033823614bd3b1217cee79be Mon Sep 17 00:00:00 2001
|
From 9a2fb172b54d40c416117cb3c658adcb7d9a86fd Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 27 Dec 2016 22:38:06 -0500
|
Date: Tue, 27 Dec 2016 22:38:06 -0500
|
||||||
Subject: [PATCH] Activation Range Improvements
|
Subject: [PATCH] Activation Range Improvements
|
||||||
|
|
||||||
Fixes and adds new Immunities to improve gameplay behavior
|
Fixes and adds new Immunities to improve gameplay behavior
|
||||||
|
|
||||||
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
|
index f4ed98d2d9..1dfd71df0a 100644
|
||||||
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
|
@@ -326,6 +326,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
|
this.c = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ public BlockPosition toBlockPosition() { return h(); } // Paper - OBFHELPER
|
||||||
|
public BlockPosition h() {
|
||||||
|
return new BlockPosition(this);
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
index 3790039f18..a644f393af 100644
|
index a5c147b989..9e88897a07 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||||
@@ -7,6 +7,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
@@ -7,6 +7,7 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||||
public abstract class EntityCreature extends EntityInsentient {
|
public abstract class EntityCreature extends EntityInsentient {
|
||||||
|
|
||||||
public org.bukkit.craftbukkit.entity.CraftCreature getBukkitEntity() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
|
public org.bukkit.craftbukkit.entity.CraftCreature getBukkitCreature() { return (org.bukkit.craftbukkit.entity.CraftCreature) super.getBukkitEntity(); } // Paper
|
||||||
+ public BlockPosition movingTarget = null; public BlockPosition getMovingTarget() { return movingTarget; } // Paper
|
+ public BlockPosition movingTarget = null; public BlockPosition getMovingTarget() { return movingTarget; } // Paper
|
||||||
private BlockPosition a;
|
private BlockPosition a;
|
||||||
private float b;
|
private float b;
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 7e13a78411..60f22959b5 100644
|
index fd59710b2b..426c6ac68f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -74,7 +74,7 @@ public abstract class EntityLiving extends Entity {
|
@@ -74,7 +74,7 @@ public abstract class EntityLiving extends Entity {
|
||||||
|
@ -31,10 +43,10 @@ index 7e13a78411..60f22959b5 100644
|
||||||
protected int ticksFarFromPlayer;
|
protected int ticksFarFromPlayer;
|
||||||
protected float aZ;
|
protected float aZ;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLlama.java b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||||
index cdf50ed1cf..10b325043c 100644
|
index b661a86901..26184f463a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLlama.java
|
--- a/src/main/java/net/minecraft/server/EntityLlama.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
|
+++ b/src/main/java/net/minecraft/server/EntityLlama.java
|
||||||
@@ -363,6 +363,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
|
@@ -340,6 +340,7 @@ public class EntityLlama extends EntityHorseChestedAbstract implements IRangedEn
|
||||||
return this.bR != null;
|
return this.bR != null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,29 +55,27 @@ index cdf50ed1cf..10b325043c 100644
|
||||||
return this.bQ != null;
|
return this.bQ != null;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoal.java b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||||
index a146a8b459..a19853463c 100644
|
index acc099e955..339c78eec9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PathfinderGoal.java
|
--- a/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoal.java
|
||||||
@@ -18,7 +18,10 @@ public abstract class PathfinderGoal {
|
@@ -20,7 +20,9 @@ public abstract class PathfinderGoal {
|
||||||
|
}
|
||||||
|
|
||||||
public void c() {}
|
public void d() {
|
||||||
|
|
||||||
- public void d() {}
|
|
||||||
+ public void d() {
|
|
||||||
+ onTaskReset(); // Paper
|
+ onTaskReset(); // Paper
|
||||||
+ }
|
}
|
||||||
+ public void onTaskReset() {} // Paper
|
+ public void onTaskReset() {} // Paper
|
||||||
|
|
||||||
public void e() {}
|
public void e() {
|
||||||
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||||
index d5c08aa7cb..fe6570c88d 100644
|
index 9a75cb63ba..cf10605aaa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
--- a/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
+++ b/src/main/java/net/minecraft/server/PathfinderGoalGotoTarget.java
|
||||||
@@ -2,17 +2,24 @@ package net.minecraft.server;
|
@@ -1,12 +1,12 @@
|
||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
||||||
|
|
||||||
- private final EntityCreature f;
|
- private final EntityCreature f;
|
||||||
+ private final EntityCreature f; public EntityCreature getEntity() { return f; } // Paper - OBFHELPER
|
+ private final EntityCreature f; public EntityCreature getEntity() { return f; } // Paper - OBFHELPER
|
||||||
public double a;
|
public double a;
|
||||||
|
@ -77,8 +87,10 @@ index d5c08aa7cb..fe6570c88d 100644
|
||||||
private boolean h;
|
private boolean h;
|
||||||
private final int i;
|
private final int i;
|
||||||
private final int j;
|
private final int j;
|
||||||
public int e;
|
@@ -15,6 +15,13 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
||||||
|
public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix) {
|
||||||
|
this(entitycreature, d0, ix, 1);
|
||||||
|
}
|
||||||
+ // Paper start - activation range improvements
|
+ // Paper start - activation range improvements
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public void onTaskReset() {
|
+ public void onTaskReset() {
|
||||||
|
@ -86,15 +98,14 @@ index d5c08aa7cb..fe6570c88d 100644
|
||||||
+ setTarget(BlockPosition.ZERO);
|
+ setTarget(BlockPosition.ZERO);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int i) {
|
|
||||||
this(entitycreature, d0, i, 1);
|
public PathfinderGoalGotoTarget(EntityCreature entitycreature, double d0, int ix, int jx) {
|
||||||
}
|
this.d = BlockPosition.ZERO;
|
||||||
@@ -93,7 +100,7 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
@@ -93,6 +100,7 @@ public abstract class PathfinderGoalGotoTarget extends PathfinderGoal {
|
||||||
for (int j1 = i1 < l && i1 > -l ? l : 0; j1 <= l; j1 = j1 > 0 ? -j1 : 1 - j1) {
|
blockposition$mutableblockposition.g(blockposition).d(i1, k - 1, j1);
|
||||||
blockposition_mutableblockposition.g(blockposition).d(i1, k - 1, j1);
|
if (this.f.f(blockposition$mutableblockposition) && this.a(this.f.world, blockposition$mutableblockposition)) {
|
||||||
if (this.f.f((BlockPosition) blockposition_mutableblockposition) && this.a(this.f.world, blockposition_mutableblockposition)) {
|
this.d = blockposition$mutableblockposition;
|
||||||
- this.d = blockposition_mutableblockposition;
|
+ setTarget(blockposition$mutableblockposition.toBlockPosition()); // Paper
|
||||||
+ setTarget(blockposition_mutableblockposition); // Paper
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 2f347649f80f9ab29d035f5e7024c26bbd88bf5e Mon Sep 17 00:00:00 2001
|
From ac66f2245259ac48df1900cb170f67b3c4b0571b Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 28 Dec 2016 01:18:33 -0500
|
Date: Wed, 28 Dec 2016 01:18:33 -0500
|
||||||
Subject: [PATCH] Firework API's
|
Subject: [PATCH] Firework API's
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFireworks.java b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
index 6e2592e96d..f9332d3fda 100644
|
index 6e2592e96d..7ff57d9cda 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
--- a/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
+++ b/src/main/java/net/minecraft/server/EntityFireworks.java
|
||||||
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
@@ -2,6 +2,8 @@ package net.minecraft.server;
|
||||||
|
@ -27,19 +27,20 @@ index 6e2592e96d..f9332d3fda 100644
|
||||||
|
|
||||||
public EntityFireworks(World world) {
|
public EntityFireworks(World world) {
|
||||||
super(EntityTypes.FIREWORK_ROCKET, world);
|
super(EntityTypes.FIREWORK_ROCKET, world);
|
||||||
@@ -196,6 +199,11 @@ public class EntityFireworks extends Entity {
|
@@ -197,6 +200,12 @@ public class EntityFireworks extends Entity {
|
||||||
if (!itemstack.isEmpty()) {
|
|
||||||
nbttagcompound.set("FireworksItem", itemstack.save(new NBTTagCompound()));
|
nbttagcompound.set("FireworksItem", itemstack.save(new NBTTagCompound()));
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ if (spawningEntity != null) {
|
+ if (spawningEntity != null) {
|
||||||
+ nbttagcompound.setUUID("SpawningEntity", spawningEntity);
|
+ nbttagcompound.setUUID("SpawningEntity", spawningEntity);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
+
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -207,7 +215,11 @@ public class EntityFireworks extends Entity {
|
public void a(NBTTagCompound nbttagcompound) {
|
||||||
|
@@ -207,7 +216,11 @@ public class EntityFireworks extends Entity {
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
this.datawatcher.set(EntityFireworks.FIREWORK_ITEM, itemstack);
|
this.datawatcher.set(EntityFireworks.FIREWORK_ITEM, itemstack);
|
||||||
}
|
}
|
||||||
|
@ -53,30 +54,30 @@ index 6e2592e96d..f9332d3fda 100644
|
||||||
|
|
||||||
public boolean bk() {
|
public boolean bk() {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
index 5eae1724ed..d4420e68fb 100644
|
index 936faccbf8..d971bbc76c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
@@ -19,6 +19,7 @@ public class ItemFireworks extends Item {
|
@@ -14,6 +14,7 @@ public class ItemFireworks extends Item {
|
||||||
|
BlockPosition blockposition = itemactioncontext.getClickPosition();
|
||||||
ItemStack itemstack = itemactioncontext.getItemStack();
|
ItemStack itemstack = itemactioncontext.getItemStack();
|
||||||
EntityFireworks entityfireworks = new EntityFireworks(world, (double) ((float) blockposition.getX() + itemactioncontext.m()), (double) ((float) blockposition.getY() + itemactioncontext.n()), (double) ((float) blockposition.getZ() + itemactioncontext.o()), itemstack);
|
EntityFireworks entityfireworks = new EntityFireworks(world, (double)((float)blockposition.getX() + itemactioncontext.m()), (double)((float)blockposition.getY() + itemactioncontext.n()), (double)((float)blockposition.getZ() + itemactioncontext.o()), itemstack);
|
||||||
|
|
||||||
+ entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper
|
+ entityfireworks.spawningEntity = itemactioncontext.b.getUniqueID(); // Paper
|
||||||
world.addEntity(entityfireworks);
|
world.addEntity(entityfireworks);
|
||||||
itemstack.subtract(1);
|
itemstack.subtract(1);
|
||||||
}
|
}
|
||||||
@@ -33,6 +34,7 @@ public class ItemFireworks extends Item {
|
@@ -26,6 +27,7 @@ public class ItemFireworks extends Item {
|
||||||
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
||||||
|
|
||||||
+ entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
+ entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
||||||
world.addEntity(entityfireworks);
|
world.addEntity(entityfireworks);
|
||||||
if (!entityhuman.abilities.canInstantlyBuild) {
|
if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
itemstack.subtract(1);
|
itemstack.subtract(1);
|
||||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
index e658816c24..0d69deb51c 100644
|
index 2a66a30264..6046e3e7b9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||||
@@ -108,7 +108,7 @@ public class NBTTagCompound implements NBTBase {
|
@@ -101,7 +101,7 @@ public class NBTTagCompound implements NBTBase {
|
||||||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 8cbd912cf60f5989d4b7fdd54f58466b5455906a Mon Sep 17 00:00:00 2001
|
From 3dad1401f1bc22c4d037e64161992b62221a480f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 5 Feb 2017 19:17:28 -0500
|
Date: Sun, 5 Feb 2017 19:17:28 -0500
|
||||||
Subject: [PATCH] Shame on you Mojang
|
Subject: [PATCH] Shame on you Mojang
|
||||||
|
@ -12,10 +12,10 @@ This then triggers async chunk loads!
|
||||||
What in the hell were you thinking?
|
What in the hell were you thinking?
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java
|
diff --git a/src/main/java/net/minecraft/server/BlockBeacon.java b/src/main/java/net/minecraft/server/BlockBeacon.java
|
||||||
index 1181d45fad..d081166d86 100644
|
index 7148ea3692..6d4e82b404 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockBeacon.java
|
--- a/src/main/java/net/minecraft/server/BlockBeacon.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockBeacon.java
|
+++ b/src/main/java/net/minecraft/server/BlockBeacon.java
|
||||||
@@ -49,7 +49,7 @@ public class BlockBeacon extends BlockTileEntity {
|
@@ -46,7 +46,7 @@ public class BlockBeacon extends BlockTileEntity {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void a(World world, BlockPosition blockposition) {
|
public static void a(World world, BlockPosition blockposition) {
|
||||||
|
@ -23,8 +23,8 @@ index 1181d45fad..d081166d86 100644
|
||||||
+ //HttpUtilities.a.submit(() -> { // Paper
|
+ //HttpUtilities.a.submit(() -> { // Paper
|
||||||
Chunk chunk = world.getChunkAtWorldCoords(blockposition);
|
Chunk chunk = world.getChunkAtWorldCoords(blockposition);
|
||||||
|
|
||||||
for (int i = blockposition.getY() - 1; i >= 0; --i) {
|
for(int i = blockposition.getY() - 1; i >= 0; --i) {
|
||||||
@@ -73,7 +73,6 @@ public class BlockBeacon extends BlockTileEntity {
|
@@ -67,7 +67,6 @@ public class BlockBeacon extends BlockTileEntity {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 0ed2995d925d4bf1a86f7212f4e3ae914d0d144d Mon Sep 17 00:00:00 2001
|
From b076d81196c1378797a0d37d050d0fc193590b82 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Fri, 5 May 2017 03:57:17 -0500
|
Date: Fri, 5 May 2017 03:57:17 -0500
|
||||||
Subject: [PATCH] Item#canEntityPickup
|
Subject: [PATCH] Item#canEntityPickup
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index ec06f4badb..d4c86c2d65 100644
|
index 6f5f3f8cd0..04a1218ed9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -517,6 +517,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -518,6 +518,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
EntityItem entityitem = (EntityItem) iterator.next();
|
EntityItem entityitem = (EntityItem) iterator.next();
|
||||||
|
|
||||||
if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.q()) {
|
if (!entityitem.dead && !entityitem.getItemStack().isEmpty() && !entityitem.q()) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 792f97956c253f4eae704aa180c5eac621b3a9b0 Mon Sep 17 00:00:00 2001
|
From 70189f3c39051e0bbd3a6fd2071b6aba7f089dfd Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 May 2016 23:59:38 -0400
|
Date: Wed, 4 May 2016 23:59:38 -0400
|
||||||
Subject: [PATCH] Implement getI18NDisplayName
|
Subject: [PATCH] Implement getI18NDisplayName
|
||||||
|
@ -8,16 +8,16 @@ Currently the server only supports the English language. To override this,
|
||||||
You must replace the language file embedded in the server jar.
|
You must replace the language file embedded in the server jar.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
diff --git a/src/main/java/net/minecraft/server/LocaleLanguage.java b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
index 4361b2cee..f81887c66 100644
|
index 0648c76a07..bea146630d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
--- a/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
+++ b/src/main/java/net/minecraft/server/LocaleLanguage.java
|
||||||
@@ -44,10 +44,12 @@ public class LocaleLanguage {
|
@@ -39,10 +39,12 @@ public class LocaleLanguage {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static LocaleLanguage getInstance() { return a(); } // Paper - OBFHELPER
|
+ public static LocaleLanguage getInstance() { return a(); } // Paper - OBFHELPER
|
||||||
public static LocaleLanguage a() {
|
public static LocaleLanguage a() {
|
||||||
return LocaleLanguage.c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public synchronized String translateKey(String key) { return a(key); } // Paper - OBFHELPER
|
+ public synchronized String translateKey(String key) { return a(key); } // Paper - OBFHELPER
|
||||||
|
@ -25,7 +25,7 @@ index 4361b2cee..f81887c66 100644
|
||||||
return this.c(s);
|
return this.c(s);
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
index be5f922cb..caaed7cf0 100644
|
index be5f922cb6..caaed7cf0b 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
|
||||||
@@ -300,5 +300,18 @@ public final class CraftItemFactory implements ItemFactory {
|
@@ -300,5 +300,18 @@ public final class CraftItemFactory implements ItemFactory {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 37bd8ea924c7ec4f22345b6c25751e02928ce96f Mon Sep 17 00:00:00 2001
|
From ba92e8671f51c00dca93612905edd40b342da041 Mon Sep 17 00:00:00 2001
|
||||||
From: pkt77 <parkerkt77@gmail.com>
|
From: pkt77 <parkerkt77@gmail.com>
|
||||||
Date: Fri, 10 Nov 2017 23:46:34 -0500
|
Date: Fri, 10 Nov 2017 23:46:34 -0500
|
||||||
Subject: [PATCH] Add PlayerArmorChangeEvent
|
Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
index 2ff82694b4..e2ceb7ae4b 100644
|
index 72a2164fdf..61af2621c5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -30,11 +30,11 @@ index 2ff82694b4..e2ceb7ae4b 100644
|
||||||
if (!itemstack.isEmpty()) {
|
if (!itemstack.isEmpty()) {
|
||||||
this.getAttributeMap().a(itemstack.a(enumitemslot));
|
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
|
diff --git a/src/main/java/net/minecraft/server/EnumItemSlot.java b/src/main/java/net/minecraft/server/EnumItemSlot.java
|
||||||
index cdf3a3ba4a..be5d0bf898 100644
|
index a90ac68c30..49592e5572 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnumItemSlot.java
|
--- a/src/main/java/net/minecraft/server/EnumItemSlot.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnumItemSlot.java
|
+++ b/src/main/java/net/minecraft/server/EnumItemSlot.java
|
||||||
@@ -16,6 +16,7 @@ public enum EnumItemSlot {
|
@@ -20,6 +20,7 @@ public enum EnumItemSlot {
|
||||||
this.j = s;
|
this.j = s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER
|
+ public EnumItemSlot.Function getType() { return this.a(); } // Paper - OBFHELPER
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4672fc0942d4d2f48066ec4fb9bbd9c95649954e Mon Sep 17 00:00:00 2001
|
From 65f0017a20693d08e7505bacc012ce1acc342be6 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 20 Dec 2017 17:36:49 -0500
|
Date: Wed, 20 Dec 2017 17:36:49 -0500
|
||||||
Subject: [PATCH] Ability to apply mending to XP API
|
Subject: [PATCH] Ability to apply mending to XP API
|
||||||
|
@ -10,22 +10,22 @@ of giving the player experience points.
|
||||||
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
Both an API To standalone mend, and apply mending logic to .giveExp has been added.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
diff --git a/src/main/java/net/minecraft/server/EnchantmentManager.java b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
index c90e413f8c..c365bfea04 100644
|
index fd6df39f17..f03aef2fed 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
|
--- a/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
+++ b/src/main/java/net/minecraft/server/EnchantmentManager.java
|
||||||
@@ -244,6 +244,7 @@ public class EnchantmentManager {
|
@@ -223,6 +223,7 @@ public class EnchantmentManager {
|
||||||
return getEnchantmentLevel(Enchantments.F, itemstack) > 0;
|
return getEnchantmentLevel(Enchantments.F, itemstack) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) { return b(enchantment, entityliving); } // Paper - OBFHELPER
|
+ public static ItemStack getRandomEquippedItemWithEnchant(Enchantment enchantment, EntityLiving entityliving) { return b(enchantment, entityliving); } // Paper - OBFHELPER
|
||||||
public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) {
|
public static ItemStack b(Enchantment enchantment, EntityLiving entityliving) {
|
||||||
List list = enchantment.a(entityliving);
|
List<ItemStack> list = enchantment.a(entityliving);// Paper - decompile fix
|
||||||
|
if (list.isEmpty()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/Enchantments.java b/src/main/java/net/minecraft/server/Enchantments.java
|
diff --git a/src/main/java/net/minecraft/server/Enchantments.java b/src/main/java/net/minecraft/server/Enchantments.java
|
||||||
index 836fe13c3d..27093a672e 100644
|
index 8cfb38b826..44b2d428b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Enchantments.java
|
--- a/src/main/java/net/minecraft/server/Enchantments.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Enchantments.java
|
+++ b/src/main/java/net/minecraft/server/Enchantments.java
|
||||||
@@ -36,7 +36,7 @@ public class Enchantments {
|
@@ -35,7 +35,7 @@ public class Enchantments {
|
||||||
public static final Enchantment D = a("impaling");
|
public static final Enchantment D = a("impaling");
|
||||||
public static final Enchantment E = a("riptide");
|
public static final Enchantment E = a("riptide");
|
||||||
public static final Enchantment F = a("channeling");
|
public static final Enchantment F = a("channeling");
|
||||||
|
|
|
@ -1,37 +1,32 @@
|
||||||
From 383a42b10e28e543f3e36282d70a5bec1488ffc7 Mon Sep 17 00:00:00 2001
|
From d98a2ce8557954a8e01732faa85d2e64995de321 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 10 Mar 2018 16:33:15 -0500
|
Date: Sat, 10 Mar 2018 16:33:15 -0500
|
||||||
Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
|
Subject: [PATCH] Prevent Frosted Ice from loading/holding chunks
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
diff --git a/src/main/java/net/minecraft/server/BlockIceFrost.java b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
index 302d420512..c97937e810 100644
|
index 7bea86f52b..ea3a6f2fb1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
--- a/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
+++ b/src/main/java/net/minecraft/server/BlockIceFrost.java
|
||||||
@@ -25,6 +25,12 @@ public class BlockIceFrost extends BlockIce {
|
@@ -16,7 +16,8 @@ public class BlockIceFrost extends BlockIce {
|
||||||
EnumDirection enumdirection = aenumdirection[j];
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
||||||
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
||||||
blockposition_b.j(blockposition).d(enumdirection);
|
blockposition$b.j(blockposition).d(enumdirection);
|
||||||
+
|
- IBlockData iblockdata1 = world.getType(blockposition$b);
|
||||||
+ // Paper start - Prevent Frosted Ice from loading/holding chunks
|
+ IBlockData iblockdata1 = world.getTypeIfLoaded(blockposition$b); // Paper - don't load chunks
|
||||||
+ if (!world.isChunkLoaded(blockposition_b.getX() >> 4, blockposition_b.getZ() >> 4, true))
|
+ if (iblockdata1 == null) continue; // Paper
|
||||||
+ continue;
|
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition$b)) {
|
||||||
+ // Paper end - Prevent Frosted Ice from loading/holding chunks
|
world.J().a(blockposition$b, this, MathHelper.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
|
||||||
+
|
}
|
||||||
IBlockData iblockdata1 = world.getType(blockposition_b);
|
@@ -53,7 +54,7 @@ public class BlockIceFrost extends BlockIce {
|
||||||
|
try (BlockPosition.b blockposition$b = BlockPosition.b.r()) {
|
||||||
if (iblockdata1.getBlock() == this && !this.c(iblockdata1, world, blockposition_b)) {
|
for(EnumDirection enumdirection : EnumDirection.values()) {
|
||||||
@@ -87,6 +93,10 @@ public class BlockIceFrost extends BlockIce {
|
blockposition$b.j(blockposition).d(enumdirection);
|
||||||
EnumDirection enumdirection = aenumdirection[l];
|
- if (iblockaccess.getType(blockposition$b).getBlock() == this) {
|
||||||
|
+ if (((World) iblockaccess).getBlockIfLoaded(blockposition$b) == this) { // Paper - don't load chunks
|
||||||
blockposition_b.j(blockposition).d(enumdirection);
|
|
||||||
+ // Paper start - Prevent Frosted Ice from loading/holding chunks
|
|
||||||
+ if (!((World) iblockaccess).isChunkLoaded(blockposition_b.getX() >> 4, blockposition_b.getZ() >> 4, true))
|
|
||||||
+ continue;
|
|
||||||
+ // Paper end - Prevent Frosted Ice from loading/holding chunks
|
|
||||||
if (iblockaccess.getType(blockposition_b).getBlock() == this) {
|
|
||||||
++j;
|
++j;
|
||||||
if (j >= i) {
|
if (j >= i) {
|
||||||
|
boolean flag = false;
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 4305123c0458309d67e39c873edfaa8df355c881 Mon Sep 17 00:00:00 2001
|
From bab7db69e8d1867bdfbf4808929cbde2f8bd8190 Mon Sep 17 00:00:00 2001
|
||||||
From: Minecrell <minecrell@minecrell.net>
|
From: Minecrell <minecrell@minecrell.net>
|
||||||
Date: Wed, 11 Oct 2017 15:56:26 +0200
|
Date: Wed, 11 Oct 2017 15:56:26 +0200
|
||||||
Subject: [PATCH] Implement extended PaperServerListPingEvent
|
Subject: [PATCH] Implement extended PaperServerListPingEvent
|
||||||
|
@ -234,7 +234,7 @@ index c9edd289ac..8aa121e2f7 100644
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
diff --git a/src/main/java/net/minecraft/server/ServerPing.java b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
index d7e1ecc031..f20cddc41c 100644
|
index 615aa2cd04..408aad098a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
--- a/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
+++ b/src/main/java/net/minecraft/server/ServerPing.java
|
||||||
@@ -29,6 +29,7 @@ public class ServerPing {
|
@@ -29,6 +29,7 @@ public class ServerPing {
|
||||||
|
@ -245,7 +245,7 @@ index d7e1ecc031..f20cddc41c 100644
|
||||||
public ServerPing.ServerPingPlayerSample b() {
|
public ServerPing.ServerPingPlayerSample b() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
@@ -176,10 +177,12 @@ public class ServerPing {
|
@@ -174,10 +175,12 @@ public class ServerPing {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 323d78929cc2fe12158a6d63a430a6bc2ba6295c Mon Sep 17 00:00:00 2001
|
From 88efcbefbf681a65f0c9a7e87669f91cdc4f85fe Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 21 Mar 2018 20:52:07 -0400
|
Date: Wed, 21 Mar 2018 20:52:07 -0400
|
||||||
Subject: [PATCH] Fix Dragon Server Crashes
|
Subject: [PATCH] Fix Dragon Server Crashes
|
||||||
|
@ -7,17 +7,17 @@ If the dragon tries to find "ground" and hits a hole, or off edge,
|
||||||
it will infinitely keep looking for non air and eventually crash.
|
it will infinitely keep looking for non air and eventually crash.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
index 41b5a4519b..b78d3fe508 100644
|
index da89a69ed6..45f96078c5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
@@ -51,7 +51,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
@@ -49,7 +49,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
||||||
double d2 = this.a.bD.locY + (double) (this.a.bD.length / 2.0F);
|
double d2 = this.a.bD.locY + (double)(this.a.bD.length / 2.0F);
|
||||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
|
BlockPosition.MutableBlockPosition blockposition$mutableblockposition = new BlockPosition.MutableBlockPosition(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
|
||||||
|
|
||||||
- while (this.a.world.isEmpty(blockposition_mutableblockposition)) {
|
- while(this.a.world.isEmpty(blockposition$mutableblockposition)) {
|
||||||
+ while (this.a.world.isEmpty(blockposition_mutableblockposition) && d2 > 0) { // Paper
|
+ while(this.a.world.isEmpty(blockposition$mutableblockposition) && d2 > 0) { // Paper
|
||||||
--d2;
|
--d2;
|
||||||
blockposition_mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
|
blockposition$mutableblockposition.c(MathHelper.floor(d0), MathHelper.floor(d2), MathHelper.floor(d1));
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From bfa21f1ccd2de884b932be3cb954e7e0347fd418 Mon Sep 17 00:00:00 2001
|
From 564fbb85dd3c175df607e688011c4a9dbf82c71f Mon Sep 17 00:00:00 2001
|
||||||
From: Minecrell <minecrell@minecrell.net>
|
From: Minecrell <minecrell@minecrell.net>
|
||||||
Date: Wed, 11 Oct 2017 18:22:50 +0200
|
Date: Wed, 11 Oct 2017 18:22:50 +0200
|
||||||
Subject: [PATCH] Make legacy ping handler more reliable
|
Subject: [PATCH] Make legacy ping handler more reliable
|
||||||
|
@ -28,22 +28,21 @@ respond to the request.
|
||||||
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13
|
[2]: https://netty.io/wiki/user-guide-for-4.x.html#wiki-h4-13
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
index 64fe1d7e83..f7fbf1d76e 100644
|
index 5691d0aeaf..aafca9c9c4 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
@@ -14,6 +14,7 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
@@ -13,6 +13,7 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
private static final Logger a = LogManager.getLogger();
|
private static final Logger a = LogManager.getLogger();
|
||||||
private final ServerConnection b;
|
private final ServerConnection b;
|
||||||
+ private ByteBuf buf; // Paper
|
+ private ByteBuf buf; // Paper
|
||||||
|
|
||||||
public LegacyPingHandler(ServerConnection serverconnection) {
|
public LegacyPingHandler(ServerConnection serverconnection) {
|
||||||
this.b = serverconnection;
|
this.b = serverconnection;
|
||||||
@@ -21,7 +22,16 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
@@ -20,6 +21,16 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
|
||||||
public void channelRead(ChannelHandlerContext channelhandlercontext, Object object) throws Exception {
|
public void channelRead(ChannelHandlerContext channelhandlercontext, Object object) throws Exception {
|
||||||
ByteBuf bytebuf = (ByteBuf) object;
|
ByteBuf bytebuf = (ByteBuf)object;
|
||||||
-
|
|
||||||
+ // Paper start - Make legacy ping handler more reliable
|
+ // Paper start - Make legacy ping handler more reliable
|
||||||
+ if (this.buf != null) {
|
+ if (this.buf != null) {
|
||||||
+ try {
|
+ try {
|
||||||
|
@ -57,27 +56,26 @@ index 64fe1d7e83..f7fbf1d76e 100644
|
||||||
bytebuf.markReaderIndex();
|
bytebuf.markReaderIndex();
|
||||||
boolean flag = true;
|
boolean flag = true;
|
||||||
|
|
||||||
@@ -53,6 +63,10 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
@@ -44,6 +55,10 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
break;
|
this.a(channelhandlercontext, this.a(s));
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
+ // Paper start - Replace with improved version below
|
+ // Paper start - Replace with improved version below
|
||||||
+ if (bytebuf.readUnsignedByte() != 0x01 || bytebuf.readUnsignedByte() != 0xFA) return;
|
+ if (bytebuf.readUnsignedByte() != 0x01 || bytebuf.readUnsignedByte() != 0xFA) return;
|
||||||
+ readLegacy1_6(channelhandlercontext, bytebuf);
|
+ readLegacy1_6(channelhandlercontext, bytebuf);
|
||||||
+ /*
|
+ /*
|
||||||
boolean flag1 = bytebuf.readUnsignedByte() == 1;
|
boolean flag1 = bytebuf.readUnsignedByte() == 1;
|
||||||
|
flag1 = flag1 & bytebuf.readUnsignedByte() == 250;
|
||||||
flag1 &= bytebuf.readUnsignedByte() == 250;
|
flag1 = flag1 & "MC|PingHost".equals(new String(bytebuf.readBytes(bytebuf.readShort() * 2).array(), StandardCharsets.UTF_16BE));
|
||||||
@@ -76,6 +90,8 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
@@ -65,6 +80,7 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
} finally {
|
} finally {
|
||||||
bytebuf1.release();
|
bytebuf1.release();
|
||||||
|
}
|
||||||
|
+ */ // Paper end- end commenting out
|
||||||
}
|
}
|
||||||
+ */
|
|
||||||
+ // Paper end
|
|
||||||
}
|
|
||||||
|
|
||||||
bytebuf.release();
|
bytebuf.release();
|
||||||
@@ -93,6 +109,90 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
@@ -84,6 +100,90 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d564f907024e4d839cc52657be957872b1f133aa Mon Sep 17 00:00:00 2001
|
From ab0a6d4deff47bdb159cb413bb4d93ab3dada3de Mon Sep 17 00:00:00 2001
|
||||||
From: Minecrell <minecrell@minecrell.net>
|
From: Minecrell <minecrell@minecrell.net>
|
||||||
Date: Wed, 11 Oct 2017 19:30:51 +0200
|
Date: Wed, 11 Oct 2017 19:30:51 +0200
|
||||||
Subject: [PATCH] Call PaperServerListPingEvent for legacy pings
|
Subject: [PATCH] Call PaperServerListPingEvent for legacy pings
|
||||||
|
@ -84,7 +84,7 @@ index 0000000000..74c012fd40
|
||||||
+
|
+
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
diff --git a/src/main/java/net/minecraft/server/LegacyPingHandler.java b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
index f7fbf1d76e..1ed2b193a5 100644
|
index aafca9c9c4..860076fc23 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
--- a/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
+++ b/src/main/java/net/minecraft/server/LegacyPingHandler.java
|
||||||
@@ -9,6 +9,7 @@ import java.net.InetSocketAddress;
|
@@ -9,6 +9,7 @@ import java.net.InetSocketAddress;
|
||||||
|
@ -94,48 +94,44 @@ index f7fbf1d76e..1ed2b193a5 100644
|
||||||
+import com.destroystokyo.paper.network.PaperLegacyStatusClient; // Paper
|
+import com.destroystokyo.paper.network.PaperLegacyStatusClient; // Paper
|
||||||
|
|
||||||
public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
private static final Logger a = LogManager.getLogger();
|
||||||
|
@@ -39,10 +40,18 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
InetSocketAddress inetsocketaddress = (InetSocketAddress)channelhandlercontext.channel().remoteAddress();
|
||||||
|
MinecraftServer minecraftserver = this.b.d();
|
||||||
|
int i = bytebuf.readableBytes();
|
||||||
|
+ com.destroystokyo.paper.event.server.PaperServerListPingEvent event; // Paper
|
||||||
|
switch(i) {
|
||||||
|
case 0:
|
||||||
|
a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort());
|
||||||
|
- String s2 = String.format("%s\u00a7%d\u00a7%d", minecraftserver.getMotd(), minecraftserver.y(), minecraftserver.z());
|
||||||
|
+ // Paper start - Call PaperServerListPingEvent and use results
|
||||||
|
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null);
|
||||||
|
+ if (event == null) {
|
||||||
|
+ channelhandlercontext.close();
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
+ String s2 = String.format("%s\u00a7%d\u00a7%d", PaperLegacyStatusClient.getUnformattedMotd(event), event.getNumPlayers(), event.getMaxPlayers());
|
||||||
|
+ // Paper end
|
||||||
|
this.a(channelhandlercontext, this.a(s2));
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
@@ -51,7 +60,14 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
|
}
|
||||||
|
|
||||||
@@ -44,11 +45,20 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), inetsocketaddress.getPort());
|
||||||
MinecraftServer minecraftserver = this.b.d();
|
- String s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, minecraftserver.getVersion(), minecraftserver.getMotd(), minecraftserver.y(), minecraftserver.z());
|
||||||
int i = bytebuf.readableBytes();
|
+ // Paper start - Call PaperServerListPingEvent and use results
|
||||||
String s;
|
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 61, null);
|
||||||
+ com.destroystokyo.paper.event.server.PaperServerListPingEvent event; // Paper
|
+ if (event == null) {
|
||||||
|
+ channelhandlercontext.close();
|
||||||
switch (i) {
|
+ break;
|
||||||
case 0:
|
+ }
|
||||||
LegacyPingHandler.a.debug("Ping: (<1.3.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
|
+ String s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", event.getProtocolVersion(), event.getVersion(), PaperLegacyStatusClient.getMotd(event), event.getNumPlayers(), event.getMaxPlayers());
|
||||||
- s = String.format("%s\u00a7%d\u00a7%d", new Object[] { minecraftserver.getMotd(), Integer.valueOf(minecraftserver.y()), Integer.valueOf(minecraftserver.z())});
|
+ // Paper end
|
||||||
+ // Paper start - Call PaperServerListPingEvent and use results
|
this.a(channelhandlercontext, this.a(s));
|
||||||
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 39, null);
|
break;
|
||||||
+ if (event == null) {
|
default:
|
||||||
+ channelhandlercontext.close();
|
@@ -161,8 +177,16 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ s = String.format("%s\u00a7%d\u00a7%d", PaperLegacyStatusClient.getUnformattedMotd(event), event.getNumPlayers(), event.getMaxPlayers());
|
|
||||||
+
|
|
||||||
+ // Paper end
|
|
||||||
this.a(channelhandlercontext, this.a(s));
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -57,8 +67,15 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
- LegacyPingHandler.a.debug("Ping: (1.4-1.5.x) from {}:{}", inetsocketaddress.getAddress(), Integer.valueOf(inetsocketaddress.getPort()));
|
|
||||||
- s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", new Object[] { Integer.valueOf(127), minecraftserver.getVersion(), minecraftserver.getMotd(), Integer.valueOf(minecraftserver.y()), Integer.valueOf(minecraftserver.z())});
|
|
||||||
+ // Paper start - Call PaperServerListPingEvent and use results
|
|
||||||
+ event = PaperLegacyStatusClient.processRequest(minecraftserver, inetsocketaddress, 61, null);
|
|
||||||
+ if (event == null) {
|
|
||||||
+ channelhandlercontext.close();
|
|
||||||
+ break;
|
|
||||||
+ }
|
|
||||||
+ s = String.format("\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", event.getProtocolVersion(), event.getVersion(),
|
|
||||||
+ PaperLegacyStatusClient.getMotd(event), event.getNumPlayers(), event.getMaxPlayers());
|
|
||||||
+ // Paper end
|
|
||||||
this.a(channelhandlercontext, this.a(s));
|
|
||||||
break;
|
|
||||||
|
|
||||||
@@ -170,8 +187,16 @@ public class LegacyPingHandler extends ChannelInboundHandlerAdapter {
|
|
||||||
|
|
||||||
a.debug("Ping: (1.6) from {}", ctx.channel().remoteAddress());
|
a.debug("Ping: (1.6) from {}", ctx.channel().remoteAddress());
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From c7b9fab1eac83cdedff92cca952c01acb3499fa1 Mon Sep 17 00:00:00 2001
|
From c68f5a2cbfee772cbf26e1634365a13825064573 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Fri, 15 Jun 2018 00:30:32 -0400
|
Date: Fri, 15 Jun 2018 00:30:32 -0400
|
||||||
Subject: [PATCH] Configurable Alternative LootPool Luck Formula
|
Subject: [PATCH] Configurable Alternative LootPool Luck Formula
|
||||||
|
@ -53,13 +53,13 @@ index 9bfbaf61e5..bcdf4f91d8 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
index 3d501aee30..464f74b269 100644
|
index 8daccdd6e9..c2a4ed6cf0 100644
|
||||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||||
@@ -14,8 +14,8 @@ import java.util.Random;
|
@@ -13,8 +13,8 @@ import java.util.Collection;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
public abstract class LootSelectorEntry {
|
public abstract class LootSelectorEntry {
|
||||||
|
|
||||||
- protected final int c;
|
- protected final int c;
|
||||||
- protected final int d;
|
- protected final int d;
|
||||||
+ protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER
|
+ protected final int c; public int getWeight() { return c; } // Paper - OBFHELPER
|
||||||
|
@ -67,11 +67,11 @@ index 3d501aee30..464f74b269 100644
|
||||||
protected final LootItemCondition[] e;
|
protected final LootItemCondition[] e;
|
||||||
|
|
||||||
protected LootSelectorEntry(int i, int j, LootItemCondition[] alootitemcondition) {
|
protected LootSelectorEntry(int i, int j, LootItemCondition[] alootitemcondition) {
|
||||||
@@ -25,8 +25,34 @@ public abstract class LootSelectorEntry {
|
@@ -24,8 +24,34 @@ public abstract class LootSelectorEntry {
|
||||||
}
|
}
|
||||||
|
|
||||||
public int a(float f) {
|
public int a(float f) {
|
||||||
- return Math.max(MathHelper.d((float) this.c + (float) this.d * f), 0);
|
- return Math.max(MathHelper.d((float)this.c + (float)this.d * f), 0);
|
||||||
+ // Paper start - Offer an alternative loot formula to refactor how luck bonus applies
|
+ // Paper start - Offer an alternative loot formula to refactor how luck bonus applies
|
||||||
+ // SEE: https://luckformula.emc.gs for details and data
|
+ // SEE: https://luckformula.emc.gs for details and data
|
||||||
+ if (lastLuck != null && lastLuck == f) {
|
+ if (lastLuck != null && lastLuck == f) {
|
||||||
|
@ -101,7 +101,7 @@ index 3d501aee30..464f74b269 100644
|
||||||
+ private int lastWeight = 0;
|
+ private int lastWeight = 0;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
public abstract void a(Collection<ItemStack> collection, Random random, LootTableInfo loottableinfo);
|
public abstract void a(Collection<ItemStack> var1, Random var2, LootTableInfo var3);
|
||||||
|
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 3eabe2d2409ef3d178aa5ff6c4768e05552d2844 Mon Sep 17 00:00:00 2001
|
From a1d6c6d4804c230258877a959278864f477778a6 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 16 Jun 2018 16:23:38 -0400
|
Date: Sat, 16 Jun 2018 16:23:38 -0400
|
||||||
Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors
|
Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors
|
||||||
|
@ -6,32 +6,29 @@ Subject: [PATCH] Ignore Missing Recipes in RecipeBook to avoid data errors
|
||||||
This code was causing NPE's in saving player data, potentially related to reloads.
|
This code was causing NPE's in saving player data, potentially related to reloads.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
diff --git a/src/main/java/net/minecraft/server/RecipeBookServer.java b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
||||||
index 71d6c45529..799f2be707 100644
|
index b0c726be19..34e34b7855 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RecipeBookServer.java
|
--- a/src/main/java/net/minecraft/server/RecipeBookServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
+++ b/src/main/java/net/minecraft/server/RecipeBookServer.java
|
||||||
@@ -77,7 +77,11 @@ public class RecipeBookServer extends RecipeBook {
|
@@ -65,6 +65,10 @@ public class RecipeBookServer extends RecipeBook {
|
||||||
while (iterator.hasNext()) {
|
NBTTagList nbttaglist = new NBTTagList();
|
||||||
MinecraftKey minecraftkey = (MinecraftKey) iterator.next();
|
|
||||||
|
|
||||||
- nbttaglist.add((NBTBase) (new NBTTagString(minecraftkey.toString())));
|
for(MinecraftKey minecraftkey : this.a) {
|
||||||
+ // Paper start - ignore missing recipes
|
+ // Paper start - ignore missing recipes
|
||||||
+ IRecipe recipe = this.h.a(minecraftkey);
|
+ IRecipe recipe = this.h.a(minecraftkey);
|
||||||
+ if (recipe == null) continue;
|
+ if (recipe == null) continue;
|
||||||
+ nbttaglist.add(new NBTTagString(minecraftkey.toString()));
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
nbttaglist.add((NBTBase)(new NBTTagString(minecraftkey.toString())));
|
||||||
}
|
}
|
||||||
|
|
||||||
nbttagcompound.set("recipes", nbttaglist);
|
@@ -72,6 +76,10 @@ public class RecipeBookServer extends RecipeBook {
|
||||||
@@ -87,6 +91,11 @@ public class RecipeBookServer extends RecipeBook {
|
NBTTagList nbttaglist1 = new NBTTagList();
|
||||||
while (iterator1.hasNext()) {
|
|
||||||
MinecraftKey minecraftkey1 = (MinecraftKey) iterator1.next();
|
|
||||||
|
|
||||||
|
for(MinecraftKey minecraftkey1 : this.b) {
|
||||||
+ // Paper start - ignore missing recipes
|
+ // Paper start - ignore missing recipes
|
||||||
+ IRecipe recipe = this.h.a(minecraftkey1);
|
+ IRecipe recipe = this.h.a(minecraftkey1);
|
||||||
+ if (recipe == null) continue;
|
+ if (recipe == null) continue;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
nbttaglist1.add((NBTBase)(new NBTTagString(minecraftkey1.toString())));
|
||||||
nbttaglist1.add((NBTBase) (new NBTTagString(minecraftkey1.toString())));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9dfb186b44e9a3b90d65f688f83910a87a2ed2e0 Mon Sep 17 00:00:00 2001
|
From e95d340b6ab3c78e0aed42b131e18b1c7b262766 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 26 Jun 2018 22:00:49 -0400
|
Date: Tue, 26 Jun 2018 22:00:49 -0400
|
||||||
Subject: [PATCH] RangedEntity API
|
Subject: [PATCH] RangedEntity API
|
||||||
|
@ -32,18 +32,18 @@ index 0000000000..696660b089
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java
|
diff --git a/src/main/java/net/minecraft/server/IRangedEntity.java b/src/main/java/net/minecraft/server/IRangedEntity.java
|
||||||
index 4fd69850fd..7fe65b7c24 100644
|
index 1b06ce8537..94533d19af 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IRangedEntity.java
|
--- a/src/main/java/net/minecraft/server/IRangedEntity.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IRangedEntity.java
|
+++ b/src/main/java/net/minecraft/server/IRangedEntity.java
|
||||||
@@ -2,7 +2,7 @@ package net.minecraft.server;
|
@@ -1,7 +1,7 @@
|
||||||
|
package net.minecraft.server;
|
||||||
|
|
||||||
public interface IRangedEntity {
|
public interface IRangedEntity {
|
||||||
|
- void a(EntityLiving var1, float var2);
|
||||||
|
+ void a(EntityLiving var1, float var2);default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper OBF HELPER
|
||||||
|
|
||||||
- void a(EntityLiving entityliving, float f);
|
- void s(boolean var1);
|
||||||
+ void a(EntityLiving entityliving, float f); default void rangedAttack(EntityLiving entityliving, float f) { a(entityliving, f); } // Paper OBF HELPER
|
+ void s(boolean var1); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER
|
||||||
|
|
||||||
- void s(boolean flag);
|
|
||||||
+ void s(boolean flag); default void setChargingAttack(boolean flag) { s(flag); } // Paper OBF HELPER
|
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
|
||||||
index 2ec1af8be4..f31d3eed3a 100644
|
index 2ec1af8be4..f31d3eed3a 100644
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9ca273cb980a3d4803495edd318c6b7b9a208a03 Mon Sep 17 00:00:00 2001
|
From 265868945184568370507db8a877ef1ec7a987d3 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Fri, 22 Jun 2018 10:38:31 -0500
|
Date: Fri, 22 Jun 2018 10:38:31 -0500
|
||||||
Subject: [PATCH] Add config to disable ender dragon legacy check
|
Subject: [PATCH] Add config to disable ender dragon legacy check
|
||||||
|
@ -19,10 +19,10 @@ index 2e3e48637a..8724c2816b 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
diff --git a/src/main/java/net/minecraft/server/EnderDragonBattle.java b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||||
index a20d54ee34..48bcda0f50 100644
|
index 96e920ead8..e083ea483a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
--- a/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
+++ b/src/main/java/net/minecraft/server/EnderDragonBattle.java
|
||||||
@@ -29,9 +29,12 @@ public class EnderDragonBattle {
|
@@ -27,16 +27,21 @@ public class EnderDragonBattle {
|
||||||
private int h;
|
private int h;
|
||||||
private int i;
|
private int i;
|
||||||
private int j;
|
private int j;
|
||||||
|
@ -30,16 +30,14 @@ index a20d54ee34..48bcda0f50 100644
|
||||||
private boolean k;
|
private boolean k;
|
||||||
private boolean l;
|
private boolean l;
|
||||||
private UUID m;
|
private UUID m;
|
||||||
+ private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } // Paper - OBFHELPER
|
- private boolean n = true;
|
||||||
+ private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER
|
+ private boolean n = true; private void setScanForLegacyFight(boolean scanForLegacyFight) { this.n = scanForLegacyFight; } private boolean scanForLegacyFight() { return this.n; } // Paper - OBFHELPER
|
||||||
private boolean n;
|
|
||||||
private BlockPosition o;
|
private BlockPosition o;
|
||||||
private EnumDragonRespawn p;
|
private EnumDragonRespawn p;
|
||||||
@@ -41,7 +44,10 @@ public class EnderDragonBattle {
|
private int q;
|
||||||
|
private List<EntityEnderCrystal> r;
|
||||||
|
|
||||||
public EnderDragonBattle(WorldServer worldserver, NBTTagCompound nbttagcompound) {
|
public EnderDragonBattle(WorldServer worldserver, NBTTagCompound nbttagcompound) {
|
||||||
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;
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon);
|
+ setScanForLegacyFight(worldserver.paperConfig.scanForLegacyEnderDragon);
|
||||||
+ if (!scanForLegacyFight()) setDragonKilled(true);
|
+ if (!scanForLegacyFight()) setDragonKilled(true);
|
||||||
|
@ -47,6 +45,23 @@ index a20d54ee34..48bcda0f50 100644
|
||||||
this.d = worldserver;
|
this.d = worldserver;
|
||||||
if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) {
|
if (nbttagcompound.hasKeyOfType("DragonKilled", 99)) {
|
||||||
if (nbttagcompound.b("DragonUUID")) {
|
if (nbttagcompound.b("DragonUUID")) {
|
||||||
|
@@ -286,14 +291,14 @@ public class EnderDragonBattle {
|
||||||
|
}
|
||||||
|
|
||||||
|
private void k() {
|
||||||
|
- HashSet hashset = Sets.newHashSet();
|
||||||
|
+ HashSet<EntityPlayer> hashset = Sets.newHashSet(); // Paper - decompile fix
|
||||||
|
|
||||||
|
for(EntityPlayer entityplayer : this.d.b(EntityPlayer.class, b)) {
|
||||||
|
this.c.addPlayer(entityplayer);
|
||||||
|
hashset.add(entityplayer);
|
||||||
|
}
|
||||||
|
|
||||||
|
- HashSet hashset1 = Sets.newHashSet(this.c.getPlayers());
|
||||||
|
+ HashSet<EntityPlayer> hashset1 = Sets.newHashSet(this.c.getPlayers()); // Paper - decompile fix
|
||||||
|
hashset1.removeAll(hashset);
|
||||||
|
|
||||||
|
for(EntityPlayer entityplayer1 : hashset1) {
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d05da60b77c74b53dab47f6dffb3896a8c99aefe Mon Sep 17 00:00:00 2001
|
From a6ee93a38a6a034c6b4b2b2ae4ecf4a3f2c70143 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 15:22:06 -0400
|
Date: Wed, 4 Jul 2018 15:22:06 -0400
|
||||||
Subject: [PATCH] Configurable Bed Search Radius
|
Subject: [PATCH] Configurable Bed Search Radius
|
||||||
|
@ -30,17 +30,15 @@ index 8724c2816b..fb2467636a 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockBed.java b/src/main/java/net/minecraft/server/BlockBed.java
|
diff --git a/src/main/java/net/minecraft/server/BlockBed.java b/src/main/java/net/minecraft/server/BlockBed.java
|
||||||
index 4e60509891..47cf1db6ae 100644
|
index 4f97ff6f18..230c05ff07 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockBed.java
|
--- a/src/main/java/net/minecraft/server/BlockBed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockBed.java
|
+++ b/src/main/java/net/minecraft/server/BlockBed.java
|
||||||
@@ -174,7 +174,54 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
|
@@ -166,6 +166,52 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public static BlockPosition a(IBlockAccess iblockaccess, BlockPosition blockposition, int i) {
|
public static BlockPosition a(IBlockAccess iblockaccess, BlockPosition blockposition, int i) {
|
||||||
+ World world = (World) iblockaccess;
|
EnumDirection enumdirection = (EnumDirection)iblockaccess.getType(blockposition).get(FACING);
|
||||||
+
|
|
||||||
EnumDirection enumdirection = (EnumDirection) iblockaccess.getType(blockposition).get(BlockBed.FACING);
|
|
||||||
+ // Paper - replace whole method
|
+ // Paper - replace whole method
|
||||||
|
+ World world = (World) iblockaccess;
|
||||||
+ int radius = world.paperConfig.bedSearchRadius;
|
+ int radius = world.paperConfig.bedSearchRadius;
|
||||||
+ for (int r = 1; r <= radius; r++) {
|
+ for (int r = 1; r <= radius; r++) {
|
||||||
+ int x = -r;
|
+ int x = -r;
|
||||||
|
@ -88,7 +86,7 @@ index 4e60509891..47cf1db6ae 100644
|
||||||
int j = blockposition.getX();
|
int j = blockposition.getX();
|
||||||
int k = blockposition.getY();
|
int k = blockposition.getY();
|
||||||
int l = blockposition.getZ();
|
int l = blockposition.getZ();
|
||||||
@@ -200,9 +247,12 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
|
@@ -190,9 +236,12 @@ public class BlockBed extends BlockFacingHorizontal implements ITileEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From a9019db13cb7580b4cf30d940575446f0964854e Mon Sep 17 00:00:00 2001
|
From 2bdea8b9e4d2c2450e2a4fe8e414764dcb9266cf Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Thu, 19 Jul 2018 01:23:00 -0400
|
Date: Thu, 19 Jul 2018 01:23:00 -0400
|
||||||
Subject: [PATCH] Don't process despawn if entity is in a chunk scheduled for
|
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
|
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
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index d4c86c2d65..4a8c3a428d 100644
|
index 04a1218ed9..141db48f16 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -622,6 +622,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -623,6 +623,8 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
if (this.persistent) {
|
if (this.persistent) {
|
||||||
this.ticksFarFromPlayer = 0;
|
this.ticksFarFromPlayer = 0;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 8f7eca760bb5d7e6a932cf26fa200c680f7288cc Mon Sep 17 00:00:00 2001
|
From 788553e0245c1df064ccea0ffe5e66754cba6bd9 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sat, 21 Jul 2018 01:51:27 -0500
|
Date: Sat, 21 Jul 2018 01:51:27 -0500
|
||||||
Subject: [PATCH] EnderDragon Events
|
Subject: [PATCH] EnderDragon Events
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
diff --git a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
index b78d3fe508..ef8b0e765f 100644
|
index 45f96078c5..fed3e9daf1 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
--- a/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
+++ b/src/main/java/net/minecraft/server/DragonControllerLandedFlame.java
|
||||||
@@ -63,7 +63,9 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
@@ -61,7 +61,9 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
||||||
this.d.setDuration(200);
|
this.d.setDuration(200);
|
||||||
this.d.setParticle(Particles.j);
|
this.d.setParticle(Particles.j);
|
||||||
this.d.a(new MobEffect(MobEffects.HARM));
|
this.d.a(new MobEffect(MobEffects.HARM));
|
||||||
|
@ -18,7 +18,7 @@ index b78d3fe508..ef8b0e765f 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -73,6 +75,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
@@ -71,6 +73,7 @@ public class DragonControllerLandedFlame extends AbstractDragonControllerLanded
|
||||||
++this.c;
|
++this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,28 +27,28 @@ index b78d3fe508..ef8b0e765f 100644
|
||||||
if (this.d != null) {
|
if (this.d != null) {
|
||||||
this.d.die();
|
this.d.die();
|
||||||
diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
diff --git a/src/main/java/net/minecraft/server/DragonControllerStrafe.java b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
||||||
index 9c158fd588..b4887d6586 100644
|
index 66223af9a8..7aa8a5708d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
--- a/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
+++ b/src/main/java/net/minecraft/server/DragonControllerStrafe.java
|
||||||
@@ -67,7 +67,9 @@ public class DragonControllerStrafe extends AbstractDragonController {
|
@@ -57,7 +57,9 @@ public class DragonControllerStrafe extends AbstractDragonController {
|
||||||
|
this.a.world.a((EntityHuman)null, 1017, new BlockPosition(this.a), 0);
|
||||||
EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11);
|
EntityDragonFireball entitydragonfireball = new EntityDragonFireball(this.a.world, this.a, d9, d10, d11);
|
||||||
|
|
||||||
entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F);
|
entitydragonfireball.setPositionRotation(d6, d7, d8, 0.0F, 0.0F);
|
||||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) a.getBukkitEntity(), (org.bukkit.entity.DragonFireball) entitydragonfireball.getBukkitEntity()).callEvent()) // Paper
|
+ if (new com.destroystokyo.paper.event.entity.EnderDragonShootFireballEvent((org.bukkit.entity.EnderDragon) a.getBukkitEntity(), (org.bukkit.entity.DragonFireball) entitydragonfireball.getBukkitEntity()).callEvent()) // Paper
|
||||||
this.a.world.addEntity(entitydragonfireball);
|
this.a.world.addEntity(entitydragonfireball);
|
||||||
+ else entitydragonfireball.die(); // Paper
|
+ else entitydragonfireball.die(); // Paper
|
||||||
this.c = 0;
|
this.c = 0;
|
||||||
if (this.d != null) {
|
if (this.d != null) {
|
||||||
while (!this.d.b()) {
|
while(!this.d.b()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
diff --git a/src/main/java/net/minecraft/server/EntityDragonFireball.java b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
index 862ffc9543..2b55cc68b5 100644
|
index e746a6a0da..366ebb8d2d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
--- a/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
+++ b/src/main/java/net/minecraft/server/EntityDragonFireball.java
|
||||||
@@ -39,8 +39,10 @@ public class EntityDragonFireball extends EntityFireball {
|
@@ -32,8 +32,10 @@ public class EntityDragonFireball extends EntityFireball {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list, (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper
|
+ if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(EntityLiving::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) entityareaeffectcloud.getBukkitEntity()).callEvent()) { // Paper
|
||||||
this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0);
|
this.world.triggerEffect(2006, new BlockPosition(this.locX, this.locY, this.locZ), 0);
|
||||||
this.world.addEntity(entityareaeffectcloud);
|
this.world.addEntity(entityareaeffectcloud);
|
||||||
+ } else entityareaeffectcloud.die(); // Paper
|
+ } else entityareaeffectcloud.die(); // Paper
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
From 79bf51175409a0f147e0e122f4cdaddbeb24b22e Mon Sep 17 00:00:00 2001
|
From 8790989ae27d534a733be291f45d2f840cca9259 Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sat, 21 Jul 2018 01:59:59 -0500
|
Date: Sat, 21 Jul 2018 01:59:59 -0500
|
||||||
Subject: [PATCH] PlayerElytraBoostEvent
|
Subject: [PATCH] PlayerElytraBoostEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
diff --git a/src/main/java/net/minecraft/server/ItemFireworks.java b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
index d4420e68fb..82da8dd387 100644
|
index d971bbc76c..4ce9c60895 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
--- a/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
+++ b/src/main/java/net/minecraft/server/ItemFireworks.java
|
||||||
@@ -35,9 +35,15 @@ public class ItemFireworks extends Item {
|
@@ -28,9 +28,15 @@ public class ItemFireworks extends Item {
|
||||||
|
if (!world.isClientSide) {
|
||||||
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
EntityFireworks entityfireworks = new EntityFireworks(world, itemstack, entityhuman);
|
||||||
|
|
||||||
entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
entityfireworks.spawningEntity = entityhuman.getUniqueID(); // Paper
|
||||||
- world.addEntity(entityfireworks);
|
- world.addEntity(entityfireworks);
|
||||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
|
|
|
@ -1,22 +1,22 @@
|
||||||
From 7d913989b8a65f7e3739673c2ddb9221caf9aadc Mon Sep 17 00:00:00 2001
|
From 5db9f5cec37287aadff02842e15cf321933e4dfd Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Sat, 21 Jul 2018 03:11:03 -0500
|
Date: Sat, 21 Jul 2018 03:11:03 -0500
|
||||||
Subject: [PATCH] PlayerLaunchProjectileEvent
|
Subject: [PATCH] PlayerLaunchProjectileEvent
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java
|
diff --git a/src/main/java/net/minecraft/server/ItemEgg.java b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||||
index 9ae1f5b318..0a9680bf5d 100644
|
index adc38763b9..776c86f1fe 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemEgg.java
|
--- a/src/main/java/net/minecraft/server/ItemEgg.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemEgg.java
|
+++ b/src/main/java/net/minecraft/server/ItemEgg.java
|
||||||
@@ -9,16 +9,34 @@ public class ItemEgg extends Item {
|
@@ -7,15 +7,34 @@ public class ItemEgg extends Item {
|
||||||
|
|
||||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||||
ItemStack itemstack = entityhuman.b(enumhand);
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
|
|
||||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
- itemstack.subtract(1);
|
- itemstack.subtract(1);
|
||||||
- }
|
- }
|
||||||
-
|
|
||||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemEgg.i.nextFloat() * 0.4F + 0.8F));
|
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||||
+ // Paper start - moved down
|
+ // Paper start - moved down
|
||||||
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
+ // itemstack.subtract(1);
|
+ // itemstack.subtract(1);
|
||||||
|
@ -26,7 +26,6 @@ index 9ae1f5b318..0a9680bf5d 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
EntityEgg entityegg = new EntityEgg(world, entityhuman);
|
EntityEgg entityegg = new EntityEgg(world, entityhuman);
|
||||||
|
|
||||||
entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F);
|
entityegg.a(entityhuman, entityhuman.pitch, entityhuman.yaw, 0.0F, 1.5F, 1.0F);
|
||||||
- world.addEntity(entityegg);
|
- world.addEntity(entityegg);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -98,18 +97,18 @@ index 876384f37b..8b8bc8ec1c 100644
|
||||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||||
return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack);
|
return new InteractionResultWrapper(EnumInteractionResult.SUCCESS, itemstack);
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
diff --git a/src/main/java/net/minecraft/server/ItemExpBottle.java b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||||
index 5312c473ea..7b5eca925f 100644
|
index b167c54417..42a0329c29 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemExpBottle.java
|
--- a/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
+++ b/src/main/java/net/minecraft/server/ItemExpBottle.java
|
||||||
@@ -9,16 +9,34 @@ public class ItemExpBottle extends Item {
|
@@ -7,15 +7,34 @@ public class ItemExpBottle extends Item {
|
||||||
|
|
||||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||||
ItemStack itemstack = entityhuman.b(enumhand);
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
|
|
||||||
- if (!entityhuman.abilities.canInstantlyBuild) {
|
- if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
- itemstack.subtract(1);
|
- itemstack.subtract(1);
|
||||||
- }
|
- }
|
||||||
-
|
|
||||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemExpBottle.i.nextFloat() * 0.4F + 0.8F));
|
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_EXPERIENCE_BOTTLE_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||||
+ // Paper start - moved down
|
+ // Paper start - moved down
|
||||||
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
+ //if (!entityhuman.abilities.canInstantlyBuild) {
|
||||||
+ // itemstack.subtract(1);
|
+ // itemstack.subtract(1);
|
||||||
|
@ -119,7 +118,6 @@ index 5312c473ea..7b5eca925f 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman);
|
EntityThrownExpBottle entitythrownexpbottle = new EntityThrownExpBottle(world, entityhuman);
|
||||||
|
|
||||||
entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F);
|
entitythrownexpbottle.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.7F, 1.0F);
|
||||||
- world.addEntity(entitythrownexpbottle);
|
- world.addEntity(entitythrownexpbottle);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -143,18 +141,18 @@ index 5312c473ea..7b5eca925f 100644
|
||||||
|
|
||||||
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
entityhuman.b(StatisticList.ITEM_USED.b(this));
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
diff --git a/src/main/java/net/minecraft/server/ItemLingeringPotion.java b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||||
index e1c6ad80f0..7acdb63f7b 100644
|
index ab7807d832..46c64c760f 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
--- a/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
+++ b/src/main/java/net/minecraft/server/ItemLingeringPotion.java
|
||||||
@@ -8,14 +8,38 @@ public class ItemLingeringPotion extends ItemPotion {
|
@@ -7,12 +7,37 @@ public class ItemLingeringPotion extends ItemPotion {
|
||||||
|
|
||||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||||
ItemStack itemstack = entityhuman.b(enumhand);
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||||
|
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||||
+ // Paper start - moved down
|
+ // Paper start - moved down
|
||||||
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||||
|
+
|
||||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F));
|
|
||||||
+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F));
|
+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_LINGERING_POTION_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (ItemLingeringPotion.i.nextFloat() * 0.4F + 0.8F));
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
|
@ -165,7 +163,6 @@ index e1c6ad80f0..7acdb63f7b 100644
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
||||||
|
|
||||||
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
||||||
- world.addEntity(entitypotion);
|
- world.addEntity(entitypotion);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -222,19 +219,18 @@ index 332145c32b..5c23c9ae0c 100644
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
diff --git a/src/main/java/net/minecraft/server/ItemSplashPotion.java b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||||
index 593009579b..d935ae834f 100644
|
index 426b42a12c..a4e2f70c7c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
--- a/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
+++ b/src/main/java/net/minecraft/server/ItemSplashPotion.java
|
||||||
@@ -8,14 +8,38 @@ public class ItemSplashPotion extends ItemPotion {
|
@@ -7,12 +7,36 @@ public class ItemSplashPotion extends ItemPotion {
|
||||||
|
|
||||||
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
public InteractionResultWrapper<ItemStack> a(World world, EntityHuman entityhuman, EnumHand enumhand) {
|
||||||
ItemStack itemstack = entityhuman.b(enumhand);
|
ItemStack itemstack = entityhuman.b(enumhand);
|
||||||
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
- ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||||
|
- world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||||
+ // Paper start - moved sound down, clone handled diff
|
+ // Paper start - moved sound down, clone handled diff
|
||||||
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
+ //ItemStack itemstack1 = entityhuman.abilities.canInstantlyBuild ? itemstack.cloneItemStack() : itemstack.cloneAndSubtract(1);
|
||||||
|
+ //world.a((EntityHuman)null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (i.nextFloat() * 0.4F + 0.8F));
|
||||||
- world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F));
|
|
||||||
+ //world.a((EntityHuman) null, entityhuman.locX, entityhuman.locY, entityhuman.locZ, SoundEffects.ENTITY_SPLASH_POTION_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (ItemSplashPotion.i.nextFloat() * 0.4F + 0.8F));
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
if (!world.isClientSide) {
|
if (!world.isClientSide) {
|
||||||
+ // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet
|
+ // Paper start - ensure stack count matches vanilla behavior without modifying original stack yet
|
||||||
|
@ -244,7 +240,6 @@ index 593009579b..d935ae834f 100644
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
EntityPotion entitypotion = new EntityPotion(world, entityhuman, itemstack1);
|
||||||
|
|
||||||
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
entitypotion.a(entityhuman, entityhuman.pitch, entityhuman.yaw, -20.0F, 0.5F, 1.0F);
|
||||||
- world.addEntity(entitypotion);
|
- world.addEntity(entitypotion);
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 5915dd6d1ddf969a6103b5674c0baab8e1c27b02 Mon Sep 17 00:00:00 2001
|
From 7ea14626e7aa995df770fe5bfb91e6a8cbb3b9b0 Mon Sep 17 00:00:00 2001
|
||||||
From: Techcable <Techcable@outlook.com>
|
From: Techcable <Techcable@outlook.com>
|
||||||
Date: Wed, 30 Nov 2016 20:56:58 -0600
|
Date: Wed, 30 Nov 2016 20:56:58 -0600
|
||||||
Subject: [PATCH] Speedup BlockPos by fixing inlining
|
Subject: [PATCH] Speedup BlockPos by fixing inlining
|
||||||
|
@ -21,12 +21,12 @@ This is based upon conclusions drawn from inspecting the assenmbly generated byt
|
||||||
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
|
They had 'callq' (invoke) instead of 'mov' (get from memory) instructions.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BaseBlockPosition.java b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
index 58f8b4b720..98992513da 100644
|
index 680764b342..25334377a2 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BaseBlockPosition.java
|
||||||
@@ -7,22 +7,22 @@ import javax.annotation.concurrent.Immutable;
|
@@ -6,22 +6,22 @@ import javax.annotation.concurrent.Immutable;
|
||||||
|
@Immutable
|
||||||
public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||||
|
|
||||||
public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0);
|
public static final BaseBlockPosition ZERO = new BaseBlockPosition(0, 0, 0);
|
||||||
- private final int a;
|
- private final int a;
|
||||||
- private final int b;
|
- private final int b;
|
||||||
|
@ -55,8 +55,8 @@ index 58f8b4b720..98992513da 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
public BaseBlockPosition(double d0, double d1, double d2) {
|
public BaseBlockPosition(double d0, double d1, double d2) {
|
||||||
@@ -49,17 +49,19 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
@@ -57,17 +57,19 @@ public class BaseBlockPosition implements Comparable<BaseBlockPosition> {
|
||||||
return this.getY() == baseblockposition.getY() ? (this.getZ() == baseblockposition.getZ() ? this.getX() - baseblockposition.getX() : this.getZ() - baseblockposition.getZ()) : this.getY() - baseblockposition.getY();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
- public int getX() {
|
- public int getX() {
|
||||||
|
@ -77,47 +77,47 @@ index 58f8b4b720..98992513da 100644
|
||||||
}
|
}
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
|
||||||
public BaseBlockPosition d(BaseBlockPosition baseblockposition) {
|
public BaseBlockPosition d(BaseBlockPosition baseblockposition1) {
|
||||||
return new BaseBlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
|
return new BaseBlockPosition(this.getY() * baseblockposition1.getZ() - this.getZ() * baseblockposition1.getY(), this.getZ() * baseblockposition1.getX() - this.getX() * baseblockposition1.getZ(), this.getX() * baseblockposition1.getY() - this.getY() * baseblockposition1.getX());
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 42e5e9ad8f..936a49a3e8 100644
|
index 1dfd71df0a..986b1e13a5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -208,18 +208,20 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -204,18 +204,20 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
if (this.g == null) {
|
if (this.g == null) {
|
||||||
this.g = new BlockPosition.MutableBlockPosition(i, j, k);
|
this.g = new BlockPosition.MutableBlockPosition(ix, jx, kx);
|
||||||
return this.g;
|
return this.g;
|
||||||
- } else if (this.g.b == l && this.g.c == i1 && this.g.d == j1) {
|
- } else if (this.g.b == l && this.g.c == i1 && this.g.d == j1) {
|
||||||
+ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { // Paper
|
+ } else if (this.g.x == l && this.g.y == i1 && this.g.z == j1) { // Paper - use x/y/z
|
||||||
return (BlockPosition.MutableBlockPosition) this.endOfData();
|
return (BlockPosition.MutableBlockPosition)this.endOfData();
|
||||||
} else {
|
} else {
|
||||||
- if (this.g.b < l) {
|
- if (this.g.b < l) {
|
||||||
- ++this.g.b;
|
- ++this.g.b;
|
||||||
- } else if (this.g.c < i1) {
|
- } else if (this.g.c < i1) {
|
||||||
- this.g.b = i; // Paper - Readd line removed by the decompiler
|
- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
- ++this.g.c;
|
- ++this.g.c;
|
||||||
- } else if (this.g.d < j1) {
|
- } else if (this.g.d < j1) {
|
||||||
- this.g.b = i; // Paper - Readd line removed by the decompiler
|
- this.g.b = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
- this.g.c = j; // Paper - Readd line removed by the decompiler
|
- this.g.c = jx; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
- ++this.g.d;
|
- ++this.g.d;
|
||||||
+ // Paper start - use xyz
|
+ // Paper start - use xyz
|
||||||
+ if (this.g.x < l) {
|
+ if (this.g.x < l) {
|
||||||
+ ++this.g.x;
|
+ ++this.g.x;
|
||||||
+ } else if (this.g.y < i1) {
|
+ } else if (this.g.y < i1) {
|
||||||
+ this.g.x = i; // Paper - Readd line removed by the decompiler
|
+ this.g.x = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
+ ++this.g.y;
|
+ ++this.g.y;
|
||||||
+ } else if (this.g.z < j1) {
|
+ } else if (this.g.z < j1) {
|
||||||
+ this.g.x = i; // Paper - Readd line removed by the decompiler
|
+ this.g.x = ix; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
+ this.g.y = j; // Paper - Readd line removed by the decompiler
|
+ this.g.y = jx; // Paper - decompile fix Readd line removed by the decompiler
|
||||||
+ ++this.g.z;
|
+ ++this.g.z;
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.g;
|
return this.g;
|
||||||
@@ -339,10 +341,12 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -236,10 +238,12 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
|
}
|
||||||
|
|
||||||
public static class MutableBlockPosition extends BlockPosition {
|
public static class MutableBlockPosition extends BlockPosition {
|
||||||
|
|
||||||
+ // Paper start - comment out
|
+ // Paper start - comment out
|
||||||
+ /*
|
+ /*
|
||||||
protected int b;
|
protected int b;
|
||||||
|
@ -128,7 +128,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
@Override
|
@Override
|
||||||
public boolean isValidLocation() {
|
public boolean isValidLocation() {
|
||||||
return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256;
|
return b >= -30000000 && d >= -30000000 && b < 30000000 && d < 30000000 && c >= 0 && c < 256;
|
||||||
@@ -351,6 +355,7 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -248,6 +252,7 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
public boolean isInvalidYLocation() {
|
public boolean isInvalidYLocation() {
|
||||||
return c < 0 || c >= 256;
|
return c < 0 || c >= 256;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
// Paper end
|
// Paper end
|
||||||
|
|
||||||
public MutableBlockPosition() {
|
public MutableBlockPosition() {
|
||||||
@@ -362,10 +367,13 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -259,10 +264,13 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public MutableBlockPosition(int i, int j, int k) {
|
public MutableBlockPosition(int i, int j, int k) {
|
||||||
|
@ -152,7 +152,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition a(double d0, double d1, double d2) {
|
public BlockPosition a(double d0, double d1, double d2) {
|
||||||
@@ -384,6 +392,8 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -281,6 +289,8 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
return super.a(enumblockrotation).h();
|
return super.a(enumblockrotation).h();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
public int getX() {
|
public int getX() {
|
||||||
return this.b;
|
return this.b;
|
||||||
}
|
}
|
||||||
@@ -394,13 +404,16 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -291,13 +301,16 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
|
|
||||||
public int getZ() {
|
public int getZ() {
|
||||||
return this.d;
|
return this.d;
|
||||||
|
@ -182,7 +182,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -418,15 +431,15 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -315,15 +328,15 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) {
|
public BlockPosition.MutableBlockPosition c(EnumDirection enumdirection, int i) {
|
||||||
|
@ -200,7 +200,7 @@ index 42e5e9ad8f..936a49a3e8 100644
|
||||||
+ this.y = i; // Paper change to y
|
+ this.y = i; // Paper change to y
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition h() {
|
public BlockPosition toBlockPosition() { return h(); } // Paper - OBFHELPER
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From fa670184f6b30408f73ebe46e89578a4bd2b68b4 Mon Sep 17 00:00:00 2001
|
From b30fb91663c75adb7a5138e6f03a70c63d93c0f6 Mon Sep 17 00:00:00 2001
|
||||||
From: Andrew Steinborn <git@steinborn.me>
|
From: Andrew Steinborn <git@steinborn.me>
|
||||||
Date: Mon, 23 Jul 2018 13:08:19 -0400
|
Date: Mon, 23 Jul 2018 13:08:19 -0400
|
||||||
Subject: [PATCH] Optimize RegistryID.c()
|
Subject: [PATCH] Optimize RegistryID.c()
|
||||||
|
@ -6,31 +6,31 @@ Subject: [PATCH] Optimize RegistryID.c()
|
||||||
This is a frequent hotspot for world loading/saving.
|
This is a frequent hotspot for world loading/saving.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
index bde5714dd6..a01cda9d81 100644
|
index d03ac0e70c..9242999f70 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||||
@@ -14,12 +14,14 @@ public class RegistryID<K> implements Registry { // Paper - decompile fix
|
@@ -13,12 +13,14 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
private K[] d;
|
private K[] d;
|
||||||
private int e;
|
private int e;
|
||||||
private int f;
|
private int f;
|
||||||
+ private java.util.BitSet usedIds; // Paper
|
+ private java.util.BitSet usedIds; // Paper
|
||||||
|
|
||||||
public RegistryID(int i) {
|
public RegistryID(int i) {
|
||||||
i = (int) ((float) i / 0.8F);
|
i = (int)((float)i / 0.8F);
|
||||||
this.b = (K[]) (new Object[i]); // Paper - decompile fix
|
this.b = (K[])(new Object[i]);
|
||||||
this.c = new int[i];
|
this.c = new int[i];
|
||||||
this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
this.d = (K[])(new Object[i]);
|
||||||
+ this.usedIds = new java.util.BitSet(); // Paper
|
+ this.usedIds = new java.util.BitSet(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getId(@Nullable K k0) {
|
public int getId(@Nullable K object) {
|
||||||
@@ -43,9 +45,14 @@ public class RegistryID<K> implements Registry { // Paper - decompile fix
|
@@ -41,9 +43,14 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int c() {
|
private int c() {
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /*
|
+ /*
|
||||||
while (this.e < this.d.length && this.d[this.e] != null) {
|
while(this.e < this.d.length && this.d[this.e] != null) {
|
||||||
++this.e;
|
++this.e;
|
||||||
}
|
}
|
||||||
+ */
|
+ */
|
||||||
|
@ -39,24 +39,24 @@ index bde5714dd6..a01cda9d81 100644
|
||||||
|
|
||||||
return this.e;
|
return this.e;
|
||||||
}
|
}
|
||||||
@@ -59,6 +66,7 @@ public class RegistryID<K> implements Registry { // Paper - decompile fix
|
@@ -56,6 +63,7 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
this.d = (K[]) (new Object[i]); // Paper - decompile fix
|
this.d = (K[])(new Object[i]);
|
||||||
this.e = 0;
|
this.e = 0;
|
||||||
this.f = 0;
|
this.f = 0;
|
||||||
+ this.usedIds.clear(); // Paper
|
+ this.usedIds.clear(); // Paper
|
||||||
|
|
||||||
for (int j = 0; j < aobject.length; ++j) {
|
for(int j = 0; j < aobject.length; ++j) {
|
||||||
if (aobject[j] != null) {
|
if (aobject[j] != null) {
|
||||||
@@ -84,6 +92,7 @@ public class RegistryID<K> implements Registry { // Paper - decompile fix
|
@@ -80,6 +88,7 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
this.b[k] = k0;
|
this.b[l] = object;
|
||||||
this.c[k] = i;
|
this.c[l] = i;
|
||||||
this.d[i] = k0;
|
this.d[i] = object;
|
||||||
+ this.usedIds.set(i); // Paper
|
+ this.usedIds.set(i); // Paper
|
||||||
++this.f;
|
++this.f;
|
||||||
if (i == this.e) {
|
if (i == this.e) {
|
||||||
++this.e;
|
++this.e;
|
||||||
@@ -148,6 +157,7 @@ public class RegistryID<K> implements Registry { // Paper - decompile fix
|
@@ -140,6 +149,7 @@ public class RegistryID<K> implements Registry<K> {
|
||||||
Arrays.fill(this.d, (Object) null);
|
Arrays.fill(this.d, (Object)null);
|
||||||
this.e = 0;
|
this.e = 0;
|
||||||
this.f = 0;
|
this.f = 0;
|
||||||
+ this.usedIds.clear(); // Paper
|
+ this.usedIds.clear(); // Paper
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From ed0e15209a73c658ffe750456744084ff00ee55a Mon Sep 17 00:00:00 2001
|
From c00e706c2239a7aef32a535ab1433f84706bbb4a Mon Sep 17 00:00:00 2001
|
||||||
From: Hugo Manrique <hugmanrique@gmail.com>
|
From: Hugo Manrique <hugmanrique@gmail.com>
|
||||||
Date: Mon, 23 Jul 2018 14:22:26 +0200
|
Date: Mon, 23 Jul 2018 14:22:26 +0200
|
||||||
Subject: [PATCH] Vanished players don't have rights
|
Subject: [PATCH] Vanished players don't have rights
|
||||||
|
@ -18,10 +18,10 @@ index 89a83548b8..9339b3255d 100644
|
||||||
protected int k;
|
protected int k;
|
||||||
private Entity vehicle;
|
private Entity vehicle;
|
||||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
index 0a4ee39d67..6f80876990 100644
|
index 24ce9137ae..bf06a90312 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
@@ -179,6 +179,7 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
|
@@ -165,6 +165,7 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
|
||||||
return this.getBlock().a(this, iblockaccess, blockposition);
|
return this.getBlock().a(this, iblockaccess, blockposition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,20 +44,20 @@ index 1cecccef23..afc881d9af 100644
|
||||||
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), CraftBlockData.fromData(iblockdata), defaultReturn);
|
BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getWorld(), blockactioncontext.getClickPosition()), CraftBlockData.fromData(iblockdata), defaultReturn);
|
||||||
blockactioncontext.getWorld().getServer().getPluginManager().callEvent(event);
|
blockactioncontext.getWorld().getServer().getPluginManager().callEvent(event);
|
||||||
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
diff --git a/src/main/java/net/minecraft/server/VoxelShape.java b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
index 700900256b..b7d2fa2f0e 100644
|
index ea8f1c170a..fdfc0d442e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
--- a/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
+++ b/src/main/java/net/minecraft/server/VoxelShape.java
|
||||||
@@ -28,6 +28,7 @@ public abstract class VoxelShape {
|
@@ -24,6 +24,7 @@ public abstract class VoxelShape {
|
||||||
return i <= 0 ? Double.NEGATIVE_INFINITY : this.a(enumdirection_enumaxis, i);
|
return i <= 0 ? Double.NEGATIVE_INFINITY : this.a(enumdirection$enumaxis, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER
|
+ public AxisAlignedBB getBounds() { return a(); } // Paper - OBFHELPER
|
||||||
public AxisAlignedBB a() {
|
public AxisAlignedBB a() {
|
||||||
if (this.b()) {
|
if (this.b()) {
|
||||||
throw new UnsupportedOperationException("No bounds for empty shape.");
|
throw new UnsupportedOperationException("No bounds for empty shape.");
|
||||||
@@ -42,6 +43,7 @@ public abstract class VoxelShape {
|
@@ -38,6 +39,7 @@ public abstract class VoxelShape {
|
||||||
|
|
||||||
protected abstract DoubleList a(EnumDirection.EnumAxis enumdirection_enumaxis);
|
protected abstract DoubleList a(EnumDirection.EnumAxis var1);
|
||||||
|
|
||||||
+ public boolean isEmpty() { return b(); } // Paper - OBFHELPER
|
+ public boolean isEmpty() { return b(); } // Paper - OBFHELPER
|
||||||
public boolean b() {
|
public boolean b() {
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
From 15ab3b8cf98f836b88a3562ff13965054ba4e725 Mon Sep 17 00:00:00 2001
|
From 4d96f10c728379d6569099d30c3b52c9f25901fa Mon Sep 17 00:00:00 2001
|
||||||
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
From: BillyGalbreath <Blake.Galbreath@GMail.com>
|
||||||
Date: Fri, 27 Jul 2018 22:36:31 -0500
|
Date: Fri, 27 Jul 2018 22:36:31 -0500
|
||||||
Subject: [PATCH] SkeletonHorse Additions
|
Subject: [PATCH] SkeletonHorse Additions
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
diff --git a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||||
index e643201ebf..edd272eabd 100644
|
index e3690db471..ba6c0e96a3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
--- a/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
+++ b/src/main/java/net/minecraft/server/EntityHorseSkeleton.java
|
||||||
@@ -6,7 +6,7 @@ public class EntityHorseSkeleton extends EntityHorseAbstract {
|
@@ -5,7 +5,7 @@ import javax.annotation.Nullable;
|
||||||
|
public class EntityHorseSkeleton extends EntityHorseAbstract {
|
||||||
private final PathfinderGoalHorseTrap bM = new PathfinderGoalHorseTrap(this);
|
private final PathfinderGoalHorseTrap bM = new PathfinderGoalHorseTrap(this);
|
||||||
private boolean bN;
|
private boolean bN;
|
||||||
- private int bO;
|
- private int bO;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
From 00e6ceab7ffd6294c820ac08362954f8e9774078 Mon Sep 17 00:00:00 2001
|
From 505af35b52f62cdda8013adee6a920ce82b2b5d4 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Tue, 31 Jul 2018 19:32:57 -0500
|
Date: Tue, 31 Jul 2018 19:32:57 -0500
|
||||||
Subject: [PATCH] Make portal teleportation adjustment math more accurate
|
Subject: [PATCH] Make portal teleportation adjustment math more accurate
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
diff --git a/src/main/java/net/minecraft/server/EnumDirection.java b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
index 854ad49b6c..3ee310a9aa 100644
|
index c0853f0fcd..7aa940672e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
--- a/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
+++ b/src/main/java/net/minecraft/server/EnumDirection.java
|
||||||
@@ -85,6 +85,7 @@ public enum EnumDirection implements INamable {
|
@@ -95,6 +95,7 @@ public enum EnumDirection implements INamable {
|
||||||
return this.i;
|
return this.i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,16 +16,16 @@ index 854ad49b6c..3ee310a9aa 100644
|
||||||
public EnumDirection.EnumAxisDirection c() {
|
public EnumDirection.EnumAxisDirection c() {
|
||||||
return this.l;
|
return this.l;
|
||||||
}
|
}
|
||||||
@@ -93,6 +94,7 @@ public enum EnumDirection implements INamable {
|
@@ -103,6 +104,7 @@ public enum EnumDirection implements INamable {
|
||||||
return fromType1(this.h);
|
return fromType1(this.h);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public final EnumDirection rotateY() { return e(); } // Paper - OBFHELPER
|
+ public final EnumDirection rotateY() { return e(); } // Paper - OBFHELPER
|
||||||
public EnumDirection e() {
|
public EnumDirection e() {
|
||||||
switch (this) {
|
switch(this) {
|
||||||
case NORTH:
|
case NORTH:
|
||||||
@@ -272,6 +274,7 @@ public enum EnumDirection implements INamable {
|
@@ -333,6 +335,7 @@ public enum EnumDirection implements INamable {
|
||||||
this.d = s;
|
this.d = s1;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public final int getOffset() { return a(); } // Paper - OBFHELPER
|
+ public final int getOffset() { return a(); } // Paper - OBFHELPER
|
||||||
|
@ -33,17 +33,17 @@ index 854ad49b6c..3ee310a9aa 100644
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
diff --git a/src/main/java/net/minecraft/server/MathHelper.java b/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
index 5329102dd7..2e5b89af82 100644
|
index d53d0c2422..49fba0979e 100644
|
||||||
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
--- a/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
+++ b/src/main/java/net/minecraft/server/MathHelper.java
|
||||||
@@ -82,6 +82,7 @@ public class MathHelper {
|
@@ -83,6 +83,7 @@ public class MathHelper {
|
||||||
return f < f1 ? f1 : (f > f2 ? f2 : f);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public static double clamp(double d0, double d1, double d2) { return a(d0, d1, d2); } // Paper - OBFHELPER
|
+ public static double clamp(double d0, double d1, double d2) { return a(d0, d1, d2); } // Paper - OBFHELPER
|
||||||
public static double a(double d0, double d1, double d2) {
|
public static double a(double d0, double d1, double d2) {
|
||||||
return d0 < d1 ? d1 : (d0 > d2 ? d2 : d0);
|
if (d0 < d1) {
|
||||||
}
|
return d1;
|
||||||
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||||
index 20f2a9197c..fd372103be 100644
|
index 20f2a9197c..fd372103be 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||||
|
@ -79,10 +79,10 @@ index 20f2a9197c..fd372103be 100644
|
||||||
float f1 = 0.0F;
|
float f1 = 0.0F;
|
||||||
float f2 = 0.0F;
|
float f2 = 0.0F;
|
||||||
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
diff --git a/src/main/java/net/minecraft/server/ShapeDetector.java b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
index 3faf74a22f..4e1f8c211d 100644
|
index 0c9910d9a5..446cdb86d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
--- a/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
+++ b/src/main/java/net/minecraft/server/ShapeDetector.java
|
||||||
@@ -140,6 +140,7 @@ public class ShapeDetector {
|
@@ -143,6 +143,7 @@ public class ShapeDetector {
|
||||||
return this.c;
|
return this.c;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 8791766f99dac3a0544b3da3a695b80bafceb1b9 Mon Sep 17 00:00:00 2001
|
From f86adbbb5a758faffc7a2997a10a31462a80b381 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Tue, 22 Nov 2016 00:40:42 -0500
|
Date: Tue, 22 Nov 2016 00:40:42 -0500
|
||||||
Subject: [PATCH] Fix client rendering skulls from same user
|
Subject: [PATCH] Fix client rendering skulls from same user
|
||||||
|
@ -62,26 +62,17 @@ index a63a5811d6..cab8374832 100644
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
index 33436ac65b..6321010246 100644
|
index af382815f3..22a262bb60 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
@@ -38,6 +38,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -33,6 +33,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
|
int j = blockposition.getY() >> 4;
|
||||||
if (this.f() || (i & 1 << j) != 0) {
|
if (this.f() || (i & 1 << j) != 0) {
|
||||||
NBTTagCompound nbttagcompound = tileentity.aa_();
|
NBTTagCompound nbttagcompound = tileentity.aa_();
|
||||||
+ if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper
|
+ if (tileentity instanceof TileEntitySkull) { TileEntitySkull.sanitizeTileEntityUUID(nbttagcompound); } // Paper
|
||||||
|
|
||||||
this.e.add(nbttagcompound);
|
this.e.add(nbttagcompound);
|
||||||
}
|
}
|
||||||
@@ -122,7 +123,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
|
||||||
BiomeBase[] abiomebase = chunk.getBiomeIndex();
|
|
||||||
|
|
||||||
for (l = 0; l < abiomebase.length; ++l) {
|
|
||||||
- packetdataserializer.writeInt(IRegistry.BIOME.a((Object) abiomebase[l]));
|
|
||||||
+ packetdataserializer.writeInt(IRegistry.BIOME.a(abiomebase[l])); // Paper - decompile fix
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
diff --git a/src/main/java/net/minecraft/server/TileEntitySkull.java b/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||||
index e59f3c21d7..05fca47f34 100644
|
index e59f3c21d7..05fca47f34 100644
|
||||||
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
--- a/src/main/java/net/minecraft/server/TileEntitySkull.java
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From af0e968ff12e7722492e40654510e740fbaa2652 Mon Sep 17 00:00:00 2001
|
From e232364bbe6742e92b63345842d63483cdcfe77f Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sat, 11 Aug 2018 00:49:20 -0400
|
Date: Sat, 11 Aug 2018 00:49:20 -0400
|
||||||
Subject: [PATCH] Detect and repair corrupt Region Files
|
Subject: [PATCH] Detect and repair corrupt Region Files
|
||||||
|
@ -11,30 +11,30 @@ I don't know why mojang only checks for 4096, when anything less than 8192 is a
|
||||||
But to be safe, it will attempt to back up the file.
|
But to be safe, it will attempt to back up the file.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
diff --git a/src/main/java/net/minecraft/server/RegionFile.java b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
index cba2373125..0703922332 100644
|
index 5d2853b9ce..c35974aa7c 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
--- a/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
+++ b/src/main/java/net/minecraft/server/RegionFile.java
|
||||||
@@ -41,7 +41,20 @@ public class RegionFile {
|
@@ -40,7 +40,20 @@ public class RegionFile {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.c = new RandomAccessFile(file, "rw");
|
this.c = new RandomAccessFile(file1, "rw");
|
||||||
- if (this.c.length() < 4096L) {
|
- if (this.c.length() < 4096L) {
|
||||||
+ // Paper start - detect and fix incomplete headers
|
+ // Paper start - detect and fix incomplete headers
|
||||||
+ long length = this.c.length();
|
+ long length = this.c.length();
|
||||||
+ if (length < 8192 && length > 0) {
|
+ if (length < 8192 && length > 0) {
|
||||||
+ File corrupt = new File(file.getParentFile(), file.getName() + ".bak");
|
+ File corrupt = new File(file1.getParentFile(), file1.getName() + ".bak");
|
||||||
+ org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger();
|
+ org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger();
|
||||||
+ logger.error("Region file " + file + " was incomplete. Backing up to " + corrupt + " and repairing");
|
+ logger.error("Region file " + file1 + " was incomplete. Backing up to " + corrupt + " and repairing");
|
||||||
+ try {
|
+ try {
|
||||||
+ java.nio.file.Files.copy(file.toPath(), corrupt.toPath());
|
+ java.nio.file.Files.copy(file1.toPath(), corrupt.toPath());
|
||||||
+ } catch (IOException e) {
|
+ } catch (IOException e) {
|
||||||
+ logger.error("Error backing up corrupt file", e);
|
+ logger.error("Error backing up corrupt file", e);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ if (length < 8192L) {
|
+ if (length < 8192L) {
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
this.c.write(RegionFile.a);
|
this.c.write(a);
|
||||||
this.c.write(RegionFile.a);
|
this.c.write(a);
|
||||||
this.g += 8192;
|
this.g += 8192;
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 76e318afd422c05c58c4ba5e761ce6d7c8cb38c8 Mon Sep 17 00:00:00 2001
|
From fa8038c2779fe4080fd5ad15be4128adee1ddcc1 Mon Sep 17 00:00:00 2001
|
||||||
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
From: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||||
Date: Wed, 15 Aug 2018 12:05:12 -0700
|
Date: Wed, 15 Aug 2018 12:05:12 -0700
|
||||||
Subject: [PATCH] Optimize BlockPosition helper methods
|
Subject: [PATCH] Optimize BlockPosition helper methods
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize BlockPosition helper methods
|
||||||
Resolves #1338
|
Resolves #1338
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
index 936a49a3e8..7215056bd1 100644
|
index 986b1e13a5..45f7794613 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||||
@@ -59,59 +59,96 @@ public class BlockPosition extends BaseBlockPosition {
|
@@ -58,59 +58,96 @@ public class BlockPosition extends BaseBlockPosition {
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition up() {
|
public BlockPosition up() {
|
||||||
|
@ -17,9 +17,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX(), this.getY() + 1, this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition up(int i) {
|
public BlockPosition up(int ix) {
|
||||||
- return this.shift(EnumDirection.UP, i);
|
- return this.shift(EnumDirection.UP, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() + i, this.getZ()); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() + ix, this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition down() {
|
public BlockPosition down() {
|
||||||
|
@ -27,9 +27,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX(), this.getY() - 1, this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition down(int i) {
|
public BlockPosition down(int ix) {
|
||||||
- return this.shift(EnumDirection.DOWN, i);
|
- return this.shift(EnumDirection.DOWN, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX(), this.getY() - i, this.getZ()); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY() - ix, this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition north() {
|
public BlockPosition north() {
|
||||||
|
@ -37,9 +37,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - 1); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition north(int i) {
|
public BlockPosition north(int ix) {
|
||||||
- return this.shift(EnumDirection.NORTH, i);
|
- return this.shift(EnumDirection.NORTH, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - i); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() - ix); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition south() {
|
public BlockPosition south() {
|
||||||
|
@ -47,9 +47,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + 1); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition south(int i) {
|
public BlockPosition south(int ix) {
|
||||||
- return this.shift(EnumDirection.SOUTH, i);
|
- return this.shift(EnumDirection.SOUTH, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + i); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX(), this.getY(), this.getZ() + ix); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition west() {
|
public BlockPosition west() {
|
||||||
|
@ -57,9 +57,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX() - 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition west(int i) {
|
public BlockPosition west(int ix) {
|
||||||
- return this.shift(EnumDirection.WEST, i);
|
- return this.shift(EnumDirection.WEST, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX() - i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX() - ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition east() {
|
public BlockPosition east() {
|
||||||
|
@ -67,9 +67,9 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
+ return new BlockPosition(this.getX() + 1, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition east(int i) {
|
public BlockPosition east(int ix) {
|
||||||
- return this.shift(EnumDirection.EAST, i);
|
- return this.shift(EnumDirection.EAST, ix);
|
||||||
+ return i == 0 ? this : new BlockPosition(this.getX() + i, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
+ return ix == 0 ? this : new BlockPosition(this.getX() + ix, this.getY(), this.getZ()); // Paper - Optimize BlockPosition
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition shift(EnumDirection enumdirection) {
|
public BlockPosition shift(EnumDirection enumdirection) {
|
||||||
|
@ -94,27 +94,27 @@ index 936a49a3e8..7215056bd1 100644
|
||||||
+ // Paper End
|
+ // Paper End
|
||||||
}
|
}
|
||||||
|
|
||||||
public BlockPosition shift(EnumDirection enumdirection, int i) {
|
public BlockPosition shift(EnumDirection enumdirection, int ix) {
|
||||||
- return i == 0 ? this : new BlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i);
|
- return ix == 0 ? this : new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix);
|
||||||
+ // Paper Start - Optimize BlockPosition
|
+ // Paper Start - Optimize BlockPosition
|
||||||
+ if (i == 0) {
|
+ if (ix == 0) {
|
||||||
+ return this;
|
+ return this;
|
||||||
+ }
|
+ }
|
||||||
+ switch(enumdirection) {
|
+ switch(enumdirection) {
|
||||||
+ case UP:
|
+ case UP:
|
||||||
+ return new BlockPosition(this.getX(), this.getY() + i, this.getZ());
|
+ return new BlockPosition(this.getX(), this.getY() + ix, this.getZ());
|
||||||
+ case DOWN:
|
+ case DOWN:
|
||||||
+ return new BlockPosition(this.getX(), this.getY() - i, this.getZ());
|
+ return new BlockPosition(this.getX(), this.getY() - ix, this.getZ());
|
||||||
+ case NORTH:
|
+ case NORTH:
|
||||||
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - i);
|
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() - ix);
|
||||||
+ case SOUTH:
|
+ case SOUTH:
|
||||||
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + i);
|
+ return new BlockPosition(this.getX(), this.getY(), this.getZ() + ix);
|
||||||
+ case WEST:
|
+ case WEST:
|
||||||
+ return new BlockPosition(this.getX() - i, this.getY(), this.getZ());
|
+ return new BlockPosition(this.getX() - ix, this.getY(), this.getZ());
|
||||||
+ case EAST:
|
+ case EAST:
|
||||||
+ return new BlockPosition(this.getX() + i, this.getY(), this.getZ());
|
+ return new BlockPosition(this.getX() + ix, this.getY(), this.getZ());
|
||||||
+ default:
|
+ default:
|
||||||
+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX() * i, this.getY() + enumdirection.getAdjacentY() * i, this.getZ() + enumdirection.getAdjacentZ() * i);
|
+ return new BlockPosition(this.getX() + enumdirection.getAdjacentX() * ix, this.getY() + enumdirection.getAdjacentY() * ix, this.getZ() + enumdirection.getAdjacentZ() * ix);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper End
|
+ // Paper End
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From fa807b36de0c4f45acd8cc57912b446dc7b65860 Mon Sep 17 00:00:00 2001
|
From f5d3a976a51d35831486560b52f70aba7285ba67 Mon Sep 17 00:00:00 2001
|
||||||
From: Colin Godsey <crgodsey@gmail.com>
|
From: Colin Godsey <crgodsey@gmail.com>
|
||||||
Date: Wed, 8 Aug 2018 10:10:06 -0600
|
Date: Wed, 8 Aug 2018 10:10:06 -0600
|
||||||
Subject: [PATCH] Cache World Entity Type counts
|
Subject: [PATCH] Cache World Entity Type counts
|
||||||
|
@ -145,10 +145,10 @@ index 4252e8c02a..2b1affd03c 100644
|
||||||
public float length;
|
public float length;
|
||||||
public float J;
|
public float J;
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
index 4a8c3a428d..8f610c013a 100644
|
index 141db48f16..56542d531a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||||
@@ -614,6 +614,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -615,6 +615,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,10 +157,10 @@ index 4a8c3a428d..8f610c013a 100644
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EnumCreatureType.java b/src/main/java/net/minecraft/server/EnumCreatureType.java
|
diff --git a/src/main/java/net/minecraft/server/EnumCreatureType.java b/src/main/java/net/minecraft/server/EnumCreatureType.java
|
||||||
index 79e52f7bac..42f6a6a93a 100644
|
index 8874a05be5..0af387c059 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EnumCreatureType.java
|
--- a/src/main/java/net/minecraft/server/EnumCreatureType.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EnumCreatureType.java
|
+++ b/src/main/java/net/minecraft/server/EnumCreatureType.java
|
||||||
@@ -16,6 +16,8 @@ public enum EnumCreatureType {
|
@@ -18,6 +18,8 @@ public enum EnumCreatureType {
|
||||||
this.h = flag1;
|
this.h = flag1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ index 32808558bb..62b4c64f68 100644
|
||||||
if (l1 <= k) {
|
if (l1 <= k) {
|
||||||
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 4ea31bc201..abf3796d91 100644
|
index f99cdf1003..c479828d49 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -50,7 +50,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -50,7 +50,8 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 60322b509f65a591ad5dcce5985e6895cd7b26bc Mon Sep 17 00:00:00 2001
|
From 328689b5cc58e53615c8fde2642e9f0d096f2a75 Mon Sep 17 00:00:00 2001
|
||||||
From: miclebrick <miclebrick@outlook.com>
|
From: miclebrick <miclebrick@outlook.com>
|
||||||
Date: Thu, 23 Aug 2018 11:45:32 -0400
|
Date: Thu, 23 Aug 2018 11:45:32 -0400
|
||||||
Subject: [PATCH] Optimize CraftBlockData Creation
|
Subject: [PATCH] Optimize CraftBlockData Creation
|
||||||
|
@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData
|
||||||
and cloning it when one is needed.
|
and cloning it when one is needed.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java
|
diff --git a/src/main/java/net/minecraft/server/BlockData.java b/src/main/java/net/minecraft/server/BlockData.java
|
||||||
index 4dd6c32761..1b226a77e0 100644
|
index fbe181c1fd..bd86cd2e54 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockData.java
|
--- a/src/main/java/net/minecraft/server/BlockData.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockData.java
|
+++ b/src/main/java/net/minecraft/server/BlockData.java
|
||||||
@@ -1,6 +1,7 @@
|
@@ -1,6 +1,7 @@
|
||||||
|
@ -17,10 +17,10 @@ index 4dd6c32761..1b226a77e0 100644
|
||||||
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
||||||
|
|
||||||
public class BlockData extends BlockDataAbstract<Block, IBlockData> implements IBlockData {
|
public class BlockData extends BlockDataAbstract<Block, IBlockData> implements IBlockData {
|
||||||
|
public BlockData(Block block, ImmutableMap<IBlockState<?>, Comparable<?>> immutablemap) {
|
||||||
@@ -11,4 +12,14 @@ public class BlockData extends BlockDataAbstract<Block, IBlockData> implements I
|
@@ -10,4 +11,14 @@ public class BlockData extends BlockDataAbstract<Block, IBlockData> implements I
|
||||||
public Block getBlock() {
|
public Block getBlock() {
|
||||||
return (Block) this.e_;
|
return this.e_;
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
|
+ // Paper start - impl cached craft block data, lazy load to fix issue with loading at the wrong time
|
||||||
|
@ -34,10 +34,10 @@ index 4dd6c32761..1b226a77e0 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
index 6f80876990..726b178fd8 100644
|
index bf06a90312..4d62d0093d 100644
|
||||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
||||||
@@ -28,6 +28,8 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
|
@@ -23,6 +23,8 @@ public interface IBlockData extends IBlockDataHolder<IBlockData> {
|
||||||
|
|
||||||
Block getBlock();
|
Block getBlock();
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From 2f0929b908a4efcd1d3315902bb2b90bfbff13f9 Mon Sep 17 00:00:00 2001
|
From 57f394938e0a725caa306557459d93867d85d34d Mon Sep 17 00:00:00 2001
|
||||||
From: stonar96 <minecraft.stonar96@gmail.com>
|
From: stonar96 <minecraft.stonar96@gmail.com>
|
||||||
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
Date: Mon, 20 Aug 2018 03:03:58 +0200
|
||||||
Subject: [PATCH] Anti-Xray
|
Subject: [PATCH] Anti-Xray
|
||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
index 19f4c61cd..3acb1ff9f 100644
|
index 19f4c61cdc..3acb1ff9fd 100644
|
||||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||||
@@ -1,7 +1,10 @@
|
@@ -1,7 +1,10 @@
|
||||||
|
@ -49,7 +49,7 @@ index 19f4c61cd..3acb1ff9f 100644
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..1ba8477bf
|
index 0000000000..1ba8477bf9
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockController.java
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
|
@ -100,7 +100,7 @@ index 000000000..1ba8477bf
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..65d3e88c3
|
index 0000000000..65d3e88c3b
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketBlockControllerAntiXray.java
|
||||||
@@ -0,0 +1,670 @@
|
@@ -0,0 +1,670 @@
|
||||||
|
@ -776,7 +776,7 @@ index 000000000..65d3e88c3
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..41618994b
|
index 0000000000..41618994b4
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfo.java
|
||||||
@@ -0,0 +1,81 @@
|
@@ -0,0 +1,81 @@
|
||||||
|
@ -863,7 +863,7 @@ index 000000000..41618994b
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..e255a45fa
|
index 0000000000..e255a45fa3
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/ChunkPacketInfoAntiXray.java
|
||||||
@@ -0,0 +1,29 @@
|
@@ -0,0 +1,29 @@
|
||||||
|
@ -898,7 +898,7 @@ index 000000000..e255a45fa
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..cc586827a
|
index 0000000000..cc586827aa
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsReader.java
|
||||||
@@ -0,0 +1,56 @@
|
@@ -0,0 +1,56 @@
|
||||||
|
@ -960,7 +960,7 @@ index 000000000..cc586827a
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
diff --git a/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..37093419c
|
index 0000000000..37093419cf
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
+++ b/src/main/java/com/destroystokyo/paper/antixray/DataBitsWriter.java
|
||||||
@@ -0,0 +1,84 @@
|
@@ -0,0 +1,84 @@
|
||||||
|
@ -1049,7 +1049,7 @@ index 000000000..37093419c
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
index 56c378341..f3d9211ba 100644
|
index 56c3783412..f3d9211baa 100644
|
||||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||||
@@ -541,7 +541,7 @@ public class Chunk implements IChunkAccess {
|
@@ -541,7 +541,7 @@ public class Chunk implements IChunkAccess {
|
||||||
|
@ -1071,7 +1071,7 @@ index 56c378341..f3d9211ba 100644
|
||||||
this.initLighting();
|
this.initLighting();
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
index 867b0db77..06968974c 100644
|
index 867b0db770..06968974c5 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||||
@@ -843,7 +843,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
@@ -843,7 +843,7 @@ public class ChunkRegionLoader implements IChunkLoader, IAsyncChunkSaver {
|
||||||
|
@ -1093,10 +1093,10 @@ index 867b0db77..06968974c 100644
|
||||||
chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates");
|
chunksection.getBlocks().a(nbttagcompound, "Palette", "BlockStates");
|
||||||
chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight")));
|
chunksection.a(new NibbleArray(nbttagcompound.getByteArray("BlockLight")));
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
index 233cbb6d6..8c116b74c 100644
|
index 7e4c79a1ce..bdfc7d81ff 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||||
@@ -13,9 +13,15 @@ public class ChunkSection {
|
@@ -10,9 +10,15 @@ public class ChunkSection {
|
||||||
private NibbleArray emittedLight;
|
private NibbleArray emittedLight;
|
||||||
private NibbleArray skyLight;
|
private NibbleArray skyLight;
|
||||||
|
|
||||||
|
@ -1108,13 +1108,13 @@ index 233cbb6d6..8c116b74c 100644
|
||||||
+
|
+
|
||||||
+ public ChunkSection(int i, boolean flag, IChunkAccess chunk, IWorldReader world, boolean initializeBlocks) { // Paper - Anti-Xray
|
+ public ChunkSection(int i, boolean flag, IChunkAccess chunk, IWorldReader world, boolean initializeBlocks) { // Paper - Anti-Xray
|
||||||
this.yPos = i;
|
this.yPos = i;
|
||||||
- this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData()); // Paper - Decompile error
|
- this.blockIds = new DataPaletteBlock<IBlockData>(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData());
|
||||||
+ this.blockIds = new DataPaletteBlock<>(ChunkSection.GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Decompile error // Paper - Anti-Xray - Add predefined block data
|
+ this.blockIds = new DataPaletteBlock<IBlockData>(GLOBAL_PALETTE, Block.REGISTRY_ID, GameProfileSerializer::d, GameProfileSerializer::a, Blocks.AIR.getBlockData(), world instanceof GeneratorAccess ? ((GeneratorAccess) world).getMinecraftWorld().chunkPacketBlockController.getPredefinedBlockData(world, chunk, this, flag, initializeBlocks) : null, initializeBlocks); // Paper - Anti-Xray - Add predefined block data
|
||||||
this.emittedLight = new NibbleArray();
|
this.emittedLight = new NibbleArray();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
this.skyLight = new NibbleArray();
|
this.skyLight = new NibbleArray();
|
||||||
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
diff --git a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
index 95eb1a84a..34019bd1b 100644
|
index 95eb1a84ac..34019bd1b3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
--- a/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
+++ b/src/main/java/net/minecraft/server/ChunkTaskScheduler.java
|
||||||
@@ -42,7 +42,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
@@ -42,7 +42,7 @@ public class ChunkTaskScheduler extends Scheduler<ChunkCoordIntPair, ChunkStatus
|
||||||
|
@ -1136,7 +1136,7 @@ index 95eb1a84a..34019bd1b 100644
|
||||||
}) : (Scheduler.a) this.progressCache.get(chunkcoordintpair.a());
|
}) : (Scheduler.a) this.progressCache.get(chunkcoordintpair.a());
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
index 575f9b558..5d2561a94 100644
|
index 6e7454b134..af4b41d976 100644
|
||||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1146,7 +1146,7 @@ index 575f9b558..5d2561a94 100644
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.concurrent.locks.ReentrantLock;
|
import java.util.concurrent.locks.ReentrantLock;
|
||||||
@@ -17,6 +18,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -15,6 +16,7 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
private final Function<NBTTagCompound, T> e;
|
private final Function<NBTTagCompound, T> e;
|
||||||
private final Function<T, NBTTagCompound> f;
|
private final Function<T, NBTTagCompound> f;
|
||||||
private final T g;
|
private final T g;
|
||||||
|
@ -1154,22 +1154,21 @@ index 575f9b558..5d2561a94 100644
|
||||||
protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER
|
protected DataBits a; protected DataBits getDataBits() { return this.a; } // Paper - OBFHELPER
|
||||||
private DataPalette<T> h; private DataPalette<T> getDataPalette() { return this.h; } // Paper - OBFHELPER
|
private DataPalette<T> h; private DataPalette<T> getDataPalette() { return this.h; } // Paper - OBFHELPER
|
||||||
private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER
|
private int i; private int getBitsPerObject() { return this.i; } // Paper - OBFHELPER
|
||||||
@@ -41,13 +43,44 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -39,12 +41,43 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
this.j.unlock();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start - Anti-Xray - Support default constructor
|
public DataPaletteBlock(DataPalette<T> datapalette, RegistryBlockID<T> registryblockid, Function<NBTTagCompound, T> function, Function<T, NBTTagCompound> function1, T object) {
|
||||||
public DataPaletteBlock(DataPalette<T> datapalette, RegistryBlockID<T> registryblockid, Function<NBTTagCompound, T> function, Function<T, NBTTagCompound> function1, T t0) {
|
+ // Paper start - Anti-Xray - Support default constructor
|
||||||
+ this(datapalette, registryblockid, function, function1, t0, null, true);
|
+ this(datapalette, registryblockid, function, function1, object, null, true);
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
|
||||||
+
|
+
|
||||||
+ public DataPaletteBlock(DataPalette<T> datapalette, RegistryBlockID<T> registryblockid, Function<NBTTagCompound, T> function, Function<T, NBTTagCompound> function1, T t0, T[] predefinedObjects, boolean initialize) { // Paper - Anti-Xray - Add predefined objects
|
+ public DataPaletteBlock(DataPalette<T> datapalette, RegistryBlockID<T> registryblockid, Function<NBTTagCompound, T> function, Function<T, NBTTagCompound> function1, T object, T[] predefinedObjects, boolean initialize) {
|
||||||
|
+ // Paper end - Anti-Xray - Add predefined objects
|
||||||
this.b = datapalette;
|
this.b = datapalette;
|
||||||
this.d = registryblockid;
|
this.d = registryblockid;
|
||||||
this.e = function;
|
this.e = function;
|
||||||
this.f = function1;
|
this.f = function1;
|
||||||
this.g = t0;
|
this.g = (T)object;
|
||||||
- this.b(4);
|
- this.b(4);
|
||||||
+ // Paper start - Anti-Xray - Add predefined objects
|
+ // Paper start - Anti-Xray - Add predefined objects
|
||||||
+ this.predefinedObjects = predefinedObjects;
|
+ this.predefinedObjects = predefinedObjects;
|
||||||
|
@ -1199,8 +1198,8 @@ index 575f9b558..5d2561a94 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
private static int b(int i, int j, int k) {
|
private static int b(int ix, int jx, int k) {
|
||||||
@@ -73,12 +106,23 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -70,12 +103,22 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1213,19 +1212,18 @@ index 575f9b558..5d2561a94 100644
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
public int onResize(int ix, T object) {
|
||||||
public int onResize(int i, T t0) {
|
|
||||||
this.b();
|
this.b();
|
||||||
DataBits databits = this.a;
|
DataBits databits = this.a;
|
||||||
DataPalette<T> datapalette = this.h; // Paper - decompile fix
|
DataPalette<T> datapalette = this.h; // Paper - decompile fix
|
||||||
|
this.b(ix);
|
||||||
|
|
||||||
this.b(i);
|
|
||||||
+ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects
|
+ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects
|
||||||
|
for(int jx = 0; jx < databits.b(); ++jx) {
|
||||||
int j;
|
T object1 = datapalette.a(databits.a(jx)); // Paper - decompile fix
|
||||||
|
if (object1 != null) {
|
||||||
@@ -117,11 +161,28 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -108,11 +151,28 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
return object == null ? this.g : object;
|
return (T)(object == null ? this.g : object);
|
||||||
}
|
}
|
||||||
|
|
||||||
- public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
- public void writeDataPaletteBlock(PacketDataSerializer packetDataSerializer) { this.b(packetDataSerializer); } // Paper - OBFHELPER
|
||||||
|
@ -1254,26 +1252,26 @@ index 575f9b558..5d2561a94 100644
|
||||||
packetdataserializer.a(this.a.a());
|
packetdataserializer.a(this.a.a());
|
||||||
this.c();
|
this.c();
|
||||||
}
|
}
|
||||||
@@ -129,13 +190,15 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
@@ -120,12 +180,15 @@ public class DataPaletteBlock<T> implements DataPaletteExpandable<T> {
|
||||||
public void a(NBTTagCompound nbttagcompound, String s, String s1) {
|
public void a(NBTTagCompound nbttagcompound, String s, String s1) {
|
||||||
this.b();
|
this.b();
|
||||||
NBTTagList nbttaglist = nbttagcompound.getList(s, 10);
|
NBTTagList nbttaglist = nbttagcompound.getList(s, 10);
|
||||||
- int i = Math.max(4, MathHelper.d(nbttaglist.size()));
|
- int ix = Math.max(4, MathHelper.d(nbttaglist.size()));
|
||||||
|
- if (ix != this.i) {
|
||||||
+ // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)?
|
+ // Paper - Anti-Xray - TODO: Should this.predefinedObjects.length just be added here (faster) or should the contents be compared to calculate the size (less RAM)?
|
||||||
+ int i = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects
|
+ int ix = Math.max(4, MathHelper.d(nbttaglist.size() + (this.predefinedObjects == null ? 0 : this.predefinedObjects.length))); // Paper - Anti-Xray - Calculate the size with predefined objects
|
||||||
|
+
|
||||||
- if (i != this.i) {
|
+ if (true || ix != this.i) { // Paper - Anti-Xray - Not initialized yet
|
||||||
+ if (true || i != this.i) { // Paper - Anti-Xray - Not initialized yet
|
this.b(ix);
|
||||||
this.b(i);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.h.a(nbttaglist);
|
this.h.a(nbttaglist);
|
||||||
+ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects
|
+ this.addPredefinedObjects(); // Paper - Anti-Xray - Add predefined objects
|
||||||
long[] along = nbttagcompound.o(s1);
|
long[] along = nbttagcompound.o(s1);
|
||||||
int j = along.length * 64 / 4096;
|
int jx = along.length * 64 / 4096;
|
||||||
|
if (this.h == this.b) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
index f8facddb4..b2afec5e4 100644
|
index f8facddb40..b2afec5e4b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||||
@@ -158,8 +158,8 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
@@ -158,8 +158,8 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||||
|
@ -1334,7 +1332,7 @@ index f8facddb4..b2afec5e4 100644
|
||||||
public void a() {
|
public void a() {
|
||||||
this.o();
|
this.o();
|
||||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
index 632101024..d0ff96812 100644
|
index 22a262bb60..40ec398eef 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||||
@@ -1,5 +1,6 @@
|
@@ -1,5 +1,6 @@
|
||||||
|
@ -1344,26 +1342,22 @@ index 632101024..d0ff96812 100644
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.Unpooled;
|
import io.netty.buffer.Unpooled;
|
||||||
@@ -16,17 +17,30 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -14,17 +15,27 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
private byte[] d; private byte[] getData() { return this.d; } // Paper - OBFHELPER
|
private byte[] d; private byte[] getData() { return this.d; } // Paper - OBFHELPER
|
||||||
private List<NBTTagCompound> e;
|
private List<NBTTagCompound> e;
|
||||||
private boolean f;
|
private boolean f;
|
||||||
+ private volatile boolean ready = false; // Paper - Async-Anti-Xray - Ready flag for the network manager
|
+ private volatile boolean ready = false; // Paper - Async-Anti-Xray - Ready flag for the network manager
|
||||||
|
|
||||||
- public PacketPlayOutMapChunk() {}
|
public PacketPlayOutMapChunk() {
|
||||||
+ // Paper start - Async-Anti-Xray - Set the ready flag to true
|
+ this.ready = true; // Paper - Async-Anti-Xray - Set the ready flag to true
|
||||||
+ public PacketPlayOutMapChunk() {
|
}
|
||||||
+ this.ready = true;
|
|
||||||
+ }
|
|
||||||
+ // Paper end
|
|
||||||
|
|
||||||
public PacketPlayOutMapChunk(Chunk chunk, int i) {
|
public PacketPlayOutMapChunk(Chunk chunk, int i) {
|
||||||
+ ChunkPacketInfo<IBlockData> chunkPacketInfo = chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i); // Paper - Anti-Xray - Add chunk packet info
|
+ ChunkPacketInfo<IBlockData> chunkPacketInfo = chunk.world.chunkPacketBlockController.getChunkPacketInfo(this, chunk, i); // Paper - Anti-Xray - Add chunk packet info
|
||||||
this.a = chunk.locX;
|
this.a = chunk.locX;
|
||||||
this.b = chunk.locZ;
|
this.b = chunk.locZ;
|
||||||
this.f = i == '\uffff';
|
this.f = i == 65535;
|
||||||
boolean flag = chunk.getWorld().worldProvider.g();
|
boolean flag = chunk.getWorld().worldProvider.g();
|
||||||
|
|
||||||
this.d = new byte[this.a(chunk, flag, i)];
|
this.d = new byte[this.a(chunk, flag, i)];
|
||||||
- this.c = this.a(new PacketDataSerializer(this.h()), chunk, flag, i);
|
- this.c = this.a(new PacketDataSerializer(this.h()), chunk, flag, i);
|
||||||
+
|
+
|
||||||
|
@ -1375,9 +1369,9 @@ index 632101024..d0ff96812 100644
|
||||||
+
|
+
|
||||||
+ this.c = this.writeChunk(new PacketDataSerializer(this.h()), chunk, flag, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info
|
+ this.c = this.writeChunk(new PacketDataSerializer(this.h()), chunk, flag, i, chunkPacketInfo); // Paper - Anti-Xray - Add chunk packet info
|
||||||
this.e = Lists.newArrayList();
|
this.e = Lists.newArrayList();
|
||||||
Iterator iterator = chunk.getTileEntities().entrySet().iterator();
|
|
||||||
|
|
||||||
@@ -44,7 +58,18 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
for(Entry entry : chunk.getTileEntities().entrySet()) {
|
||||||
|
@@ -38,8 +49,19 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1387,16 +1381,17 @@ index 632101024..d0ff96812 100644
|
||||||
+ // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag
|
+ // Paper start - Async-Anti-Xray - Getter and Setter for the ready flag
|
||||||
+ public boolean isReady() {
|
+ public boolean isReady() {
|
||||||
+ return this.ready;
|
+ return this.ready;
|
||||||
+ }
|
}
|
||||||
+
|
|
||||||
+ public void setReady(boolean ready) {
|
+ public void setReady(boolean ready) {
|
||||||
+ this.ready = ready;
|
+ this.ready = ready;
|
||||||
}
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
|
+
|
||||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||||
this.a = packetdataserializer.readInt();
|
this.a = packetdataserializer.readInt();
|
||||||
@@ -98,8 +123,15 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
this.b = packetdataserializer.readInt();
|
||||||
|
@@ -86,8 +108,15 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
return bytebuf;
|
return bytebuf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1413,8 +1408,8 @@ index 632101024..d0ff96812 100644
|
||||||
int j = 0;
|
int j = 0;
|
||||||
ChunkSection[] achunksection = chunk.getSections();
|
ChunkSection[] achunksection = chunk.getSections();
|
||||||
int k = 0;
|
int k = 0;
|
||||||
@@ -111,7 +143,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
@@ -96,7 +125,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||||
|
ChunkSection chunksection = achunksection[k];
|
||||||
if (chunksection != Chunk.a && (!this.f() || !chunksection.a()) && (i & 1 << k) != 0) {
|
if (chunksection != Chunk.a && (!this.f() || !chunksection.a()) && (i & 1 << k) != 0) {
|
||||||
j |= 1 << k;
|
j |= 1 << k;
|
||||||
- chunksection.getBlocks().b(packetdataserializer);
|
- chunksection.getBlocks().b(packetdataserializer);
|
||||||
|
@ -1423,7 +1418,7 @@ index 632101024..d0ff96812 100644
|
||||||
if (flag) {
|
if (flag) {
|
||||||
packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes());
|
packetdataserializer.writeBytes(chunksection.getSkyLightArray().asBytes());
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
index f8d8a44a8..e7d465fb8 100644
|
index f8d8a44a88..e7d465fb8a 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||||
@@ -108,6 +108,8 @@ public class PlayerChunk {
|
@@ -108,6 +108,8 @@ public class PlayerChunk {
|
||||||
|
@ -1454,7 +1449,7 @@ index f8d8a44a8..e7d465fb8 100644
|
||||||
} else {
|
} else {
|
||||||
this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk)));
|
this.a((Packet) (new PacketPlayOutMultiBlockChange(this.dirtyCount, this.dirtyBlocks, this.chunk)));
|
||||||
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
diff --git a/src/main/java/net/minecraft/server/PlayerInteractManager.java b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
index cae24961f..a9690fb1c 100644
|
index cae24961fd..a9690fb1c3 100644
|
||||||
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
--- a/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
+++ b/src/main/java/net/minecraft/server/PlayerInteractManager.java
|
||||||
@@ -206,6 +206,8 @@ public class PlayerInteractManager {
|
@@ -206,6 +206,8 @@ public class PlayerInteractManager {
|
||||||
|
@ -1467,19 +1462,20 @@ index cae24961f..a9690fb1c 100644
|
||||||
|
|
||||||
public void a(BlockPosition blockposition) {
|
public void a(BlockPosition blockposition) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
index 541435d3e..0b4f0d241 100644
|
index 688b4ab8be..f78d5fbb86 100644
|
||||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||||
@@ -44,12 +44,24 @@ public class ProtoChunk implements IChunkAccess {
|
@@ -40,12 +40,25 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
private long s;
|
private long s;
|
||||||
private final Map<WorldGenStage.Features, BitSet> t;
|
private final Map<WorldGenStage.Features, BitSet> t;
|
||||||
private boolean u;
|
private boolean u;
|
||||||
+ private final GeneratorAccess world; // Paper - Anti-Xray
|
+ private final GeneratorAccess world; // Paper - Anti-Xray
|
||||||
|
|
||||||
|
+
|
||||||
+ // Paper start - Anti-Xray - Support default constructors
|
+ // Paper start - Anti-Xray - Support default constructors
|
||||||
public ProtoChunk(int i, int j, ChunkConverter chunkconverter) {
|
public ProtoChunk(int ix, int jx, ChunkConverter chunkconverter) {
|
||||||
- this(new ChunkCoordIntPair(i, j), chunkconverter);
|
- this(new ChunkCoordIntPair(ix, jx), chunkconverter);
|
||||||
+ this(i, j, chunkconverter, null);
|
+ this(ix, jx, chunkconverter, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) {
|
public ProtoChunk(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter) {
|
||||||
|
@ -1496,34 +1492,16 @@ index 541435d3e..0b4f0d241 100644
|
||||||
this.d = new AtomicInteger();
|
this.d = new AtomicInteger();
|
||||||
this.f = Maps.newEnumMap(HeightMap.Type.class);
|
this.f = Maps.newEnumMap(HeightMap.Type.class);
|
||||||
this.g = ChunkStatus.EMPTY;
|
this.g = ChunkStatus.EMPTY;
|
||||||
@@ -74,7 +86,7 @@ public class ProtoChunk implements IChunkAccess {
|
@@ -132,7 +145,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
IRegistry iregistry1 = IRegistry.BLOCK;
|
|
||||||
|
|
||||||
IRegistry.BLOCK.getClass();
|
|
||||||
- this.q = new ProtoChunkTickList(predicate, function, iregistry1::getOrDefault, chunkcoordintpair);
|
|
||||||
+ this.q = new ProtoChunkTickList<Block>(predicate, function, IRegistry.BLOCK::getOrDefault, chunkcoordintpair); // Paper - decompile fix
|
|
||||||
predicate = (fluidtype) -> {
|
|
||||||
return fluidtype == null || fluidtype == FluidTypes.a;
|
|
||||||
};
|
|
||||||
@@ -83,7 +95,7 @@ public class ProtoChunk implements IChunkAccess {
|
|
||||||
function = iregistry::getKey;
|
|
||||||
iregistry1 = IRegistry.FLUID;
|
|
||||||
IRegistry.FLUID.getClass();
|
|
||||||
- this.r = new ProtoChunkTickList(predicate, function, iregistry1::getOrDefault, chunkcoordintpair);
|
|
||||||
+ this.r = new ProtoChunkTickList<FluidType>(predicate, function, IRegistry.FLUID::getOrDefault, chunkcoordintpair); // Paper - decompile fix
|
|
||||||
}
|
|
||||||
|
|
||||||
public static ShortList a(ShortList[] ashortlist, int i) {
|
|
||||||
@@ -152,7 +164,7 @@ public class ProtoChunk implements IChunkAccess {
|
|
||||||
return iblockdata;
|
return iblockdata;
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x());
|
- this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x());
|
||||||
+ this.j[j >> 4] = new ChunkSection(j >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray
|
+ this.j[jx >> 4] = new ChunkSection(jx >> 4 << 4, this.x(), this, this.world, true); // Paper - Anti-Xray
|
||||||
}
|
}
|
||||||
|
|
||||||
IBlockData iblockdata1 = this.j[j >> 4].getType(i & 15, j & 15, k & 15);
|
IBlockData iblockdata1 = this.j[jx >> 4].getType(ix & 15, jx & 15, kx & 15);
|
||||||
@@ -406,7 +418,7 @@ public class ProtoChunk implements IChunkAccess {
|
@@ -375,7 +388,7 @@ public class ProtoChunk implements IChunkAccess {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1533,7 +1511,7 @@ index 541435d3e..0b4f0d241 100644
|
||||||
|
|
||||||
if (enumskyblock == EnumSkyBlock.SKY) {
|
if (enumskyblock == EnumSkyBlock.SKY) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||||
index 20bead54b..49809372d 100644
|
index 20bead54bf..49809372d8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
--- a/src/main/java/net/minecraft/server/World.java
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
+++ b/src/main/java/net/minecraft/server/World.java
|
||||||
@@ -1,6 +1,8 @@
|
@@ -1,6 +1,8 @@
|
||||||
|
@ -1570,7 +1548,7 @@ index 20bead54b..49809372d 100644
|
||||||
if (iblockdata1 == null) {
|
if (iblockdata1 == null) {
|
||||||
// CraftBukkit start - remove blockstate if failed
|
// CraftBukkit start - remove blockstate if failed
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||||
index c26f0ed16..f6915d32a 100644
|
index c26f0ed16b..f6915d32ab 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||||
@@ -17,9 +17,11 @@ import org.bukkit.material.MaterialData;
|
@@ -17,9 +17,11 @@ import org.bukkit.material.MaterialData;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 02c2f6575eb8ecea97cbd43517c6cdabb2879174 Mon Sep 17 00:00:00 2001
|
From 825b7b20507d171d3c14a620f650f33ae97d89cc Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Sun, 26 Aug 2018 20:49:50 -0400
|
Date: Sun, 26 Aug 2018 20:49:50 -0400
|
||||||
Subject: [PATCH] Optimize RegistryMaterials
|
Subject: [PATCH] Optimize RegistryMaterials
|
||||||
|
@ -8,29 +8,20 @@ Use larger initial sizes to increase bucket capacity on the BiMap
|
||||||
BiMap.get was seen to be using a good bit of CPU time.
|
BiMap.get was seen to be using a good bit of CPU time.
|
||||||
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java
|
diff --git a/src/main/java/net/minecraft/server/RegistryMaterials.java b/src/main/java/net/minecraft/server/RegistryMaterials.java
|
||||||
index 2aa6f89c18..1974baff83 100644
|
index 83ce386e05..a47110bba8 100644
|
||||||
--- a/src/main/java/net/minecraft/server/RegistryMaterials.java
|
--- a/src/main/java/net/minecraft/server/RegistryMaterials.java
|
||||||
+++ b/src/main/java/net/minecraft/server/RegistryMaterials.java
|
+++ b/src/main/java/net/minecraft/server/RegistryMaterials.java
|
||||||
@@ -14,8 +14,8 @@ import org.apache.logging.log4j.Logger;
|
@@ -13,8 +13,8 @@ import org.apache.logging.log4j.Logger;
|
||||||
public class RegistryMaterials<V> implements IRegistry<V> {
|
|
||||||
|
|
||||||
|
public class RegistryMaterials<V> implements IRegistry<V> {
|
||||||
protected static final Logger a = LogManager.getLogger();
|
protected static final Logger a = LogManager.getLogger();
|
||||||
- protected final RegistryID<V> b = new RegistryID(256);
|
- protected final RegistryID<V> b = new RegistryID<V>(256);
|
||||||
- protected final BiMap<MinecraftKey, V> c = HashBiMap.create();
|
- protected final BiMap<MinecraftKey, V> c = HashBiMap.create();
|
||||||
+ protected final RegistryID<V> b = new RegistryID<>(2048); // Paper - use bigger expected size to reduce collisions
|
+ protected final RegistryID<V> b = new RegistryID<V>(2048); // Paper - use bigger expected size to reduce collisions
|
||||||
+ protected final BiMap<MinecraftKey, V> c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions
|
+ protected final BiMap<MinecraftKey, V> c = HashBiMap.create(2048); // Paper - use bigger expected size to reduce collisions
|
||||||
protected Object[] d;
|
protected Object[] d;
|
||||||
private int x;
|
private int x;
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class RegistryMaterials<V> implements IRegistry<V> {
|
|
||||||
this.d = set.toArray(new Object[set.size()]);
|
|
||||||
}
|
|
||||||
|
|
||||||
- return this.d[random.nextInt(this.d.length)];
|
|
||||||
+ return (V) this.d[random.nextInt(this.d.length)]; // Paper - decompile fix
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean c(MinecraftKey minecraftkey) {
|
|
||||||
--
|
--
|
||||||
2.18.0
|
2.18.0
|
||||||
|
|
||||||
|
|
|
@ -8,27 +8,89 @@ workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
windows="$([[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]] && echo "true" || echo "false")"
|
windows="$([[ "$OSTYPE" == "cygwin" || "$OSTYPE" == "msys" ]] && echo "true" || echo "false")"
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||||
|
spigotdecompiledir="$decompiledir/spigot"
|
||||||
|
forgedecompiledir="$decompiledir/forge"
|
||||||
|
forgeflowerversion="1.5.380.19"
|
||||||
|
forgeflowerurl="http://files.minecraftforge.net/maven/net/minecraftforge/forgeflower/$forgeflowerversion/forgeflower-$forgeflowerversion.jar"
|
||||||
|
# temp use patched version
|
||||||
|
forgeflowerurl="https://zachbr.keybase.pub/paper/forgeflower-patched/forgeflower-1.5.380.19.jar?dl=1"
|
||||||
|
forgeflowerbin="$workdir/ForgeFlower/$forgeflowerversion.jar"
|
||||||
|
# TODO: Make this better? We don't need spigot compat for this stage
|
||||||
|
forgefloweroptions="-dgs=1 -hdc=0 -asc=1 -udv=1 -jvn=1"
|
||||||
|
forgeflowercachefile="$decompiledir/forgeflowercache"
|
||||||
|
forgeflowercachevalue="$forgeflowerurl - $forgeflowerversion - $forgefloweroptions";
|
||||||
classdir="$decompiledir/classes"
|
classdir="$decompiledir/classes"
|
||||||
|
|
||||||
|
mkdir -p "$workdir/ForgeFlower"
|
||||||
|
|
||||||
echo "Extracting NMS classes..."
|
echo "Extracting NMS classes..."
|
||||||
if [ ! -d "$classdir" ]; then
|
if [ ! -d "$classdir" ]; then
|
||||||
mkdir -p "$classdir"
|
mkdir -p "$classdir"
|
||||||
cd "$classdir"
|
cd "$classdir"
|
||||||
|
set +e
|
||||||
jar xf "$decompiledir/$minecraftversion-mapped.jar" net/minecraft/server
|
jar xf "$decompiledir/$minecraftversion-mapped.jar" net/minecraft/server
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
echo "Failed to extract NMS classes."
|
echo "Failed to extract NMS classes."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Decompiling classes..."
|
# prep folders
|
||||||
if [ ! -d "$decompiledir/net/minecraft/server" ]; then
|
mkdir -p "$spigotdecompiledir"
|
||||||
|
mkdir -p "$forgedecompiledir"
|
||||||
|
|
||||||
|
needsDecomp=0
|
||||||
|
if [ ! -f "$forgeflowercachefile" ]; then
|
||||||
|
needsDecomp=1
|
||||||
|
elif [ "$(cat ${forgeflowercachefile})" != "$forgeflowercachevalue" ]; then
|
||||||
|
needsDecomp=1
|
||||||
|
fi
|
||||||
|
if [ "$needsDecomp" == "1" ]; then
|
||||||
|
# our local cache is now invalidated, we can update forgeflower to get better deobfuscation
|
||||||
|
rm -rf "$forgedecompiledir"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Forge (for Paper mc-dev imports, and dev src folders for unimported files)
|
||||||
|
if [ ! -d "$forgedecompiledir/net" ] ; then
|
||||||
|
echo "Decompiling classes (stage 1)..."
|
||||||
cd "$basedir"
|
cd "$basedir"
|
||||||
java -jar "$workdir/BuildData/bin/fernflower.jar" -dgs=1 -hdc=0 -asc=1 -udv=0 "$classdir" "$decompiledir"
|
|
||||||
|
if [ ! -f "$forgeflowerbin" ]; then
|
||||||
|
echo "Downloading ForgeFlower ($forgeflowerversion)..."
|
||||||
|
curl -s -o "$forgeflowerbin" "$forgeflowerurl"
|
||||||
|
fi
|
||||||
|
|
||||||
|
set +e
|
||||||
|
java -Ddecomp.renameparams=true -jar "$forgeflowerbin" ${forgefloweroptions} -ind=' ' "$classdir" "$forgedecompiledir"
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
|
rm -rf "$forgedecompiledir/net"
|
||||||
echo "Failed to decompile classes."
|
echo "Failed to decompile classes."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
echo "$forgeflowercachevalue" > "$forgeflowercachefile"
|
||||||
|
set -e
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Spigot (for CraftBukkit patches)
|
||||||
|
|
||||||
|
# if we see the old net folder, copy it to spigot to avoid redecompiling
|
||||||
|
if [ -d "$decompiledir/net" ]; then
|
||||||
|
cp -r "$decompiledir/net" "$spigotdecompiledir/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$spigotdecompiledir/net" ]; then
|
||||||
|
echo "Decompiling classes (stage 2)..."
|
||||||
|
cd "$basedir"
|
||||||
|
set +e
|
||||||
|
java -jar "$workdir/BuildData/bin/fernflower.jar" -dgs=1 -hdc=0 -asc=1 -udv=0 "$classdir" "$spigotdecompiledir"
|
||||||
|
if [ "$?" != "0" ]; then
|
||||||
|
rm -rf "$spigotdecompiledir/net"
|
||||||
|
echo "Failed to decompile classes."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set a symlink to current
|
# set a symlink to current
|
||||||
|
|
|
@ -11,7 +11,7 @@ gitcmd="git -c commit.gpgsign=false"
|
||||||
|
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
decompiledir="$workdir/Minecraft/$minecraftversion/forge"
|
||||||
|
|
||||||
export importedmcdev=""
|
export importedmcdev=""
|
||||||
function import {
|
function import {
|
||||||
|
|
|
@ -6,8 +6,8 @@ PS1="$"
|
||||||
basedir="$(cd "$1" && pwd -P)"
|
basedir="$(cd "$1" && pwd -P)"
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
spigotdecompiledir="$workdir/Minecraft/$minecraftversion/spigot"
|
||||||
nms="$decompiledir/net/minecraft/server"
|
nms="$spigotdecompiledir/net/minecraft/server"
|
||||||
cb="src/main/java/net/minecraft/server"
|
cb="src/main/java/net/minecraft/server"
|
||||||
gitcmd="git -c commit.gpgsign=false"
|
gitcmd="git -c commit.gpgsign=false"
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ cd "$basedir"
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||||
nms="$decompiledir/net/minecraft/server"
|
nms="$decompiledir/forge/net/minecraft/server"
|
||||||
papernms="Paper-Server/src/main/java/net/minecraft/server"
|
papernms="Paper-Server/src/main/java/net/minecraft/server"
|
||||||
mcdevsrc="${decompiledir}/src/net/minecraft/server"
|
mcdevsrc="${decompiledir}/src/net/minecraft/server"
|
||||||
rm -rf "${mcdevsrc}"
|
rm -rf "${mcdevsrc}"
|
||||||
|
|
|
@ -12,11 +12,12 @@ accesstransforms="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.
|
||||||
classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4)
|
classmappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep classMappings | cut -d '"' -f 4)
|
||||||
membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4)
|
membermappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep memberMappings | cut -d '"' -f 4)
|
||||||
packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
|
packagemappings="$workdir/BuildData/mappings/"$(cat "${workdir}/BuildData/info.json" | grep packageMappings | cut -d '"' -f 4)
|
||||||
jarpath="$workdir/Minecraft/$minecraftversion/$minecraftversion"
|
decompiledir="$workdir/Minecraft/$minecraftversion"
|
||||||
|
jarpath="$decompiledir/$minecraftversion"
|
||||||
|
mkdir -p "$decompiledir"
|
||||||
|
|
||||||
echo "Downloading unmapped vanilla jar..."
|
echo "Downloading unmapped vanilla jar..."
|
||||||
if [ ! -f "$jarpath.jar" ]; then
|
if [ ! -f "$jarpath.jar" ]; then
|
||||||
mkdir -p "$workdir/Minecraft/$minecraftversion"
|
|
||||||
curl -s -o "$jarpath.jar" "$minecraftserverurl"
|
curl -s -o "$jarpath.jar" "$minecraftserverurl"
|
||||||
if [ "$?" != "0" ]; then
|
if [ "$?" != "0" ]; then
|
||||||
echo "Failed to download the vanilla server jar. Check connectivity or try again later."
|
echo "Failed to download the vanilla server jar. Check connectivity or try again later."
|
||||||
|
|
|
@ -5,7 +5,6 @@ PS1="$"
|
||||||
basedir="$(cd "$1" && pwd -P)"
|
basedir="$(cd "$1" && pwd -P)"
|
||||||
workdir="$basedir/work"
|
workdir="$basedir/work"
|
||||||
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
minecraftversion=$(cat "$workdir/BuildData/info.json" | grep minecraftVersion | cut -d '"' -f 4)
|
||||||
decompiledir="$workdir/Minecraft/$minecraftversion"
|
|
||||||
gitcmd="git -c commit.gpgsign=false"
|
gitcmd="git -c commit.gpgsign=false"
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue