More work towards 1.14 pre5
This commit is contained in:
parent
6c3f04049d
commit
a64c1a03c9
|
@ -1,4 +1,4 @@
|
||||||
From a3b9b3e93ec4c99f6bdd845a923c4ee057801b78 Mon Sep 17 00:00:00 2001
|
From c94a16a6e4f1498e7bc54b2043915211a590b586 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
||||||
Subject: [PATCH] Paper config files
|
Subject: [PATCH] Paper config files
|
||||||
|
@ -596,10 +596,10 @@ index f31f407fa1..28fa346b7f 100644
|
||||||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||||
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
this.ticksPerAnimalSpawns = this.getServer().getTicksPerAnimalSpawns(); // CraftBukkit
|
||||||
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 142b4a3a17..60a5ba6c73 100644
|
index 83ab4245da..93246f464b 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
|
||||||
@@ -727,6 +727,7 @@ public final class CraftServer implements Server {
|
@@ -751,6 +751,7 @@ public final class CraftServer implements Server {
|
||||||
}
|
}
|
||||||
|
|
||||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||||
|
@ -607,7 +607,7 @@ index 142b4a3a17..60a5ba6c73 100644
|
||||||
for (WorldServer world : console.getWorlds()) {
|
for (WorldServer world : console.getWorlds()) {
|
||||||
world.worldData.setDifficulty(config.difficulty);
|
world.worldData.setDifficulty(config.difficulty);
|
||||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||||
@@ -742,6 +743,7 @@ public final class CraftServer implements Server {
|
@@ -766,6 +767,7 @@ public final class CraftServer implements Server {
|
||||||
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
|
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
|
||||||
}
|
}
|
||||||
world.spigotConfig.init(); // Spigot
|
world.spigotConfig.init(); // Spigot
|
||||||
|
@ -615,7 +615,7 @@ index 142b4a3a17..60a5ba6c73 100644
|
||||||
}
|
}
|
||||||
|
|
||||||
pluginManager.clearPlugins();
|
pluginManager.clearPlugins();
|
||||||
@@ -749,6 +751,7 @@ public final class CraftServer implements Server {
|
@@ -773,6 +775,7 @@ public final class CraftServer implements Server {
|
||||||
resetRecipes();
|
resetRecipes();
|
||||||
reloadData();
|
reloadData();
|
||||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||||
|
@ -623,7 +623,7 @@ index 142b4a3a17..60a5ba6c73 100644
|
||||||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||||
|
|
||||||
@@ -1925,4 +1928,26 @@ public final class CraftServer implements Server {
|
@@ -1949,4 +1952,26 @@ public final class CraftServer implements Server {
|
||||||
{
|
{
|
||||||
return spigot;
|
return spigot;
|
||||||
}
|
}
|
||||||
|
@ -651,10 +651,10 @@ index 142b4a3a17..60a5ba6c73 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index c9668afc65..3e7024780b 100644
|
index b61c06e32a..e34abd0c1f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -128,6 +128,14 @@ public class Main {
|
@@ -127,6 +127,14 @@ public class Main {
|
||||||
.defaultsTo(new File("spigot.yml"))
|
.defaultsTo(new File("spigot.yml"))
|
||||||
.describedAs("Yml file");
|
.describedAs("Yml file");
|
||||||
// Spigot End
|
// Spigot End
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 8da836e8eedeba7af28f6260fa2084de50ec23ee Mon Sep 17 00:00:00 2001
|
From 134acc6c6f13c7533bbf99adc73fc208aec957e9 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
|
||||||
|
@ -837,10 +837,10 @@ index ea90a01830..59e7d907ef 100644
|
||||||
if (throwable != null) {
|
if (throwable != null) {
|
||||||
completablefuture.completeExceptionally(throwable);
|
completablefuture.completeExceptionally(throwable);
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
index c4aa0152c8..6e44e58c58 100644
|
index 73dd802205..9ed7f8ede4 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||||
@@ -91,6 +91,7 @@ public final class CraftItemStack extends ItemStack {
|
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
|
||||||
}
|
}
|
||||||
|
|
||||||
net.minecraft.server.ItemStack handle;
|
net.minecraft.server.ItemStack handle;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From f01b6961ade709b2e4076e4c8bc65ca191af034d Mon Sep 17 00:00:00 2001
|
From 46fe3ad03c1a6e865b265c93a1d00dc98c5e7be4 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
||||||
Subject: [PATCH] Add MinecraftKey Information to Objects
|
Subject: [PATCH] Add MinecraftKey Information to Objects
|
||||||
|
@ -19,10 +19,10 @@ index 2e79b0b5ff..f38179e983 100644
|
||||||
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||||
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
|
ChunkCoordIntPair chunk = new ChunkCoordIntPair(e.getChunkX(), e.getChunkZ());
|
||||||
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 cd998fcfb5..d9c9748cec 100644
|
index cec990f357..d636965800 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
|
||||||
@@ -44,7 +44,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
|
@@ -47,7 +47,7 @@ import org.bukkit.event.entity.EntityPortalEvent;
|
||||||
import org.bukkit.plugin.PluginManager;
|
import org.bukkit.plugin.PluginManager;
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
|
|
||||||
|
@ -31,16 +31,7 @@ index cd998fcfb5..d9c9748cec 100644
|
||||||
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
private static final int CURRENT_LEVEL = 2;
|
private static final int CURRENT_LEVEL = 2;
|
||||||
@@ -72,7 +72,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
@@ -1664,12 +1664,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||||
private static final AxisAlignedBB b = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D);
|
|
||||||
private static double c = 1.0D;
|
|
||||||
private static int entityCount;
|
|
||||||
- private final EntityTypes<?> g;
|
|
||||||
+ private final EntityTypes<?> g; public EntityTypes<?> getEntityType() { return g; } // Paper - OBFHELPER
|
|
||||||
private int id;
|
|
||||||
public boolean j;
|
|
||||||
public final List<Entity> passengers;
|
|
||||||
@@ -1775,12 +1775,29 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,27 +55,26 @@ index cd998fcfb5..d9c9748cec 100644
|
||||||
+ }
|
+ }
|
||||||
@Nullable
|
@Nullable
|
||||||
public final String getSaveID() {
|
public final String getSaveID() {
|
||||||
- EntityTypes<?> entitytypes = this.P();
|
EntityTypes<?> entitytypes = this.getEntityType();
|
||||||
- MinecraftKey minecraftkey = EntityTypes.getName(entitytypes);
|
MinecraftKey minecraftkey = EntityTypes.getName(entitytypes);
|
||||||
-
|
|
||||||
- return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null;
|
- return entitytypes.a() && minecraftkey != null ? minecraftkey.toString() : null;
|
||||||
+ EntityTypes type = this.getEntityType();
|
+ return entitytypes != null && entitytypes.isPersistable() ? getMinecraftKeyString() : null;
|
||||||
+ return type != null && type.isPersistable() ? getMinecraftKeyString() : null;
|
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void a(NBTTagCompound nbttagcompound);
|
protected abstract void a(NBTTagCompound nbttagcompound);
|
||||||
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 a07ee150c2..d74bfa1201 100644
|
index 0f2604a3d5..fae259ac70 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
|
||||||
@@ -240,6 +240,7 @@ public class EntityTypes<T extends Entity> {
|
@@ -238,6 +238,7 @@ public class EntityTypes<T extends Entity> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
|
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
|
||||||
public boolean a() {
|
public boolean a() {
|
||||||
return this.aU;
|
return this.bb;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
|
@ -102,7 +92,7 @@ index 0000000000..743142d030
|
||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
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 62b6e6eb38..7390061bf0 100644
|
index df46dbcacc..319be67501 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
|
||||||
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
|
@@ -7,11 +7,11 @@ import org.apache.logging.log4j.Logger;
|
||||||
|
@ -114,13 +104,13 @@ index 62b6e6eb38..7390061bf0 100644
|
||||||
|
|
||||||
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
public CustomTimingsHandler tickTimer = org.bukkit.craftbukkit.SpigotTimings.getTileEntityTimings(this); // Spigot
|
||||||
private static final Logger a = LogManager.getLogger();
|
private static final Logger a = LogManager.getLogger();
|
||||||
- private final TileEntityTypes<?> e;
|
- private final TileEntityTypes<?> b;
|
||||||
+ private final TileEntityTypes<?> e; public TileEntityTypes getTileEntityType() { return e; } // Paper - OBFHELPER
|
+ private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER
|
||||||
|
@Nullable
|
||||||
protected World world;
|
protected World world;
|
||||||
protected BlockPosition position;
|
protected BlockPosition position;
|
||||||
protected boolean d;
|
@@ -24,6 +24,26 @@ public abstract class TileEntity {
|
||||||
@@ -23,6 +23,26 @@ public abstract class TileEntity {
|
this.b = tileentitytypes;
|
||||||
this.e = tileentitytypes;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From b62193df23ee54b4b15077fd0ac4939003ac99aa Mon Sep 17 00:00:00 2001
|
From 117ce0bb3764d81b944e8a9455f9da22c01d732c Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
||||||
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
||||||
|
@ -8,22 +8,25 @@ This enables us a fast reference to the entities current chunk instead
|
||||||
of having to look it up by hashmap lookups.
|
of having to look it up by hashmap lookups.
|
||||||
|
|
||||||
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 417c015e56..95a51ab745 100644
|
index 0f031e862b..7fa141f52c 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
|
||||||
@@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess {
|
@@ -36,7 +36,7 @@ public class Chunk implements IChunkAccess {
|
||||||
private final BiomeBase[] f;
|
private final ChunkSection[] sections;
|
||||||
private final boolean[] g;
|
private final BiomeBase[] d;
|
||||||
private final Map<BlockPosition, NBTTagCompound> h;
|
private final Map<BlockPosition, NBTTagCompound> e;
|
||||||
- private boolean i;
|
- public boolean loaded;
|
||||||
+ private boolean i;public boolean isLoaded() { return i; } // Paper - OBFHELPER
|
+ public boolean loaded; public boolean isLoaded() { return loaded; } // Paper - OBFHELPER
|
||||||
public final World world;
|
public final World world;
|
||||||
public final Map<HeightMap.Type, HeightMap> heightMap;
|
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||||
public final int locX;
|
private final ChunkConverter i;
|
||||||
@@ -66,7 +66,30 @@ public class Chunk implements IChunkAccess {
|
@@ -58,11 +58,39 @@ public class Chunk implements IChunkAccess {
|
||||||
// CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
private final ChunkCoordIntPair loc;
|
||||||
private int neighbors = 0x1 << 12;
|
private volatile boolean x;
|
||||||
public long chunkKey;
|
|
||||||
|
+ // CraftBukkit start - Neighbor loaded cache for chunk lighting and entity ticking
|
||||||
|
+ private int neighbors = 0x1 << 12;
|
||||||
|
+ public long chunkKey;
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ private class TileEntityHashMap extends java.util.HashMap<BlockPosition, TileEntity> {
|
+ private class TileEntityHashMap extends java.util.HashMap<BlockPosition, TileEntity> {
|
||||||
+ @Override
|
+ @Override
|
||||||
|
@ -37,7 +40,7 @@ index 417c015e56..95a51ab745 100644
|
||||||
+ }
|
+ }
|
||||||
+ return replaced;
|
+ return replaced;
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public TileEntity remove(Object key) {
|
+ public TileEntity remove(Object key) {
|
||||||
+ TileEntity removed = super.remove(key);
|
+ TileEntity removed = super.remove(key);
|
||||||
|
@ -48,27 +51,25 @@ index 417c015e56..95a51ab745 100644
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
public boolean areNeighborsLoaded(final int radius) {
|
+
|
||||||
switch (radius) {
|
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeBase[] abiomebase, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer<Chunk> consumer) {
|
||||||
case 2:
|
this.sections = new ChunkSection[16];
|
||||||
@@ -97,7 +120,7 @@ public class Chunk implements IChunkAccess {
|
this.e = Maps.newHashMap();
|
||||||
this.g = new boolean[256];
|
|
||||||
this.h = Maps.newHashMap();
|
|
||||||
this.heightMap = Maps.newEnumMap(HeightMap.Type.class);
|
this.heightMap = Maps.newEnumMap(HeightMap.Type.class);
|
||||||
- this.tileEntities = Maps.newHashMap();
|
- this.tileEntities = Maps.newHashMap();
|
||||||
+ this.tileEntities = new TileEntityHashMap(); // Paper
|
+ this.tileEntities = new TileEntityHashMap(); // Paper
|
||||||
this.p = Maps.newHashMap();
|
this.l = Maps.newHashMap();
|
||||||
this.q = Maps.newHashMap();
|
this.m = Maps.newHashMap();
|
||||||
this.r = new ShortList[16];
|
this.n = new ShortList[16];
|
||||||
@@ -653,6 +676,7 @@ public class Chunk implements IChunkAccess {
|
@@ -357,6 +385,7 @@ public class Chunk implements IChunkAccess {
|
||||||
}
|
}
|
||||||
|
|
||||||
entity.inChunk = true;
|
entity.inChunk = true;
|
||||||
+ entity.setCurrentChunk(this); // Paper
|
+ entity.setCurrentChunk(this); // Paper
|
||||||
entity.chunkX = this.locX;
|
entity.chunkX = this.loc.x;
|
||||||
entity.chunkY = k;
|
entity.chunkY = k;
|
||||||
entity.chunkZ = this.locZ;
|
entity.chunkZ = this.loc.z;
|
||||||
@@ -663,6 +687,7 @@ public class Chunk implements IChunkAccess {
|
@@ -368,6 +397,7 @@ public class Chunk implements IChunkAccess {
|
||||||
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +77,7 @@ index 417c015e56..95a51ab745 100644
|
||||||
public void b(Entity entity) {
|
public void b(Entity entity) {
|
||||||
this.a(entity, entity.chunkY);
|
this.a(entity, entity.chunkY);
|
||||||
}
|
}
|
||||||
@@ -675,8 +700,12 @@ public class Chunk implements IChunkAccess {
|
@@ -380,8 +410,12 @@ public class Chunk implements IChunkAccess {
|
||||||
if (i >= this.entitySlices.length) {
|
if (i >= this.entitySlices.length) {
|
||||||
i = this.entitySlices.length - 1;
|
i = this.entitySlices.length - 1;
|
||||||
}
|
}
|
||||||
|
@ -90,21 +91,21 @@ index 417c015e56..95a51ab745 100644
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean c(BlockPosition blockposition) {
|
@Override
|
||||||
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 d9c9748cec..bdb4ca7643 100644
|
index d636965800..e2b37ed1a0 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
|
||||||
@@ -132,7 +132,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -131,7 +131,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
private static final DataWatcherObject<Boolean> aF = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||||
private static final DataWatcherObject<Boolean> aG = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||||
private static final DataWatcherObject<Boolean> aH = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
protected static final DataWatcherObject<EntityPose> X = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
|
||||||
- public boolean inChunk;
|
- public boolean inChunk;
|
||||||
+ public boolean inChunk; public boolean isAddedToChunk() { return inChunk; } // Paper - OBFHELPER
|
+ public boolean inChunk; public boolean isAddedToChunk() { return inChunk; } // Paper - OBFHELPER
|
||||||
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
||||||
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
||||||
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
||||||
@@ -1776,6 +1776,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1665,6 +1665,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@ -145,10 +146,10 @@ index d9c9748cec..bdb4ca7643 100644
|
||||||
private String entityKeyString;
|
private String entityKeyString;
|
||||||
|
|
||||||
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 7390061bf0..c69209497b 100644
|
index 319be67501..12f359a6ba 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
|
||||||
@@ -41,6 +41,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
@@ -42,6 +42,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||||
getMinecraftKey(); // Try to load if it doesn't exists.
|
getMinecraftKey(); // Try to load if it doesn't exists.
|
||||||
return tileEntityKeyString;
|
return tileEntityKeyString;
|
||||||
}
|
}
|
||||||
|
@ -165,18 +166,26 @@ index 7390061bf0..c69209497b 100644
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
index 9cdd0331f4..7edbbb106b 100644
|
index ee34d42160..c1ad2626a7 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||||
@@ -9,6 +9,7 @@ import java.util.UUID;
|
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
|
||||||
|
import java.util.List;
|
||||||
import net.minecraft.server.*;
|
import java.util.Set;
|
||||||
|
import java.util.UUID;
|
||||||
+import org.bukkit.Chunk;
|
+<<<<<<< HEAD
|
||||||
|
import net.minecraft.server.AxisAlignedBB;
|
||||||
|
import net.minecraft.server.BlockPosition;
|
||||||
|
import net.minecraft.server.DamageSource;
|
||||||
|
@@ -137,6 +138,7 @@ import net.minecraft.server.EntityZombieVillager;
|
||||||
|
import net.minecraft.server.EnumChatFormat;
|
||||||
|
import net.minecraft.server.IChatBaseComponent;
|
||||||
|
import net.minecraft.server.NBTTagCompound;
|
||||||
|
+import org.bukkit.Chunk; // Paper
|
||||||
import org.bukkit.EntityEffect;
|
import org.bukkit.EntityEffect;
|
||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Server;
|
import org.bukkit.Server;
|
||||||
@@ -44,6 +45,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@@ -173,6 +175,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 9e8dc233b5846b4e81ae4964ddb0a48a75b64c23 Mon Sep 17 00:00:00 2001
|
From 2976aeb8835db3b9c38ccc891e1b011dca486d42 Mon Sep 17 00:00:00 2001
|
||||||
From: Aikar <aikar@aikar.co>
|
From: Aikar <aikar@aikar.co>
|
||||||
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
||||||
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||||
Opens door for future patches to optimize performance
|
Opens door for future patches to optimize performance
|
||||||
|
|
||||||
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 95a51ab745..554fbeb071 100644
|
index 7fa141f52c..2b29fe837b 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
|
||||||
@@ -67,15 +67,19 @@ public class Chunk implements IChunkAccess {
|
@@ -62,15 +62,19 @@ public class Chunk implements IChunkAccess {
|
||||||
private int neighbors = 0x1 << 12;
|
private int neighbors = 0x1 << 12;
|
||||||
public long chunkKey;
|
public long chunkKey;
|
||||||
// Paper start
|
// Paper start
|
||||||
|
@ -29,7 +29,7 @@ index 95a51ab745..554fbeb071 100644
|
||||||
}
|
}
|
||||||
return replaced;
|
return replaced;
|
||||||
}
|
}
|
||||||
@@ -85,6 +89,7 @@ public class Chunk implements IChunkAccess {
|
@@ -80,6 +84,7 @@ public class Chunk implements IChunkAccess {
|
||||||
TileEntity removed = super.remove(key);
|
TileEntity removed = super.remove(key);
|
||||||
if (removed != null) {
|
if (removed != null) {
|
||||||
removed.setCurrentChunk(null);
|
removed.setCurrentChunk(null);
|
||||||
|
@ -37,15 +37,15 @@ index 95a51ab745..554fbeb071 100644
|
||||||
}
|
}
|
||||||
return removed;
|
return removed;
|
||||||
}
|
}
|
||||||
@@ -675,6 +680,7 @@ public class Chunk implements IChunkAccess {
|
@@ -384,6 +389,7 @@ public class Chunk implements IChunkAccess {
|
||||||
k = this.entitySlices.length - 1;
|
k = this.entitySlices.length - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
+ if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper
|
+ if (!entity.inChunk || entity.getCurrentChunk() != this) entityCounts.increment(entity.getMinecraftKeyString()); // Paper
|
||||||
entity.inChunk = true;
|
entity.inChunk = true;
|
||||||
entity.setCurrentChunk(this); // Paper
|
entity.setCurrentChunk(this); // Paper
|
||||||
entity.chunkX = this.locX;
|
entity.chunkX = this.loc.x;
|
||||||
@@ -705,6 +711,7 @@ public class Chunk implements IChunkAccess {
|
@@ -415,6 +421,7 @@ public class Chunk implements IChunkAccess {
|
||||||
if (!this.entitySlices[i].remove(entity)) {
|
if (!this.entitySlices[i].remove(entity)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
||||||
From 77786f5eecb8349c36a8926fa9f13a230c4594ec Mon Sep 17 00:00:00 2001
|
From 662d7a5246e03de6fe1d4cd0a5d59943e103859a 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:02:51 -0600
|
Date: Tue, 1 Mar 2016 13:02:51 -0600
|
||||||
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
||||||
|
@ -23,10 +23,10 @@ index a738657394..098bd3fba8 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
index 625b9a049f..b6806d8db3 100644
|
index a26e794124..29f9ff6c18 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||||
@@ -29,7 +29,7 @@ public class BlockCactus extends Block {
|
@@ -30,7 +30,7 @@ public class BlockCactus extends Block {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,10 +36,10 @@ index 625b9a049f..b6806d8db3 100644
|
||||||
|
|
||||||
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||||
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
index fad1a0a83c..c7017c58e7 100644
|
index 4d5f485f0f..ff674a9d5b 100644
|
||||||
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
||||||
@@ -25,7 +25,7 @@ public class BlockReed extends Block {
|
@@ -29,7 +29,7 @@ public class BlockReed extends Block {
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From c5b2c65f35f14d8c0bfee7cf4b6d98ed4eff89b2 Mon Sep 17 00:00:00 2001
|
From 5ca07131699fd9580f9c2c4fb0a39186c2f221c7 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:09:16 -0600
|
Date: Tue, 1 Mar 2016 13:09:16 -0600
|
||||||
Subject: [PATCH] Configurable baby zombie movement speed
|
Subject: [PATCH] Configurable baby zombie movement speed
|
||||||
|
@ -20,26 +20,26 @@ index 098bd3fba8..55d8e74f82 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
index e3d52e7cf7..002be7f7be 100644
|
index 21df3ef2c3..d9d9938602 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||||
@@ -18,7 +18,7 @@ public class EntityZombie extends EntityMonster {
|
@@ -19,7 +19,7 @@ public class EntityZombie extends EntityMonster {
|
||||||
|
|
||||||
protected static final IAttribute c = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
protected static final IAttribute d = (new AttributeRanged((IAttribute) null, "zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).a("Spawn Reinforcements Chance");
|
||||||
private static final UUID a = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||||
- private static final AttributeModifier b = new AttributeModifier(EntityZombie.a, "Baby speed boost", 0.5D, 1);
|
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE);
|
||||||
+ private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.a, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, 1); // Paper - Remove static - Make baby speed configurable
|
+ private final AttributeModifier babyModifier = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementSpeed, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier = c;// Paper - Remove static - Make baby speed configurable
|
||||||
private static final DataWatcherObject<Boolean> bC = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||||
private static final DataWatcherObject<Integer> bD = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
private static final DataWatcherObject<Integer> bA = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||||
private static final DataWatcherObject<Boolean> bE = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||||
@@ -129,9 +129,9 @@ public class EntityZombie extends EntityMonster {
|
@@ -127,9 +127,9 @@ public class EntityZombie extends EntityMonster {
|
||||||
if (this.world != null && !this.world.isClientSide) {
|
if (this.world != null && !this.world.isClientSide) {
|
||||||
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
AttributeInstance attributeinstance = this.getAttributeInstance(GenericAttributes.MOVEMENT_SPEED);
|
||||||
|
|
||||||
- attributeinstance.c(EntityZombie.b);
|
- attributeinstance.c(EntityZombie.c);
|
||||||
+ attributeinstance.c(this.babyModifier); // Paper
|
+ attributeinstance.c(this.babyModifier); // Paper
|
||||||
if (flag) {
|
if (flag) {
|
||||||
- attributeinstance.b(EntityZombie.b);
|
- attributeinstance.b(EntityZombie.c);
|
||||||
+ attributeinstance.b(this.babyModifier); // Paper
|
+ attributeinstance.b(this.babyModifier); // Paper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 3c9cc110ddcacd96a032d910e15dbcaff3d43473 Mon Sep 17 00:00:00 2001
|
From 9fe272a81b0d394b409499ce747d5add6da430ca 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:14:11 -0600
|
Date: Tue, 1 Mar 2016 13:14:11 -0600
|
||||||
Subject: [PATCH] Configurable fishing time ranges
|
Subject: [PATCH] Configurable fishing time ranges
|
||||||
|
@ -22,17 +22,17 @@ index 55d8e74f82..a55163a458 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
index 39499f0743..118b974d76 100644
|
index 366356a921..b082d0a820 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||||
@@ -386,8 +386,9 @@ public class EntityFishingHook extends Entity {
|
@@ -329,8 +329,9 @@ public class EntityFishingHook extends Entity {
|
||||||
this.aw = MathHelper.nextInt(this.random, 20, 80);
|
this.at = MathHelper.nextInt(this.random, 20, 80);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
- this.h = MathHelper.nextInt(this.random, 100, 600);
|
- this.as = MathHelper.nextInt(this.random, 100, 600);
|
||||||
+ this.h = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
+ this.as = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||||
this.h -= this.aA * 20 * 5;
|
this.as -= this.ax * 20 * 5;
|
||||||
+ this.h = Math.max(0, this.h); // Paper - Don't allow negative values
|
+ this.as = Math.max(0, this.as); // Paper - Don't allow negative values
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 52b62639d8961610094976f5c68b9d3caf0bda60 Mon Sep 17 00:00:00 2001
|
From 4fe17ed34ff3c43917ab28bcfea9060d23bf3271 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
|
||||||
|
@ -19,7 +19,7 @@ index a55163a458..341038fc4d 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/ControllerJump.java b/src/main/java/net/minecraft/server/ControllerJump.java
|
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 2e869004c8..8a6856e0fd 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 {
|
@@ -13,6 +13,7 @@ public class ControllerJump {
|
||||||
|
@ -28,21 +28,21 @@ index 4ed5192c65..489beed269 100644
|
||||||
|
|
||||||
+ public void jumpIfSet() { this.b(); } // Paper - OBFHELPER
|
+ public void jumpIfSet() { this.b(); } // Paper - OBFHELPER
|
||||||
public void b() {
|
public void b() {
|
||||||
this.b.o(this.a);
|
this.b.setJumping(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 1a3517aeed..2bfd5fe2d8 100644
|
index afa03ce6f2..d49047abc1 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
|
||||||
@@ -33,6 +33,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -31,6 +31,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
private final EntityAIBodyControl b;
|
private final EntityAIBodyControl c;
|
||||||
protected NavigationAbstract navigation;
|
protected NavigationAbstract navigation;
|
||||||
public PathfinderGoalSelector goalSelector;
|
public PathfinderGoalSelector goalSelector;
|
||||||
+ @Nullable public PathfinderGoalFloat goalFloat; // Paper
|
+ @Nullable public PathfinderGoalFloat goalFloat; // Paper
|
||||||
public PathfinderGoalSelector targetSelector;
|
public PathfinderGoalSelector targetSelector;
|
||||||
private EntityLiving goalTarget;
|
private EntityLiving goalTarget;
|
||||||
private final EntitySenses bC;
|
private final EntitySenses bz;
|
||||||
@@ -647,6 +648,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -640,6 +641,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
// Spigot Start
|
// Spigot Start
|
||||||
if ( this.fromMobSpawner )
|
if ( this.fromMobSpawner )
|
||||||
{
|
{
|
||||||
|
@ -56,27 +56,25 @@ index 1a3517aeed..2bfd5fe2d8 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 040a64471f..2dfa5a7b40 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 {
|
@@ -8,6 +8,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||||
|
|
||||||
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
public PathfinderGoalFloat(EntityInsentient entityinsentient) {
|
||||||
this.a = entityinsentient;
|
this.a = entityinsentient;
|
||||||
+ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
|
+ if (entityinsentient.getWorld().paperConfig.nerfedMobsShouldJump) entityinsentient.goalFloat = this; // Paper
|
||||||
this.a(4);
|
this.a(EnumSet.of(PathfinderGoal.Type.JUMP));
|
||||||
entityinsentient.getNavigation().d(true);
|
entityinsentient.getNavigation().d(true);
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +20,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||||
+ public boolean validConditions() { return this.a(); } // Paper - OBFHELPER
|
return this.a.isInWater() && this.a.ce() > d0 || this.a.aC();
|
||||||
public boolean a() {
|
|
||||||
return this.a.isInWater() && this.a.bY() > 0.4D || this.a.ax();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
+ public void update() { this.e(); } // Paper - OBFHELPER
|
+ public void update() { this.e(); } // Paper - OBFHELPER
|
||||||
|
@Override
|
||||||
public void e() {
|
public void e() {
|
||||||
if (this.a.getRandom().nextFloat() < 0.8F) {
|
if (this.a.getRandom().nextFloat() < 0.8F) {
|
||||||
this.a.getControllerJump().a();
|
|
||||||
--
|
--
|
||||||
2.21.0
|
2.21.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 8f3d832ee04d29536a8b70ff9c830a9f573a7112 Mon Sep 17 00:00:00 2001
|
From 224c6085a743293e4c7c8f99d4d13e93a81a7f30 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
|
||||||
|
@ -30,26 +30,23 @@ index 341038fc4d..3e1f4be10f 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 2bfd5fe2d8..80d872e797 100644
|
index d49047abc1..265e734af2 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
|
||||||
@@ -626,13 +626,13 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -616,11 +616,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
double d2 = entityhuman.locZ - this.locZ;
|
if (entityhuman != null) {
|
||||||
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
|
double d0 = entityhuman.h(this);
|
||||||
|
|
||||||
- if (d3 > 16384.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
- if (d0 > 16384.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||||
+ if (d3 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
+ if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||||
this.die();
|
this.die();
|
||||||
}
|
}
|
||||||
|
|
||||||
- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d3 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
- if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > 1024.0D) { // CraftBukkit - remove isTypeNotPersistent() check
|
||||||
+ if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d3 > world.paperConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
+ if (this.ticksFarFromPlayer > 600 && this.random.nextInt(800) == 0 && d0 > world.paperConfig.softDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||||
this.die();
|
this.die();
|
||||||
- } else if (d3 < 1024.0D) {
|
} else if (d0 < 1024.0D) {
|
||||||
+ } else if (d3 < world.paperConfig.softDespawnDistance) { // Paper - custom despawn distances
|
|
||||||
this.ticksFarFromPlayer = 0;
|
this.ticksFarFromPlayer = 0;
|
||||||
}
|
|
||||||
}
|
|
||||||
--
|
--
|
||||||
2.21.0
|
2.21.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From d8c63a9b9619e7934ca20c09f63909e16f6fa012 Mon Sep 17 00:00:00 2001
|
From 0b044b5e02fe8181fd259c98ce1fefd8870f7c30 Mon Sep 17 00:00:00 2001
|
||||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||||
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
||||||
Subject: [PATCH] Allow for toggling of spawn chunks
|
Subject: [PATCH] Allow for toggling of spawn chunks
|
||||||
|
@ -20,15 +20,15 @@ index 3e1f4be10f..3f734327c0 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 ad792af2bc..f24ee385cd 100644
|
index eabcab0244..446f864420 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
|
||||||
@@ -201,6 +201,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
@@ -152,6 +152,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||||
this.getServer().addWorld(this.world);
|
});
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||||
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
+ this.keepSpawnInMemory = this.paperConfig.keepSpawnInMemory; // Paper
|
||||||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||||
}
|
}
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 7b97269d9fb6b8c56c684946f4f85a3fe07d8b6f Mon Sep 17 00:00:00 2001
|
From 658e764bcd49c33fd09b0bcf5cc42014f7599b19 Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 14:14:15 -0600
|
Date: Tue, 1 Mar 2016 14:14:15 -0600
|
||||||
Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
||||||
|
@ -24,10 +24,10 @@ index 3f734327c0..1ed58f4bba 100644
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
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 131946154e..2198182ec9 100644
|
index 2d07bfa879..7191861e81 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
|
||||||
@@ -1879,6 +1879,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
@@ -1770,6 +1770,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||||
return this.a(itemstack, 0.0F);
|
return this.a(itemstack, 0.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,45 +36,39 @@ index 131946154e..2198182ec9 100644
|
||||||
public EntityItem a(ItemStack itemstack, float f) {
|
public EntityItem a(ItemStack itemstack, float f) {
|
||||||
if (itemstack.isEmpty()) {
|
if (itemstack.isEmpty()) {
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
index 4e4c8cc501..a6eae266de 100644
|
index c9c903367f..55591fbe05 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||||
@@ -86,6 +86,17 @@ public class EntityFallingBlock extends Entity {
|
@@ -105,11 +105,13 @@ public class EntityFallingBlock extends Entity {
|
||||||
}
|
|
||||||
|
|
||||||
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
|
if (!this.onGround && !flag1) {
|
||||||
+
|
if (!this.world.isClientSide && (this.ticksLived > 100 && (blockposition.getY() < 1 || blockposition.getY() > 256) || this.ticksLived > 600)) {
|
||||||
+ // Paper start - Configurable EntityFallingBlock height nerf
|
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) { // Paper - Configurable EntityFallingBlock height nerf
|
||||||
+ if (this.world.paperConfig.fallingBlockHeightNerf != 0 && this.locY > this.world.paperConfig.fallingBlockHeightNerf) {
|
if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
|
||||||
+ if (this.dropItem && this.world.getGameRules().getBoolean("doEntityDrops")) {
|
this.a((IMaterial) block);
|
||||||
+ this.dropItem(new ItemStack(block), 0.0F);
|
}
|
||||||
+ }
|
|
||||||
+
|
this.die();
|
||||||
+ this.die();
|
+ } // Paper
|
||||||
+ }
|
}
|
||||||
+ // Paper end
|
} else {
|
||||||
+
|
IBlockData iblockdata = this.world.getType(blockposition);
|
||||||
if (!this.world.isClientSide) {
|
|
||||||
blockposition = new BlockPosition(this);
|
|
||||||
boolean flag = this.block.getBlock() instanceof BlockConcretePowder;
|
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
index e3a03782c8..8c19278f37 100644
|
index ba86a07344..e3001570f9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||||
@@ -57,6 +57,13 @@ public class EntityTNTPrimed extends Entity {
|
@@ -57,6 +57,11 @@ public class EntityTNTPrimed extends Entity {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.move(EnumMoveType.SELF, this.motX, this.motY, this.motZ);
|
this.move(EnumMoveType.SELF, this.getMot());
|
||||||
+
|
|
||||||
+ // Paper start - Configurable TNT entity height nerf
|
+ // Paper start - Configurable TNT entity height nerf
|
||||||
+ if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY > this.world.paperConfig.entityTNTHeightNerf) {
|
+ if (this.world.paperConfig.entityTNTHeightNerf != 0 && this.locY > this.world.paperConfig.entityTNTHeightNerf) {
|
||||||
+ this.die();
|
+ this.die();
|
||||||
+ }
|
+ }
|
||||||
+ // Paper end
|
+ // Paper end
|
||||||
+
|
this.setMot(this.getMot().a(0.98D));
|
||||||
this.motX *= 0.9800000190734863D;
|
if (this.onGround) {
|
||||||
this.motY *= 0.9800000190734863D;
|
this.setMot(this.getMot().d(0.7D, -0.5D, 0.7D));
|
||||||
this.motZ *= 0.9800000190734863D;
|
|
||||||
--
|
--
|
||||||
2.21.0
|
2.21.0
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
From 39a20240b9b506f4bba726d5504af0c03588988d Mon Sep 17 00:00:00 2001
|
From d054764b7c89587e26af504433d4ce408277a3be 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,23 +6,23 @@ 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..e13e17bdd2 100644
|
index d05fee962a..61c02c530b 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,7 +52,7 @@ public class EULA {
|
@@ -70,7 +70,7 @@ public class EULA {
|
||||||
|
Properties properties = new Properties();
|
||||||
|
|
||||||
fileoutputstream = new FileOutputStream(this.b);
|
properties.setProperty("eula", "false");
|
||||||
properties.setProperty("eula", "false");
|
- properties.store(outputstream, "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(outputstream, "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 (Throwable throwable1) {
|
||||||
} catch (Exception exception) {
|
throwable = throwable1;
|
||||||
EULA.a.warn("Failed to save {}", this.b, exception);
|
throw throwable1;
|
||||||
} finally {
|
|
||||||
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 7e89d7158b..df85f35f37 100644
|
index 7b102e155d..89ad19e59c 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
|
||||||
@@ -1209,7 +1209,7 @@ public abstract class MinecraftServer implements IAsyncTaskHandler, IMojangStati
|
@@ -1264,7 +1264,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getServerModName() {
|
public String getServerModName() {
|
||||||
|
@ -32,11 +32,11 @@ index 7e89d7158b..df85f35f37 100644
|
||||||
|
|
||||||
public CrashReport b(CrashReport crashreport) {
|
public CrashReport b(CrashReport crashreport) {
|
||||||
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 fea49800d8..351313d98c 100644
|
index 95d0075d57..a750d8ab5b 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
|
||||||
@@ -164,7 +164,7 @@ import org.bukkit.event.server.TabCompleteEvent;
|
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||||
import net.md_5.bungee.api.chat.BaseComponent;
|
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||||
|
|
||||||
public final class CraftServer implements Server {
|
public final class CraftServer implements Server {
|
||||||
- private final String serverName = "CraftBukkit";
|
- private final String serverName = "CraftBukkit";
|
||||||
|
@ -45,10 +45,10 @@ index fea49800d8..351313d98c 100644
|
||||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||||
private final Logger logger = Logger.getLogger("Minecraft");
|
private final Logger logger = Logger.getLogger("Minecraft");
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
index 3e7024780b..c85a9bfb91 100644
|
index e34abd0c1f..74dd85fac8 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||||
@@ -200,12 +200,25 @@ public class Main {
|
@@ -199,12 +199,25 @@ public class Main {
|
||||||
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
deadline.add(Calendar.DAY_OF_YEAR, -21);
|
||||||
if (buildDate.before(deadline.getTime())) {
|
if (buildDate.before(deadline.getTime())) {
|
||||||
System.err.println("*** Error, this build is outdated ***");
|
System.err.println("*** Error, this build is outdated ***");
|
||||||
|
@ -76,7 +76,7 @@ index 3e7024780b..c85a9bfb91 100644
|
||||||
MinecraftServer.main(options);
|
MinecraftServer.main(options);
|
||||||
} catch (Throwable t) {
|
} catch (Throwable t) {
|
||||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
index 9511f247a6..8e32c4e2cd 100644
|
index 27297204f1..70b187190f 100644
|
||||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||||
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
|
@@ -19,7 +19,7 @@ public class WatchdogThread extends Thread
|
||||||
|
@ -111,8 +111,8 @@ index 9511f247a6..8e32c4e2cd 100644
|
||||||
//
|
//
|
||||||
log.log( Level.SEVERE, "------------------------------" );
|
log.log( Level.SEVERE, "------------------------------" );
|
||||||
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
|
- log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Spigot!):" );
|
||||||
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" );
|
+ log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
|
||||||
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().primaryThread.getId(), Integer.MAX_VALUE ), log );
|
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||||
log.log( Level.SEVERE, "------------------------------" );
|
log.log( Level.SEVERE, "------------------------------" );
|
||||||
//
|
//
|
||||||
--
|
--
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
From dd41359854bea49f22cccaea44e75262062369f2 Mon Sep 17 00:00:00 2001
|
From 20708be3fdc6f6bb1b11884a04087c6499756984 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 050f21efa5..58e037e13b 100644
|
index 07401b4d9b..20460ad98a 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
|
||||||
@@ -68,6 +68,9 @@ public abstract class EntityHuman extends EntityLiving {
|
@@ -70,6 +70,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||||
private final ItemCooldown ce;
|
private final ItemCooldown bY;
|
||||||
@Nullable
|
@Nullable
|
||||||
public EntityFishingHook hookedFish;
|
public EntityFishingHook hookedFish;
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -19,70 +19,36 @@ index 050f21efa5..58e037e13b 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 80d872e797..e5322de974 100644
|
index 265e734af2..5d830b245d 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
|
||||||
@@ -620,7 +620,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
@@ -613,7 +613,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||||
} else {
|
if (!this.isPersistent() && !this.I()) {
|
||||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||||
|
|
||||||
- if (entityhuman != null) {
|
- if (entityhuman != null) {
|
||||||
+ if (entityhuman != null && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
+ if (entityhuman != null && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
||||||
double d0 = entityhuman.locX - this.locX;
|
double d0 = entityhuman.h(this);
|
||||||
double d1 = entityhuman.locY - this.locY;
|
|
||||||
double d2 = entityhuman.locZ - this.locZ;
|
if (d0 > world.paperConfig.hardDespawnDistance) { // CraftBukkit - remove isTypeNotPersistent() check // Paper - custom despawn distances
|
||||||
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
diff --git a/src/main/java/net/minecraft/server/EntitySilverfish.java b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||||
index 3c566ebd0e..ba40e03fcc 100644
|
index dbbc34d91b..d823c6b6d9 100644
|
||||||
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
|
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||||
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||||
@@ -96,7 +96,7 @@ public class EntitySilverfish extends EntityMonster {
|
@@ -106,7 +106,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||||
if (super.a(generatoraccess, flag)) {
|
if (super.a(generatoraccess, enummobspawn)) {
|
||||||
EntityHuman entityhuman = generatoraccess.b(this, 5.0D);
|
EntityHuman entityhuman = this.world.a(EntitySilverfish.b, (EntityLiving) this);
|
||||||
|
|
||||||
- return entityhuman == null;
|
- return entityhuman == null;
|
||||||
+ return !(entityhuman != null && !entityhuman.affectsSpawning) && entityhuman == null; // Paper - Affects Spawning API
|
+ return !(entityhuman != null && !entityhuman.affectsSpawning) && entityhuman == null; // Paper - Affects Spawning API
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/net/minecraft/server/SpawnerCreature.java b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
||||||
index 6ca0e19cb9..4eaa5d93b4 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/SpawnerCreature.java
|
|
||||||
@@ -37,7 +37,7 @@ public final class SpawnerCreature {
|
|
||||||
while (iterator.hasNext()) {
|
|
||||||
EntityHuman entityhuman = (EntityHuman) iterator.next();
|
|
||||||
|
|
||||||
- if (!entityhuman.isSpectator()) {
|
|
||||||
+ if (!entityhuman.isSpectator() && entityhuman.affectsSpawning) { // Paper
|
|
||||||
int l = MathHelper.floor(entityhuman.locX / 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
|
|
||||||
index f24ee385cd..106ad00dc7 100644
|
|
||||||
--- a/src/main/java/net/minecraft/server/World.java
|
|
||||||
+++ b/src/main/java/net/minecraft/server/World.java
|
|
||||||
@@ -30,6 +30,7 @@ import org.bukkit.craftbukkit.CraftWorld;
|
|
||||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
|
||||||
import org.bukkit.craftbukkit.block.data.CraftBlockData;
|
|
||||||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
|
||||||
+import org.bukkit.craftbukkit.util.LongHashSet; // Paper
|
|
||||||
import org.bukkit.event.block.BlockPhysicsEvent;
|
|
||||||
import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
|
|
||||||
import org.bukkit.generator.ChunkGenerator;
|
|
||||||
@@ -2389,7 +2390,7 @@ public abstract class World implements IEntityAccess, GeneratorAccess, IIBlockAc
|
|
||||||
for (int i = 0; i < this.players.size(); ++i) {
|
|
||||||
EntityHuman entityhuman = (EntityHuman) this.players.get(i);
|
|
||||||
|
|
||||||
- if (IEntitySelector.f.test(entityhuman)) {
|
|
||||||
+ if (IEntitySelector.f.test(entityhuman) && entityhuman.affectsSpawning) { // Paper - Affects Spawning API
|
|
||||||
double d4 = entityhuman.d(d0, d1, d2);
|
|
||||||
|
|
||||||
if (d3 < 0.0D || d4 < d3 * d3) {
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||||
index 99f99148d6..15c2e1dee7 100644
|
index 25726dd751..ca65d51d81 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
|
||||||
@@ -1613,7 +1613,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@@ -1639,7 +1639,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||||
@Override
|
@Override
|
||||||
public String getLocale() {
|
public String getLocale() {
|
||||||
return getHandle().locale;
|
return getHandle().locale;
|
||||||
|
|
|
@ -1,16 +1,16 @@
|
||||||
From e73aad40de93a92039325077c5df36af6786dd22 Mon Sep 17 00:00:00 2001
|
From fe64055921f76ebcdb8891a74b35ef5c8aa9eccd Mon Sep 17 00:00:00 2001
|
||||||
From: Byteflux <byte@byteflux.net>
|
From: Byteflux <byte@byteflux.net>
|
||||||
Date: Tue, 1 Mar 2016 15:08:03 -0600
|
Date: Tue, 1 Mar 2016 15:08:03 -0600
|
||||||
Subject: [PATCH] Remove invalid mob spawner tile entities
|
Subject: [PATCH] Remove invalid mob spawner tile entities
|
||||||
|
|
||||||
|
|
||||||
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 2b1198ca8f..e15ed21f67 100644
|
index 89bce93c61..3be7f7d297 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
|
||||||
@@ -796,6 +796,10 @@ public class Chunk implements IChunkAccess {
|
@@ -523,6 +523,10 @@ public class Chunk implements IChunkAccess {
|
||||||
tileentity.z();
|
}
|
||||||
this.tileEntities.put(blockposition.h(), tileentity);
|
|
||||||
// CraftBukkit start
|
// CraftBukkit start
|
||||||
+ // Paper start - Remove invalid mob spawner tile entities
|
+ // Paper start - Remove invalid mob spawner tile entities
|
||||||
+ } else if (tileentity instanceof TileEntityMobSpawner && !(getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()).getBlock() instanceof BlockMobSpawner)) {
|
+ } else if (tileentity instanceof TileEntityMobSpawner && !(getBlockData(blockposition.getX(), blockposition.getY(), blockposition.getZ()).getBlock() instanceof BlockMobSpawner)) {
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
From a9d542b68c57c3744614b77947da9e5db95321c3 Mon Sep 17 00:00:00 2001
|
From 902b97c38b3a8621321d4d2e0eaf73efb88b4128 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/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 2b03896e23..c46b761cc5 100644
|
index 271406f8bb..d606e2e4fd 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;
|
||||||
|
@ -17,81 +17,72 @@ index 2b03896e23..c46b761cc5 100644
|
||||||
|
|
||||||
private NonNullList<ItemStack> items;
|
private NonNullList<ItemStack> items;
|
||||||
protected float a;
|
protected float a;
|
||||||
@@ -113,9 +113,15 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
@@ -101,13 +101,19 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||||
|
return nbttagcompound;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
|
public void tick() {
|
||||||
|
int i = this.position.getX();
|
||||||
|
int j = this.position.getY();
|
||||||
int k = this.position.getZ();
|
int k = this.position.getZ();
|
||||||
|
|
||||||
++this.k;
|
++this.j;
|
||||||
+ // Paper start
|
|
||||||
+ }
|
+ }
|
||||||
+ private void doOpenLogic() {
|
+
|
||||||
float f;
|
+ public void doOpenLogic() {
|
||||||
-
|
|
||||||
- if (!this.world.isClientSide && this.f != 0 && (this.k + i + j + k) % 200 == 0) {
|
|
||||||
+ 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();
|
||||||
+ if (false && !this.world.isClientSide && this.f != 0 && (this.k + i + j + k) % 200 == 0) { // Paper - disable block
|
+
|
||||||
+ // Paper end
|
this.viewingCount = a(this.world, this, this.j, i, j, k, this.viewingCount);
|
||||||
this.f = 0;
|
this.b = this.a;
|
||||||
f = 5.0F;
|
float f = 0.1F;
|
||||||
List<EntityHuman> list = this.world.a(EntityHuman.class, new AxisAlignedBB((double) ((float) i - 5.0F), (double) ((float) j - 5.0F), (double) ((float) k - 5.0F), (double) ((float) (i + 1) + 5.0F), (double) ((float) (j + 1) + 5.0F), (double) ((float) (k + 1) + 5.0F)));
|
@@ -115,8 +121,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||||
@@ -134,13 +140,17 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
if (this.viewingCount > 0 && this.a == 0.0F) {
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- this.e = this.a;
|
|
||||||
- f = 0.1F;
|
|
||||||
- if (this.f > 0 && this.a == 0.0F) {
|
|
||||||
+ if (this.f == 1 && this.a == 0.0F) { // check == 1 instead of > 0, first open
|
|
||||||
this.a(SoundEffects.BLOCK_CHEST_OPEN);
|
this.a(SoundEffects.BLOCK_CHEST_OPEN);
|
||||||
}
|
}
|
||||||
+ // Paper start
|
|
||||||
+ }
|
+ }
|
||||||
+ private void doCloseLogic() {
|
|
||||||
+ this.e = this.a;
|
|
||||||
+ // Paper end
|
|
||||||
|
|
||||||
- if (this.f == 0 && this.a > 0.0F || this.f > 0 && this.a < 1.0F) {
|
- if (this.viewingCount == 0 && this.a > 0.0F || this.viewingCount > 0 && this.a < 1.0F) {
|
||||||
+ if (this.f == 0/* && this.a > 0.0F || this.f > 0 && this.a < 1.0F*/) { // Paper disable all but player count check
|
+ public void doCloseLogic() {
|
||||||
+ /* // Paper disable animation stuff
|
+ if (this.viewingCount == 0 /* && this.a > 0.0F || this.viewingCount > 0 && this.a < 1.0F */) { // Paper - disable all but player count check
|
||||||
|
+ /* // Paper - disable animation stuff
|
||||||
float f1 = this.a;
|
float f1 = this.a;
|
||||||
|
|
||||||
if (this.f > 0) {
|
if (this.viewingCount > 0) {
|
||||||
@@ -155,9 +165,14 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
@@ -132,8 +141,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||||
|
|
||||||
float f2 = 0.5F;
|
float f2 = 0.5F;
|
||||||
|
|
||||||
+
|
|
||||||
if (this.a < 0.5F && f1 >= 0.5F) {
|
if (this.a < 0.5F && f1 >= 0.5F) {
|
||||||
- this.a(SoundEffects.BLOCK_CHEST_CLOSE);
|
- this.a(SoundEffects.BLOCK_CHEST_CLOSE);
|
||||||
- }
|
- }
|
||||||
+ */
|
+ */
|
||||||
+ // add some delay
|
+ MCUtil.scheduleTask(10, () -> {
|
||||||
+ MCUtil.scheduleTask(10, () -> {
|
+ this.a(SoundEffects.BLOCK_CHEST_CLOSE);
|
||||||
+ if (this.f == 0) this.a(SoundEffects.BLOCK_CHEST_CLOSE);
|
|
||||||
+ });
|
+ });
|
||||||
+ // } // Paper end
|
+ //} // Paper end
|
||||||
|
|
||||||
if (this.a < 0.0F) {
|
if (this.a < 0.0F) {
|
||||||
this.a = 0.0F;
|
this.a = 0.0F;
|
||||||
@@ -203,6 +218,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
@@ -210,6 +222,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||||
|
|
||||||
++this.f;
|
++this.viewingCount;
|
||||||
if (this.world == null) return; // CraftBukkit
|
if (this.world == null) return; // CraftBukkit
|
||||||
+ doOpenLogic(); // Paper
|
+ doOpenLogic(); // Paper
|
||||||
|
|
||||||
// CraftBukkit start - Call redstone event
|
// CraftBukkit start - Call redstone event
|
||||||
if (this.getBlock() == Blocks.TRAPPED_CHEST) {
|
if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) {
|
||||||
@@ -224,6 +240,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
@@ -232,6 +245,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||||
--this.f;
|
--this.viewingCount;
|
||||||
|
|
||||||
// CraftBukkit start - Call redstone event
|
// CraftBukkit start - Call redstone event
|
||||||
+ doCloseLogic(); // Paper
|
+ doCloseLogic(); // Paper
|
||||||
if (this.getBlock() == Blocks.TRAPPED_CHEST) {
|
if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) {
|
||||||
int newPower = Math.max(0, Math.min(15, this.f));
|
int newPower = Math.max(0, Math.min(15, this.viewingCount));
|
||||||
|
|
||||||
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 ee19595d33..f2df6f3950 100644
|
index 6908f50031..ed5cdf177f 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 @@
|
||||||
|
@ -101,57 +92,63 @@ index ee19595d33..f2df6f3950 100644
|
||||||
+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 b;
|
||||||
@@ -17,19 +17,37 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
@@ -11,18 +11,28 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
|
super(TileEntityTypes.ENDER_CHEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
- @Override
|
||||||
|
public void tick() {
|
||||||
|
if (++this.g % 20 * 4 == 0) {
|
||||||
|
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.c);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.e = this.a;
|
this.b = this.a;
|
||||||
+ // Paper start
|
+ /* // Paper
|
||||||
+ /*
|
|
||||||
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 f = 0.1F;
|
||||||
double d0;
|
double d0;
|
||||||
|
|
||||||
+ */
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
+ */
|
||||||
+ }
|
+ }
|
||||||
|
+
|
||||||
+ private void doOpenLogic() {
|
+ private void doOpenLogic() {
|
||||||
+ 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) {
|
|
||||||
double d1 = (double) i + 0.5D;
|
|
||||||
|
|
||||||
- d0 = (double) k + 0.5D;
|
if (this.c > 0 && this.a == 0.0F) {
|
||||||
+ double d0 = (double) k + 0.5D; // Paper
|
double d1 = (double) i + 0.5D;
|
||||||
|
@@ -30,7 +40,15 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
|
d0 = (double) k + 0.5D;
|
||||||
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);
|
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
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
+ private void doCloseLogic() {
|
+ private void doCloseLogic() {
|
||||||
+ 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();
|
||||||
+ this.e = this.a;
|
|
||||||
+ 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.c == 0 && this.a > 0.0F || this.c > 0 && this.a < 1.0F) {
|
||||||
float f1 = this.a;
|
float f1 = this.a;
|
||||||
|
|
||||||
@@ -76,11 +94,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
@@ -79,11 +97,13 @@ public class TileEntityEnderChest extends TileEntity implements ITickable {
|
||||||
public void c() {
|
public void c() {
|
||||||
++this.f;
|
++this.c;
|
||||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
|
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.c);
|
||||||
+ doOpenLogic(); // Paper
|
+ doOpenLogic(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
public void d() {
|
public void d() {
|
||||||
--this.f;
|
--this.c;
|
||||||
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.f);
|
this.world.playBlockAction(this.position, Blocks.ENDER_CHEST, 1, this.c);
|
||||||
+ doCloseLogic(); // Paper
|
+ doCloseLogic(); // Paper
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,6 @@ done
|
||||||
# import FileName
|
# import FileName
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
########################################################
|
########################################################
|
||||||
########################################################
|
########################################################
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 263f706c2b25d4a2c0970bbb2bf99112947bc15e
|
Subproject commit 3735f9d0ad8295565d59db84f49446589f580da0
|
|
@ -1 +1 @@
|
||||||
Subproject commit 48c4c5ca8133cead0e849c546cf7e0865300c94d
|
Subproject commit 364b6fbb73176d276a110f4ce4217979ad7ee6a4
|
|
@ -1 +1 @@
|
||||||
Subproject commit 3e47a77bbf13823cba635bfc6b643f3816ae5347
|
Subproject commit 6dbf995f13ca29e311d686e963973905388a29b3
|
Loading…
Reference in New Issue