mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-11 12:31:34 +01:00
Work on server patches
This commit is contained in:
parent
76169471d8
commit
a308619d28
42 changed files with 565 additions and 578 deletions
|
@ -1,11 +1,11 @@
|
|||
From 566af2ba410dc0dfd23c752b3f94cc20a39fc736 Mon Sep 17 00:00:00 2001
|
||||
From 339971bbe80a3c79b0221846d5714fae8f6c501a Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 20:40:33 -0600
|
||||
Subject: [PATCH] POM Changes
|
||||
|
||||
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
index 0f8bccd430..04b0dd9a7f 100644
|
||||
index 5243c0321..ae1de6d01 100644
|
||||
--- a/pom.xml
|
||||
+++ b/pom.xml
|
||||
@@ -1,15 +1,14 @@
|
||||
|
@ -16,7 +16,7 @@ index 0f8bccd430..04b0dd9a7f 100644
|
|||
- <artifactId>spigot</artifactId>
|
||||
+ <artifactId>paper</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<version>1.15-R0.1-SNAPSHOT</version>
|
||||
- <name>Spigot</name>
|
||||
- <url>https://www.spigotmc.org/</url>
|
||||
+ <name>Paper</name>
|
||||
|
@ -27,7 +27,7 @@ index 0f8bccd430..04b0dd9a7f 100644
|
|||
+ <!-- <skipTests>true</skipTests> Paper - This [was] not going to end well -->
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<api.version>unknown</api.version>
|
||||
<minecraft.version>1.14.4</minecraft.version>
|
||||
<minecraft.version>1.15</minecraft.version>
|
||||
@@ -22,16 +21,16 @@
|
||||
</properties>
|
||||
|
||||
|
@ -137,7 +137,7 @@ index 0f8bccd430..04b0dd9a7f 100644
|
|||
@@ -248,10 +239,6 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>3.8.0</version>
|
||||
<version>3.8.1</version>
|
||||
- <configuration>
|
||||
- <!-- we use the Eclipse compiler as it doesn't need a JDK -->
|
||||
- <compilerId>eclipse</compilerId>
|
||||
|
@ -146,7 +146,7 @@ index 0f8bccd430..04b0dd9a7f 100644
|
|||
<!-- we need our custom version as it fixes some bugs on case sensitive file systems -->
|
||||
<dependency>
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
index 93046379d0..674096cab1 100644
|
||||
index 93046379d..674096cab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
|
||||
@@ -11,7 +11,7 @@ public final class Versioning {
|
||||
|
@ -159,5 +159,5 @@ index 93046379d0..674096cab1 100644
|
|||
|
||||
if (stream != null) {
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From b8b5130d21334908044a4cbe6b6ba3302e1148a4 Mon Sep 17 00:00:00 2001
|
||||
From fad26d57c0fefc74ad043ec41828108d93bfe7bb Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Mon, 29 Feb 2016 21:02:09 -0600
|
||||
Subject: [PATCH] Paper config files
|
||||
|
@ -521,7 +521,7 @@ index 000000000..a73865739
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index e02e00300..e6cf90484 100644
|
||||
index e3a830064..20ed423fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -162,6 +162,15 @@ public class DedicatedServer extends MinecraftServer implements IMinecraftServer
|
||||
|
@ -541,10 +541,10 @@ index e02e00300..e6cf90484 100644
|
|||
this.setSpawnAnimals(dedicatedserverproperties.spawnAnimals);
|
||||
this.setSpawnNPCs(dedicatedserverproperties.spawnNpcs);
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 9eea61fc2..d4dff9158 100644
|
||||
index 5c495688e..da19b682a 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -134,9 +134,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
@@ -135,9 +135,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
|
||||
public boolean inChunk;
|
||||
|
@ -554,11 +554,11 @@ index 9eea61fc2..d4dff9158 100644
|
|||
+ public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
||||
+ public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
||||
+ public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
||||
public boolean af;
|
||||
public boolean impulse;
|
||||
public int portalCooldown;
|
||||
public long Z;
|
||||
public long aa;
|
||||
public long ab;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index e34ef4531..43d207ae5 100644
|
||||
index c1e050426..cf9612d17 100644
|
||||
--- a/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;
|
||||
|
@ -569,7 +569,7 @@ index e34ef4531..43d207ae5 100644
|
|||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
@@ -434,4 +435,10 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -435,4 +436,10 @@ public class EntityTypes<T extends Entity> {
|
||||
return new EntityTypes<>(this.a, this.b, this.c, this.d, this.e, this.f, this.g);
|
||||
}
|
||||
}
|
||||
|
@ -581,10 +581,10 @@ index e34ef4531..43d207ae5 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index be1815d40..ce476a204 100644
|
||||
index 5edbdebf3..602a395b3 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -86,6 +86,8 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -85,6 +85,8 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public boolean populating;
|
||||
public final org.spigotmc.SpigotWorldConfig spigotConfig; // Spigot
|
||||
|
||||
|
@ -593,7 +593,7 @@ index be1815d40..ce476a204 100644
|
|||
public final SpigotTimings.WorldTimingsHandler timings; // Spigot
|
||||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
@@ -106,6 +108,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -105,6 +107,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
protected World(WorldData worlddata, DimensionManager dimensionmanager, BiFunction<World, WorldProvider, IChunkProvider> bifunction, GameProfilerFiller gameprofilerfiller, boolean flag, org.bukkit.generator.ChunkGenerator gen, org.bukkit.World.Environment env) {
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig( worlddata.getName() ); // Spigot
|
||||
|
@ -602,10 +602,10 @@ index be1815d40..ce476a204 100644
|
|||
this.world = new CraftWorld((WorldServer) this, gen, env);
|
||||
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
|
||||
index 305b6eaa9..dce5bde54 100644
|
||||
index 465af5fb6..a72238a9d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -756,6 +756,7 @@ public final class CraftServer implements Server {
|
||||
@@ -757,6 +757,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
|
||||
|
@ -613,7 +613,7 @@ index 305b6eaa9..dce5bde54 100644
|
|||
for (WorldServer world : console.getWorlds()) {
|
||||
world.worldData.setDifficulty(config.difficulty);
|
||||
world.setSpawnFlags(config.spawnMonsters, config.spawnAnimals);
|
||||
@@ -771,6 +772,7 @@ public final class CraftServer implements Server {
|
||||
@@ -772,6 +773,7 @@ public final class CraftServer implements Server {
|
||||
world.ticksPerMonsterSpawns = this.getTicksPerMonsterSpawns();
|
||||
}
|
||||
world.spigotConfig.init(); // Spigot
|
||||
|
@ -621,7 +621,7 @@ index 305b6eaa9..dce5bde54 100644
|
|||
}
|
||||
|
||||
pluginManager.clearPlugins();
|
||||
@@ -778,6 +780,7 @@ public final class CraftServer implements Server {
|
||||
@@ -779,6 +781,7 @@ public final class CraftServer implements Server {
|
||||
resetRecipes();
|
||||
reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
|
@ -629,7 +629,7 @@ index 305b6eaa9..dce5bde54 100644
|
|||
overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -1959,4 +1962,35 @@ public final class CraftServer implements Server {
|
||||
@@ -1962,4 +1965,35 @@ public final class CraftServer implements Server {
|
||||
{
|
||||
return spigot;
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ index 305b6eaa9..dce5bde54 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index e2aade101..5fe81e42a 100644
|
||||
index 6c2373569..a668bc4e8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -128,6 +128,14 @@ public class Main {
|
||||
|
@ -732,5 +732,5 @@ index 6ae3b3185..8c7dd0133 100644
|
|||
config.addDefault( "world-settings.default." + path, def );
|
||||
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From f2d34c86bd53eb3e3340d7c5a568f9f28263f330 Mon Sep 17 00:00:00 2001
|
||||
From 34ff43f4623f7d96bedfae635ad4d12a2d6dee76 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 30 Mar 2016 19:36:20 -0400
|
||||
Subject: [PATCH] MC Dev fixes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BiomeBase.java b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
index 94df229c7b..65daa76bc1 100644
|
||||
index 960dce230..253890e53 100644
|
||||
--- a/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/BiomeBase.java
|
||||
@@ -53,7 +53,7 @@ public abstract class BiomeBase {
|
||||
@@ -54,7 +54,7 @@ public abstract class BiomeBase {
|
||||
|
||||
@Nullable
|
||||
public static BiomeBase a(BiomeBase biomebase) {
|
||||
|
@ -17,7 +17,7 @@ index 94df229c7b..65daa76bc1 100644
|
|||
}
|
||||
|
||||
public static <C extends WorldGenCarverConfiguration> WorldGenCarverWrapper<C> a(WorldGenCarverAbstract<C> worldgencarverabstract, C c0) {
|
||||
@@ -232,7 +232,7 @@ public abstract class BiomeBase {
|
||||
@@ -236,7 +236,7 @@ public abstract class BiomeBase {
|
||||
|
||||
@Nullable
|
||||
public <C extends WorldGenFeatureConfiguration> C b(StructureGenerator<C> structuregenerator) {
|
||||
|
@ -25,9 +25,9 @@ index 94df229c7b..65daa76bc1 100644
|
|||
+ return (C) this.t.get(structuregenerator); // Paper - decompile fix
|
||||
}
|
||||
|
||||
public List<WorldGenFeatureConfigured<?>> e() {
|
||||
public List<WorldGenFeatureConfigured<?, ?>> g() {
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
index cd277dd17f..ab05425793 100644
|
||||
index cd277dd17..ab0542579 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
@@ -29,7 +29,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
|
||||
|
@ -72,7 +72,7 @@ index cd277dd17f..ab05425793 100644
|
|||
S s0 = this.f.get(iblockstate, v0);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index 6a8e8f7a67..daf406637c 100644
|
||||
index e40f9c153..c88a62f6b 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -57,12 +57,12 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
|
@ -92,7 +92,7 @@ index 6a8e8f7a67..daf406637c 100644
|
|||
});
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockStateEnum.java b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
index 28cfbaae28..1486d460c8 100644
|
||||
index 28cfbaae2..1486d460c 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockStateEnum.java
|
||||
@@ -20,10 +20,10 @@ public class BlockStateEnum<T extends Enum<T> & INamable> extends BlockState<T>
|
||||
|
@ -108,20 +108,8 @@ index 28cfbaae28..1486d460c8 100644
|
|||
String s1 = ((INamable) t0).getName();
|
||||
|
||||
if (this.b.containsKey(s1)) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkSection.java b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
index 22375330b2..473be2c695 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkSection.java
|
||||
@@ -142,6 +142,6 @@ public class ChunkSection {
|
||||
}
|
||||
|
||||
public boolean a(IBlockData iblockdata) {
|
||||
- return this.blockIds.a((Object) iblockdata);
|
||||
+ return this.blockIds.a(iblockdata); // Paper - decompile fix
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkStatus.java b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
index 26db8f135f..dd1822d6ff 100644
|
||||
index 68a601bac..efdf611e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkStatus.java
|
||||
@@ -84,7 +84,7 @@ public class ChunkStatus {
|
||||
|
@ -134,7 +122,7 @@ index 26db8f135f..dd1822d6ff 100644
|
|||
|
||||
for (int j = a().size() - 1; j >= 0; --j) {
|
||||
diff --git a/src/main/java/net/minecraft/server/CraftingManager.java b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
index d0b4bf8b7e..6fb734c64f 100644
|
||||
index 2dd27edc8..6def3616e 100644
|
||||
--- a/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/CraftingManager.java
|
||||
@@ -58,7 +58,7 @@ public class CraftingManager extends ResourceDataJson {
|
||||
|
@ -147,7 +135,7 @@ index d0b4bf8b7e..6fb734c64f 100644
|
|||
CraftingManager.LOGGER.info("Loaded {} recipes", map1.size());
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityVindicator.java b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
index fe57e1c75e..06918b8c91 100644
|
||||
index 7d44348c7..73ecdd22e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityVindicator.java
|
||||
@@ -25,7 +25,7 @@ public class EntityVindicator extends EntityIllagerAbstract {
|
||||
|
@ -160,7 +148,7 @@ index fe57e1c75e..06918b8c91 100644
|
|||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityVillagerAbstract.class, true));
|
||||
this.targetSelector.a(3, new PathfinderGoalNearestAttackableTarget<>(this, EntityIronGolem.class, true));
|
||||
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
index efa496fcc0..70a4509055 100644
|
||||
index 1f3ea23ae..b098d86e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
@@ -55,7 +55,7 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
||||
|
@ -190,10 +178,10 @@ index efa496fcc0..70a4509055 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockData.java b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
index fa51b372c1..3328a84792 100644
|
||||
index 3be9efd22..8d9b9af9b 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockData.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockData.java
|
||||
@@ -277,12 +277,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
@@ -281,12 +281,12 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
|
||||
public static <T> Dynamic<T> a(DynamicOps<T> dynamicops, IBlockData iblockdata) {
|
||||
ImmutableMap<IBlockState<?>, Comparable<?>> immutablemap = iblockdata.getStateMap();
|
||||
|
@ -208,19 +196,19 @@ index fa51b372c1..3328a84792 100644
|
|||
return Pair.of(dynamicops.createString(((IBlockState) entry.getKey()).a()), dynamicops.createString(IBlockDataHolder.b((IBlockState) entry.getKey(), (Comparable) entry.getValue())));
|
||||
}).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond)))));
|
||||
}
|
||||
@@ -344,9 +344,9 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
@@ -348,9 +348,9 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
if (!iblockdata.o()) {
|
||||
this.f = null;
|
||||
} else {
|
||||
- this.f = new VoxelShape[IBlockData.a.a.length];
|
||||
+ this.f = new VoxelShape[a.length]; // Paper - decompile fix
|
||||
VoxelShape voxelshape = block.h(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
VoxelShape voxelshape = block.i(iblockdata, BlockAccessAir.INSTANCE, BlockPosition.ZERO);
|
||||
- EnumDirection[] aenumdirection = IBlockData.a.a;
|
||||
+ EnumDirection[] aenumdirection = a; // Paper - decompile fix
|
||||
+ EnumDirection[] aenumdirection = IBlockData.a.a; // Paper - decompile fix
|
||||
|
||||
i = aenumdirection.length;
|
||||
|
||||
@@ -362,7 +362,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
@@ -366,7 +366,7 @@ public class IBlockData extends BlockDataAbstract<Block, IBlockData> implements
|
||||
return this.g.b(enumdirection_enumaxis) < 0.0D || this.g.c(enumdirection_enumaxis) > 1.0D;
|
||||
});
|
||||
this.i = new boolean[6];
|
||||
|
@ -230,7 +218,7 @@ index fa51b372c1..3328a84792 100644
|
|||
|
||||
for (i = 0; i < k; ++i) {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntityAccess.java b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
index b86efbd2dc..dca18afdbb 100644
|
||||
index a2bbca22b..c8512f9f4 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntityAccess.java
|
||||
@@ -47,7 +47,7 @@ public interface IEntityAccess {
|
||||
|
@ -243,7 +231,7 @@ index b86efbd2dc..dca18afdbb 100644
|
|||
}).filter((entity1) -> {
|
||||
return entity == null || !entity.x(entity1);
|
||||
@@ -55,7 +55,6 @@ public interface IEntityAccess {
|
||||
return Stream.of(entity1.aq(), entity == null ? null : entity.j(entity1));
|
||||
return Stream.of(entity1.au(), entity == null ? null : entity.j(entity1));
|
||||
}).filter(Objects::nonNull);
|
||||
|
||||
- axisalignedbb1.getClass();
|
||||
|
@ -276,7 +264,7 @@ index b86efbd2dc..dca18afdbb 100644
|
|||
+ T t1 = iterator.next(); // Paper - decompile fix
|
||||
|
||||
if (pathfindertargetcondition.a(entityliving, t1)) {
|
||||
double d4 = t1.e(d0, d1, d2);
|
||||
double d4 = t1.g(d0, d1, d2);
|
||||
@@ -205,10 +204,10 @@ public interface IEntityAccess {
|
||||
default <T extends EntityLiving> List<T> a(Class<? extends T> oclass, PathfinderTargetCondition pathfindertargetcondition, EntityLiving entityliving, AxisAlignedBB axisalignedbb) {
|
||||
List<T> list = this.a(oclass, axisalignedbb, (Predicate) null);
|
||||
|
@ -291,10 +279,10 @@ index b86efbd2dc..dca18afdbb 100644
|
|||
if (pathfindertargetcondition.a(entityliving, t0)) {
|
||||
list1.add(t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/LootSelectorEntry.java b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
index 9290534917..1016325bd7 100644
|
||||
index 59bb53543..3ed6a1e78 100644
|
||||
--- a/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/LootSelectorEntry.java
|
||||
@@ -127,7 +127,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@@ -125,7 +125,7 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@Override
|
||||
public T b(LootItemFunction.a lootitemfunction_a) {
|
||||
this.c.add(lootitemfunction_a.b());
|
||||
|
@ -303,7 +291,7 @@ index 9290534917..1016325bd7 100644
|
|||
}
|
||||
|
||||
protected LootItemFunction[] a() {
|
||||
@@ -136,12 +136,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
@@ -134,12 +134,12 @@ public abstract class LootSelectorEntry extends LootEntryAbstract {
|
||||
|
||||
public T a(int i) {
|
||||
this.a = i;
|
||||
|
@ -319,36 +307,23 @@ index 9290534917..1016325bd7 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTBase.java b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
index eab34088a6..7a987c6be3 100644
|
||||
index 829a7ae0a..8b9e47b4c 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTBase.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTBase.java
|
||||
@@ -88,7 +88,7 @@ public interface NBTBase {
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ public interface NBTBase {
|
||||
|
||||
NBTTagType<?> b();
|
||||
|
||||
- NBTBase clone();
|
||||
+ public NBTBase clone(); // Paper - decompile fix
|
||||
|
||||
default String asString() {
|
||||
return this.toString();
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 0dda7aaf69..4e20cfba41 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -134,7 +134,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/RegionFileSection.java b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
index a343a7b31d..4b3e0c0f01 100644
|
||||
index 737afc7d7..db9f0196b 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionFileSection.java
|
||||
@@ -82,9 +82,9 @@ public class RegionFileSection<R extends MinecraftSerializable> extends RegionFi
|
||||
@@ -83,9 +83,9 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
|
||||
Optional<R> optional = this.d(i);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
|
@ -360,7 +335,7 @@ index a343a7b31d..4b3e0c0f01 100644
|
|||
this.a(i);
|
||||
});
|
||||
|
||||
@@ -123,7 +123,7 @@ public class RegionFileSection<R extends MinecraftSerializable> extends RegionFi
|
||||
@@ -124,7 +124,7 @@ public class RegionFileSection<R extends MinecraftSerializable> implements AutoC
|
||||
for (int l = 0; l < 16; ++l) {
|
||||
long i1 = SectionPosition.a(chunkcoordintpair, l).v();
|
||||
Optional<R> optional = optionaldynamic.get(Integer.toString(l)).get().map((dynamic2) -> {
|
||||
|
@ -370,7 +345,7 @@ index a343a7b31d..4b3e0c0f01 100644
|
|||
}, dynamic2);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index 7f89562e90..4efcb8b595 100644
|
||||
index 7f89562e9..4efcb8b59 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -27,7 +27,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
|
@ -383,7 +358,7 @@ index 7f89562e90..4efcb8b595 100644
|
|||
|
||||
this.c.set(i, t0);
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryID.java b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
index 4cb78c6a3f..e15d286710 100644
|
||||
index 4cb78c6a3..e15d28671 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryID.java
|
||||
@@ -17,9 +17,9 @@ public class RegistryID<K> implements Registry<K> {
|
||||
|
@ -411,7 +386,7 @@ index 4cb78c6a3f..e15d286710 100644
|
|||
this.f = 0;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 1676ae2b36..0df534b563 100644
|
||||
index 8534585eb..7b92ecfff 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -45,8 +45,8 @@ public class SystemUtils {
|
||||
|
@ -425,7 +400,7 @@ index 1676ae2b36..0df534b563 100644
|
|||
}
|
||||
|
||||
public static String a(String s, @Nullable MinecraftKey minecraftkey) {
|
||||
@@ -158,8 +158,8 @@ public class SystemUtils {
|
||||
@@ -168,8 +168,8 @@ public class SystemUtils {
|
||||
public static <T> T b(Iterable<T> iterable, @Nullable T t0) {
|
||||
Iterator<T> iterator = iterable.iterator();
|
||||
|
||||
|
@ -436,7 +411,7 @@ index 1676ae2b36..0df534b563 100644
|
|||
|
||||
for (object1 = null; iterator.hasNext(); object1 = object) {
|
||||
object = iterator.next();
|
||||
@@ -184,7 +184,7 @@ public class SystemUtils {
|
||||
@@ -194,7 +194,7 @@ public class SystemUtils {
|
||||
}
|
||||
|
||||
public static <K> Strategy<K> i() {
|
||||
|
@ -445,7 +420,7 @@ index 1676ae2b36..0df534b563 100644
|
|||
}
|
||||
|
||||
public static <V> CompletableFuture<List<V>> b(List<? extends CompletableFuture<? extends V>> list) {
|
||||
@@ -195,7 +195,7 @@ public class SystemUtils {
|
||||
@@ -205,7 +205,7 @@ public class SystemUtils {
|
||||
list.forEach((completablefuture1) -> {
|
||||
int i = list1.size();
|
||||
|
||||
|
@ -455,10 +430,10 @@ index 1676ae2b36..0df534b563 100644
|
|||
if (throwable != null) {
|
||||
completablefuture.completeExceptionally(throwable);
|
||||
diff --git a/src/main/java/net/minecraft/server/Ticket.java b/src/main/java/net/minecraft/server/Ticket.java
|
||||
index c23a366b2c..0430ca5353 100644
|
||||
index ee2059cf8..77bb6b092 100644
|
||||
--- a/src/main/java/net/minecraft/server/Ticket.java
|
||||
+++ b/src/main/java/net/minecraft/server/Ticket.java
|
||||
@@ -24,7 +24,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
|
||||
@@ -23,7 +23,7 @@ public final class Ticket<T> implements Comparable<Ticket<?>> {
|
||||
} else {
|
||||
int j = Integer.compare(System.identityHashCode(this.a), System.identityHashCode(ticket.a));
|
||||
|
||||
|
@ -468,19 +443,19 @@ index c23a366b2c..0430ca5353 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagePlace.java b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
index b0e6ad773e..3169590641 100644
|
||||
index c137484f6..5f03eb40b 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillagePlace.java
|
||||
@@ -157,7 +157,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
@@ -165,7 +165,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
}
|
||||
|
||||
private static boolean a(ChunkSection chunksection) {
|
||||
- Stream stream = VillagePlaceType.f();
|
||||
+ Stream<IBlockData> stream = VillagePlaceType.f(); // Paper - decompile fix
|
||||
- Stream stream = VillagePlaceType.e();
|
||||
+ Stream<IBlockData> stream = VillagePlaceType.e(); // Paper - decompile fix
|
||||
|
||||
chunksection.getClass();
|
||||
return stream.anyMatch(chunksection::a);
|
||||
@@ -215,7 +215,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
@@ -237,7 +237,7 @@ public class VillagePlace extends RegionFileSection<VillagePlaceSection> {
|
||||
|
||||
private final Predicate<? super VillagePlaceRecord> d;
|
||||
|
||||
|
@ -490,7 +465,7 @@ index b0e6ad773e..3169590641 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/VillagerTrades.java b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
index 2fbb1f8df9..8cee460bd3 100644
|
||||
index a06a31534..3bcf0b385 100644
|
||||
--- a/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
+++ b/src/main/java/net/minecraft/server/VillagerTrades.java
|
||||
@@ -15,12 +15,12 @@ import javax.annotation.Nullable;
|
||||
|
@ -500,17 +475,17 @@ index 2fbb1f8df9..8cee460bd3 100644
|
|||
- public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = (Map) SystemUtils.a((Object) Maps.newHashMap(), (hashmap) -> {
|
||||
+ public static final Map<VillagerProfession, Int2ObjectMap<VillagerTrades.IMerchantRecipeOption[]>> a = SystemUtils.a(Maps.newHashMap(), (hashmap) -> { // Paper - decompile fix
|
||||
hashmap.put(VillagerProfession.FARMER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHEAT, 20, 16, 2), new VillagerTrades.b(Items.POTATO, 26, 16, 2), new VillagerTrades.b(Items.CARROT, 22, 16, 2), new VillagerTrades.b(Items.BEETROOT, 15, 16, 2), new VillagerTrades.h(Items.BREAD, 1, 6, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.PUMPKIN, 6, 12, 10), new VillagerTrades.h(Items.PUMPKIN_PIE, 1, 4, 5), new VillagerTrades.h(Items.APPLE, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.COOKIE, 3, 18, 10), new VillagerTrades.b(Blocks.MELON, 4, 12, 20)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Blocks.CAKE, 1, 1, 12, 15), new VillagerTrades.i(MobEffects.NIGHT_VISION, 100, 15), new VillagerTrades.i(MobEffects.JUMP, 160, 15), new VillagerTrades.i(MobEffects.WEAKNESS, 140, 15), new VillagerTrades.i(MobEffects.BLINDNESS, 120, 15), new VillagerTrades.i(MobEffects.POISON, 280, 15), new VillagerTrades.i(MobEffects.SATURATION, 7, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GOLDEN_CARROT, 3, 3, 30), new VillagerTrades.h(Items.GLISTERING_MELON_SLICE, 4, 3, 30)})));
|
||||
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
|
||||
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pS, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
|
||||
- hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())})));
|
||||
+ hashmap.put(VillagerProfession.FISHERMAN, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 20, 16, 2), new VillagerTrades.b(Items.COAL, 10, 16, 2), new VillagerTrades.g(Items.COD, 6, Items.COOKED_COD, 6, 16, 1), new VillagerTrades.h(Items.COD_BUCKET, 3, 1, 16, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COD, 15, 16, 10), new VillagerTrades.g(Items.SALMON, 6, Items.COOKED_SALMON, 6, 16, 5), new VillagerTrades.h(Items.pT, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SALMON, 13, 16, 20), new VillagerTrades.e(Items.FISHING_ROD, 3, 3, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.TROPICAL_FISH, 6, 12, 30)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PUFFERFISH, 4, 12, 30), new VillagerTrades.c(1, 12, 30, ImmutableMap.<VillagerType, Item>builder().put(VillagerType.PLAINS, Items.OAK_BOAT).put(VillagerType.TAIGA, Items.SPRUCE_BOAT).put(VillagerType.SNOW, Items.SPRUCE_BOAT).put(VillagerType.DESERT, Items.JUNGLE_BOAT).put(VillagerType.JUNGLE, Items.JUNGLE_BOAT).put(VillagerType.SAVANNA, Items.ACACIA_BOAT).put(VillagerType.SWAMP, Items.DARK_OAK_BOAT).build())}))); // Paper - decompile fix
|
||||
hashmap.put(VillagerProfession.SHEPHERD, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Blocks.WHITE_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BROWN_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.BLACK_WOOL, 18, 16, 2), new VillagerTrades.b(Blocks.GRAY_WOOL, 18, 16, 2), new VillagerTrades.h(Items.SHEARS, 2, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WHITE_DYE, 12, 16, 10), new VillagerTrades.b(Items.GRAY_DYE, 12, 16, 10), new VillagerTrades.b(Items.BLACK_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIGHT_BLUE_DYE, 12, 16, 10), new VillagerTrades.b(Items.LIME_DYE, 12, 16, 10), new VillagerTrades.h(Blocks.WHITE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.ORANGE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.YELLOW_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIME_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PINK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.CYAN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.PURPLE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLUE_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BROWN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.GREEN_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.RED_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.BLACK_WOOL, 1, 1, 16, 5), new VillagerTrades.h(Blocks.WHITE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.ORANGE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.MAGENTA_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.YELLOW_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIME_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PINK_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.LIGHT_GRAY_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.CYAN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.PURPLE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLUE_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BROWN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.GREEN_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.RED_CARPET, 1, 4, 16, 5), new VillagerTrades.h(Blocks.BLACK_CARPET, 1, 4, 16, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.YELLOW_DYE, 12, 16, 20), new VillagerTrades.b(Items.LIGHT_GRAY_DYE, 12, 16, 20), new VillagerTrades.b(Items.ORANGE_DYE, 12, 16, 20), new VillagerTrades.b(Items.RED_DYE, 12, 16, 20), new VillagerTrades.b(Items.PINK_DYE, 12, 16, 20), new VillagerTrades.h(Blocks.WHITE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.YELLOW_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.RED_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLACK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.BROWN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.CYAN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.GREEN_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_BLUE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIGHT_GRAY_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.LIME_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.MAGENTA_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.ORANGE_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PINK_BED, 3, 1, 12, 10), new VillagerTrades.h(Blocks.PURPLE_BED, 3, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BROWN_DYE, 12, 16, 30), new VillagerTrades.b(Items.PURPLE_DYE, 12, 16, 30), new VillagerTrades.b(Items.BLUE_DYE, 12, 16, 30), new VillagerTrades.b(Items.GREEN_DYE, 12, 16, 30), new VillagerTrades.b(Items.MAGENTA_DYE, 12, 16, 30), new VillagerTrades.b(Items.CYAN_DYE, 12, 16, 30), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 12, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 12, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.PAINTING, 2, 3, 30)})));
|
||||
hashmap.put(VillagerProfession.FLETCHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STICK, 32, 16, 2), new VillagerTrades.h(Items.ARROW, 1, 16, 1), new VillagerTrades.g(Blocks.GRAVEL, 10, Items.FLINT, 10, 12, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FLINT, 26, 12, 10), new VillagerTrades.h(Items.BOW, 2, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.STRING, 14, 16, 20), new VillagerTrades.h(Items.CROSSBOW, 3, 1, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.FEATHER, 24, 16, 30), new VillagerTrades.e(Items.BOW, 2, 3, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.dE, 8, 12, 30), new VillagerTrades.e(Items.CROSSBOW, 3, 3, 15), new VillagerTrades.j(Items.ARROW, 5, Items.TIPPED_ARROW, 5, 2, 12, 30)})));
|
||||
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
|
||||
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 6, 3, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pQ, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
|
||||
- hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build()));
|
||||
+ hashmap.put(VillagerProfession.LIBRARIAN, a(ImmutableMap.<Integer, VillagerTrades.IMerchantRecipeOption[]>builder().put(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.d(1), new VillagerTrades.h(Blocks.BOOKSHELF, 9, 1, 12, 1)}).put(2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.BOOK, 4, 12, 10), new VillagerTrades.d(5), new VillagerTrades.h(Items.pR, 1, 1, 5)}).put(3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.INK_SAC, 5, 12, 20), new VillagerTrades.d(10), new VillagerTrades.h(Items.am, 1, 4, 10)}).put(4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.WRITABLE_BOOK, 2, 12, 30), new VillagerTrades.d(15), new VillagerTrades.h(Items.CLOCK, 5, 1, 15), new VillagerTrades.h(Items.COMPASS, 4, 1, 15)}).put(5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.NAME_TAG, 20, 1, 30)}).build())); // Paper - decompile fix
|
||||
hashmap.put(VillagerProfession.CARTOGRAPHER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.PAPER, 24, 16, 2), new VillagerTrades.h(Items.MAP, 7, 1, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.df, 11, 16, 10), new VillagerTrades.k(13, "Monument", MapIcon.Type.MONUMENT, 12, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COMPASS, 1, 12, 20), new VillagerTrades.k(14, "Mansion", MapIcon.Type.MANSION, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.ITEM_FRAME, 7, 1, 15), new VillagerTrades.h(Items.WHITE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_BLUE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.RED_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PINK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GREEN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIME_BANNER, 3, 1, 15), new VillagerTrades.h(Items.GRAY_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BLACK_BANNER, 3, 1, 15), new VillagerTrades.h(Items.PURPLE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.MAGENTA_BANNER, 3, 1, 15), new VillagerTrades.h(Items.CYAN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.BROWN_BANNER, 3, 1, 15), new VillagerTrades.h(Items.YELLOW_BANNER, 3, 1, 15), new VillagerTrades.h(Items.ORANGE_BANNER, 3, 1, 15), new VillagerTrades.h(Items.LIGHT_GRAY_BANNER, 3, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.h(Items.GLOBE_BANNER_PATTERN, 8, 1, 30)})));
|
||||
hashmap.put(VillagerProfession.CLERIC, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.ROTTEN_FLESH, 32, 16, 2), new VillagerTrades.h(Items.REDSTONE, 1, 2, 1)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.GOLD_INGOT, 3, 12, 10), new VillagerTrades.h(Items.LAPIS_LAZULI, 1, 1, 5)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.RABBIT_FOOT, 2, 12, 20), new VillagerTrades.h(Blocks.GLOWSTONE, 4, 1, 12, 10)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.SCUTE, 4, 12, 30), new VillagerTrades.b(Items.GLASS_BOTTLE, 9, 12, 30), new VillagerTrades.h(Items.ENDER_PEARL, 5, 1, 15)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.NETHER_WART, 22, 12, 30), new VillagerTrades.h(Items.EXPERIENCE_BOTTLE, 3, 1, 30)})));
|
||||
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pP), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
|
||||
hashmap.put(VillagerProfession.ARMORER, a(ImmutableMap.of(1, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.COAL, 15, 16, 2), new VillagerTrades.h(new ItemStack(Items.IRON_LEGGINGS), 7, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_BOOTS), 4, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_HELMET), 5, 1, 12, 1, 0.2F), new VillagerTrades.h(new ItemStack(Items.IRON_CHESTPLATE), 9, 1, 12, 1, 0.2F)}, 2, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.IRON_INGOT, 4, 12, 10), new VillagerTrades.h(new ItemStack(Items.pQ), 36, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_BOOTS), 1, 1, 12, 5, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_LEGGINGS), 3, 1, 12, 5, 0.2F)}, 3, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.b(Items.LAVA_BUCKET, 1, 12, 20), new VillagerTrades.b(Items.DIAMOND, 1, 12, 20), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_HELMET), 1, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.CHAINMAIL_CHESTPLATE), 4, 1, 12, 10, 0.2F), new VillagerTrades.h(new ItemStack(Items.SHIELD), 5, 1, 12, 10, 0.2F)}, 4, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_LEGGINGS, 14, 3, 15, 0.2F), new VillagerTrades.e(Items.DIAMOND_BOOTS, 8, 3, 15, 0.2F)}, 5, new VillagerTrades.IMerchantRecipeOption[]{new VillagerTrades.e(Items.DIAMOND_HELMET, 8, 3, 30, 0.2F), new VillagerTrades.e(Items.DIAMOND_CHESTPLATE, 16, 3, 30, 0.2F)})));
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldPersistentData.java b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||
index 0b950aae63..f5f540032f 100644
|
||||
index 55fe7625a..19e68a783 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldPersistentData.java
|
||||
@@ -37,7 +37,7 @@ public class WorldPersistentData {
|
||||
|
@ -537,9 +512,9 @@ index 0b950aae63..f5f540032f 100644
|
|||
if (file.exists()) {
|
||||
- T t0 = (PersistentBase) supplier.get();
|
||||
+ T t0 = supplier.get(); // Paper - decompile fix
|
||||
NBTTagCompound nbttagcompound = this.a(s, SharedConstants.a().getWorldVersion());
|
||||
NBTTagCompound nbttagcompound = this.a(s, SharedConstants.getGameVersion().getWorldVersion());
|
||||
|
||||
t0.a(nbttagcompound.getCompound("data"));
|
||||
--
|
||||
2.22.1
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 740862772ad8504b5bd9badc779ff59c0e633b93 Mon Sep 17 00:00:00 2001
|
||||
From 11a54b9c272c9a901085423070c007850d6358d5 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 28 Mar 2016 20:55:47 -0400
|
||||
Subject: [PATCH] MC Utils
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockAccessAir.java b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||
index e8ab5d3221..d7a68a1ef7 100644
|
||||
index eff6ebcd3..30cbfc8ea 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockAccessAir.java
|
||||
@@ -14,6 +14,18 @@ public enum BlockAccessAir implements IBlockAccess {
|
||||
|
@ -28,7 +28,7 @@ index e8ab5d3221..d7a68a1ef7 100644
|
|||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return Blocks.AIR.getBlockData();
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockDataAbstract.java b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
index ab05425793..b3fe95d856 100644
|
||||
index ab0542579..b3fe95d85 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockDataAbstract.java
|
||||
@@ -80,6 +80,7 @@ public abstract class BlockDataAbstract<O, S> implements IBlockDataHolder<S> {
|
||||
|
@ -40,7 +40,7 @@ index ab05425793..b3fe95d856 100644
|
|||
return this.d.containsKey(iblockstate);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockPosition.java b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
index daf406637c..2613de6624 100644
|
||||
index c88a62f6b..1cdf0346f 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockPosition.java
|
||||
@@ -120,6 +120,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
|
@ -51,7 +51,7 @@ index daf406637c..2613de6624 100644
|
|||
public BlockPosition b(int i, int j, int k) {
|
||||
return i == 0 && j == 0 && k == 0 ? this : new BlockPosition(this.getX() + i, this.getY() + j, this.getZ() + k);
|
||||
}
|
||||
@@ -207,6 +208,8 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
@@ -210,6 +211,8 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return new BlockPosition(this.getY() * baseblockposition.getZ() - this.getZ() * baseblockposition.getY(), this.getZ() * baseblockposition.getX() - this.getX() * baseblockposition.getZ(), this.getX() * baseblockposition.getY() - this.getY() * baseblockposition.getX());
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,7 @@ index daf406637c..2613de6624 100644
|
|||
public BlockPosition immutableCopy() {
|
||||
return this;
|
||||
}
|
||||
@@ -391,6 +394,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
@@ -402,6 +405,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return this.d;
|
||||
}
|
||||
|
||||
|
@ -68,8 +68,8 @@ index daf406637c..2613de6624 100644
|
|||
public BlockPosition.MutableBlockPosition d(int i, int j, int k) {
|
||||
this.b = i;
|
||||
this.c = j;
|
||||
@@ -402,6 +406,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return this.c(entity.locX, entity.locY, entity.locZ);
|
||||
@@ -413,6 +417,7 @@ public class BlockPosition extends BaseBlockPosition implements MinecraftSeriali
|
||||
return this.c(entity.locX(), entity.locY(), entity.locZ());
|
||||
}
|
||||
|
||||
+ public BlockPosition.MutableBlockPosition setValues(double d0, double d1, double d2) { return c(d0, d1, d2);} // Paper - OBFHELPER
|
||||
|
@ -77,7 +77,7 @@ index daf406637c..2613de6624 100644
|
|||
return this.d(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
|
||||
index 837ca87fc6..1cbcefec58 100644
|
||||
index 55373cae0..cfffbd031 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -25,7 +25,7 @@ import org.apache.logging.log4j.Logger;
|
||||
|
@ -87,7 +87,7 @@ index 837ca87fc6..1cbcefec58 100644
|
|||
- public static final ChunkSection a = null;
|
||||
+ public static final ChunkSection a = null; public static final ChunkSection EMPTY_CHUNK_SECTION = Chunk.a; // Paper - OBFHELPER
|
||||
private final ChunkSection[] sections;
|
||||
private final BiomeBase[] d;
|
||||
private BiomeStorage d;
|
||||
private final Map<BlockPosition, NBTTagCompound> e;
|
||||
@@ -213,6 +213,18 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
@ -108,7 +108,7 @@ index 837ca87fc6..1cbcefec58 100644
|
|||
@Override
|
||||
public Fluid getFluid(BlockPosition blockposition) {
|
||||
return this.a(blockposition.getX(), blockposition.getY(), blockposition.getZ());
|
||||
@@ -400,6 +412,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -395,6 +407,7 @@ public class Chunk implements IChunkAccess {
|
||||
return this.a(blockposition, Chunk.EnumTileEntityState.CHECK);
|
||||
}
|
||||
|
||||
|
@ -117,11 +117,11 @@ index 837ca87fc6..1cbcefec58 100644
|
|||
public TileEntity a(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCache.java b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
index 90363e790c..869e8548c6 100644
|
||||
index 11c4d23ba..818872944 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCache.java
|
||||
@@ -47,6 +47,30 @@ public class ChunkCache implements IWorldReader {
|
||||
return this.e.getLightLevel(blockposition, i);
|
||||
@@ -71,6 +71,30 @@ public class ChunkCache implements IBlockAccess, ICollisionAccess {
|
||||
return this.a(i, j);
|
||||
}
|
||||
|
||||
+ // Paper start - if loaded util
|
||||
|
@ -150,9 +150,9 @@ index 90363e790c..869e8548c6 100644
|
|||
+
|
||||
@Nullable
|
||||
@Override
|
||||
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
public TileEntity getTileEntity(BlockPosition blockposition) {
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
index 857b2f8868..bbf136614c 100644
|
||||
index 260644bf0..f2a19acd8 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkCoordIntPair.java
|
||||
@@ -31,7 +31,9 @@ public class ChunkCoordIntPair {
|
||||
|
@ -167,7 +167,7 @@ index 857b2f8868..bbf136614c 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 36a89817f8..baf3bd461b 100644
|
||||
index 2e8a087bd..c5121d369 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -77,6 +77,37 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -209,7 +209,7 @@ index 36a89817f8..baf3bd461b 100644
|
|||
@Override
|
||||
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
diff --git a/src/main/java/net/minecraft/server/DataBits.java b/src/main/java/net/minecraft/server/DataBits.java
|
||||
index 91ebd474ad..08d1be3117 100644
|
||||
index 7ca3a1d0c..2edd9b871 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataBits.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataBits.java
|
||||
@@ -83,6 +83,7 @@ public class DataBits {
|
||||
|
@ -221,7 +221,7 @@ index 91ebd474ad..08d1be3117 100644
|
|||
return this.a;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPalette.java b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
index 75ba698868..45403fbe30 100644
|
||||
index 75ba69886..45403fbe3 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPalette.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPalette.java
|
||||
@@ -4,10 +4,12 @@ import javax.annotation.Nullable;
|
||||
|
@ -238,7 +238,7 @@ index 75ba698868..45403fbe30 100644
|
|||
T a(int i);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/DataPaletteBlock.java b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
index 8764379c6d..a3bb2e8779 100644
|
||||
index 774a8f543..d5f5a5187 100644
|
||||
--- a/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/DataPaletteBlock.java
|
||||
@@ -11,7 +11,7 @@ import java.util.stream.Collectors;
|
||||
|
@ -280,7 +280,7 @@ index 8764379c6d..a3bb2e8779 100644
|
|||
this.a();
|
||||
packetdataserializer.writeByte(this.i);
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityCreature.java b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
index ef81d3a5be..7dacaa2166 100644
|
||||
index fe69161e5..b40c8d2f8 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityCreature.java
|
||||
@@ -6,6 +6,8 @@ import org.bukkit.event.entity.EntityUnleashEvent;
|
||||
|
@ -293,7 +293,7 @@ index ef81d3a5be..7dacaa2166 100644
|
|||
super(entitytypes, world);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 613d534aeb..f31a996aa5 100644
|
||||
index 39d7df1d4..e0434ff12 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -144,6 +144,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
@ -305,10 +305,10 @@ index 613d534aeb..f31a996aa5 100644
|
|||
// 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
|
||||
index 9c3e95bbbc..dcbc4ea7e1 100644
|
||||
index 0f6fd2d70..138bc38e6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -126,6 +126,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -129,6 +129,7 @@ public abstract class EntityLiving extends Entity {
|
||||
public org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
|
||||
public boolean collides = true;
|
||||
public boolean canPickUpLoot;
|
||||
|
@ -317,7 +317,7 @@ index 9c3e95bbbc..dcbc4ea7e1 100644
|
|||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMonster.java b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
index 07774e4b1f..e0609e7e97 100644
|
||||
index 00c3b666d..e5322fbae 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMonster.java
|
||||
@@ -5,6 +5,7 @@ import java.util.function.Predicate;
|
||||
|
@ -329,7 +329,7 @@ index 07774e4b1f..e0609e7e97 100644
|
|||
super(entitytypes, world);
|
||||
this.f = 5;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTypes.java b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
index 43d207ae59..335877889a 100644
|
||||
index cf9612d17..755d34e61 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -4,6 +4,7 @@ import com.mojang.datafixers.DataFixUtils;
|
||||
|
@ -340,19 +340,19 @@ index 43d207ae59..335877889a 100644
|
|||
import java.util.UUID;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
@@ -289,8 +290,8 @@ public class EntityTypes<T extends Entity> {
|
||||
return this.bi.height;
|
||||
@@ -290,8 +291,8 @@ public class EntityTypes<T extends Entity> {
|
||||
return this.bj.height;
|
||||
}
|
||||
|
||||
- @Nullable
|
||||
- public T a(World world) {
|
||||
+ public T create(World world) { return this.a(world); } // Paper - OBFHELPER
|
||||
+ @Nullable public T a(World world) { // Paper - OBFHELPER
|
||||
return this.aZ.create(this, world);
|
||||
return this.ba.create(this, world);
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
index 70a4509055..d521d25cf5 100644
|
||||
index b098d86e3..721021791 100644
|
||||
--- a/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
+++ b/src/main/java/net/minecraft/server/IAsyncTaskHandler.java
|
||||
@@ -68,6 +68,15 @@ public abstract class IAsyncTaskHandler<R extends Runnable> implements Mailbox<R
|
||||
|
@ -372,7 +372,7 @@ index 70a4509055..d521d25cf5 100644
|
|||
this.d.add(r0);
|
||||
LockSupport.unpark(this.getThread());
|
||||
diff --git a/src/main/java/net/minecraft/server/IBlockAccess.java b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
index 6e365f402c..577b227758 100644
|
||||
index 3b0877080..0dff02352 100644
|
||||
--- a/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/IBlockAccess.java
|
||||
@@ -9,10 +9,24 @@ public interface IBlockAccess {
|
||||
|
@ -401,19 +401,19 @@ index 6e365f402c..577b227758 100644
|
|||
return this.getType(blockposition).h();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/IWorldReader.java b/src/main/java/net/minecraft/server/IWorldReader.java
|
||||
index a5eff27651..a25736e23d 100644
|
||||
index ba315131e..cbe2aa4c0 100644
|
||||
--- a/src/main/java/net/minecraft/server/IWorldReader.java
|
||||
+++ b/src/main/java/net/minecraft/server/IWorldReader.java
|
||||
@@ -39,6 +39,7 @@ public interface IWorldReader extends IIBlockAccess {
|
||||
@@ -4,6 +4,7 @@ import javax.annotation.Nullable;
|
||||
|
||||
int getLightLevel(BlockPosition blockposition, int i);
|
||||
public interface IWorldReader extends IBlockLightAccess, ICollisionAccess, BiomeManager.Provider {
|
||||
|
||||
+ @Nullable IChunkAccess getChunkIfLoadedImmediately(int x, int z); // Paper - ifLoaded api (we need this since current impl blocks if the chunk is loading)
|
||||
@Nullable
|
||||
IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ItemStack.java b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
index f77477d860..9ebfbff46b 100644
|
||||
index 06360cf7c..8e8fab497 100644
|
||||
--- a/src/main/java/net/minecraft/server/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/server/ItemStack.java
|
||||
@@ -37,10 +37,19 @@ import org.bukkit.event.world.StructureGrowEvent;
|
||||
|
@ -422,7 +422,7 @@ index f77477d860..9ebfbff46b 100644
|
|||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
- public static final ItemStack a = new ItemStack((Item) null);
|
||||
+ public static final ItemStack a = new ItemStack((Item) null);public static final ItemStack NULL_ITEM = a; // Paper - OBFHELPER
|
||||
public static final DecimalFormat b = F();
|
||||
public static final DecimalFormat b = H();
|
||||
private int count;
|
||||
private int e;
|
||||
+ // Paper start
|
||||
|
@ -437,7 +437,7 @@ index f77477d860..9ebfbff46b 100644
|
|||
@Deprecated
|
||||
private Item item;
|
||||
private NBTTagCompound tag;
|
||||
@@ -591,6 +600,17 @@ public final class ItemStack {
|
||||
@@ -593,6 +602,17 @@ public final class ItemStack {
|
||||
return this.tag != null ? this.tag.getList("Enchantments", 10) : new NBTTagList();
|
||||
}
|
||||
|
||||
|
@ -454,8 +454,8 @@ index f77477d860..9ebfbff46b 100644
|
|||
+ // Paper end
|
||||
public void setTag(@Nullable NBTTagCompound nbttagcompound) {
|
||||
this.tag = nbttagcompound;
|
||||
}
|
||||
@@ -675,6 +695,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start - ensure null tags do not get inappropriately used (SpigotCraft#463)
|
||||
@@ -686,6 +706,7 @@ public final class ItemStack {
|
||||
return this.tag != null && this.tag.hasKeyOfType("Enchantments", 9) ? !this.tag.getList("Enchantments", 10).isEmpty() : false;
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,7 @@ index f77477d860..9ebfbff46b 100644
|
|||
public void a(String s, NBTBase nbtbase) {
|
||||
this.getOrCreateTag().set(s, nbtbase);
|
||||
}
|
||||
@@ -748,6 +769,7 @@ public final class ItemStack {
|
||||
@@ -762,6 +783,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start
|
||||
@Deprecated
|
||||
public void setItem(Item item) {
|
||||
|
@ -473,7 +473,7 @@ index f77477d860..9ebfbff46b 100644
|
|||
// CraftBukkit end
|
||||
diff --git a/src/main/java/net/minecraft/server/MCUtil.java b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
new file mode 100644
|
||||
index 0000000000..c96f3ed176
|
||||
index 000000000..c96f3ed17
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/net/minecraft/server/MCUtil.java
|
||||
@@ -0,0 +1,316 @@
|
||||
|
@ -794,20 +794,20 @@ index 0000000000..c96f3ed176
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagCompound.java b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
index e16a579b55..3f6d2676e7 100644
|
||||
index e85b24a32..75604dbc6 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagCompound.java
|
||||
@@ -23,7 +23,7 @@ public class NBTTagCompound implements NBTBase {
|
||||
@@ -60,7 +60,7 @@ public class NBTTagCompound implements NBTBase {
|
||||
return "TAG_Compound";
|
||||
}
|
||||
};
|
||||
- private final Map<String, NBTBase> map;
|
||||
+ public final Map<String, NBTBase> map; // Paper
|
||||
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
private static final Pattern g = Pattern.compile("[A-Za-z0-9._+-]+");
|
||||
- private final Map<String, NBTBase> map = Maps.newHashMap();
|
||||
+ public final Map<String, NBTBase> map = Maps.newHashMap(); // Paper
|
||||
|
||||
public NBTTagCompound() {}
|
||||
|
||||
@@ -99,11 +99,15 @@ public class NBTTagCompound implements NBTBase {
|
||||
this.map.put(s, new NBTTagLong(i));
|
||||
private NBTTagCompound(Map<String, NBTBase> map) {
|
||||
this.map = map;
|
||||
@@ -123,11 +123,15 @@ public class NBTTagCompound implements NBTBase {
|
||||
this.map.put(s, NBTTagLong.a(i));
|
||||
}
|
||||
|
||||
+ public void setUUID(String prefix, UUID uuid) { a(prefix, uuid); } // Paper - OBFHELPER
|
||||
|
@ -823,7 +823,7 @@ index e16a579b55..3f6d2676e7 100644
|
|||
return new UUID(this.getLong(s + "Most"), this.getLong(s + "Least"));
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/NetworkManager.java b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
index 6700582e36..3ccf166366 100644
|
||||
index 6700582e3..3ccf16636 100644
|
||||
--- a/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/NetworkManager.java
|
||||
@@ -159,6 +159,7 @@ public class NetworkManager extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
|
@ -855,7 +855,7 @@ index 6700582e36..3ccf166366 100644
|
|||
public QueuedPacket(Packet<?> packet, @Nullable GenericFutureListener<? extends Future<? super Void>> genericfuturelistener) {
|
||||
this.a = packet;
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketDataSerializer.java b/src/main/java/net/minecraft/server/PacketDataSerializer.java
|
||||
index db2fe836c2..0d67676f7d 100644
|
||||
index 81b6f4581..d9574a9ac 100644
|
||||
--- a/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 {
|
||||
|
@ -867,7 +867,7 @@ index db2fe836c2..0d67676f7d 100644
|
|||
for (int j = 1; j < 5; ++j) {
|
||||
if ((i & -1 << j * 7) == 0) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketEncoder.java b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
index 90223deae3..63c4dbd327 100644
|
||||
index 90223deae..63c4dbd32 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketEncoder.java
|
||||
@@ -42,6 +42,7 @@ public class PacketEncoder extends MessageToByteEncoder<Packet<?>> {
|
||||
|
@ -879,19 +879,19 @@ index 90223deae3..63c4dbd327 100644
|
|||
throw new SkipEncodeException(throwable);
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
index 4e20cfba41..363ab5da12 100644
|
||||
index 677e3e5f6..3a1d0deb0 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutMapChunk.java
|
||||
@@ -14,7 +14,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
private int b;
|
||||
private int c;
|
||||
@@ -17,7 +17,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
private NBTTagCompound d;
|
||||
- private byte[] e;
|
||||
+ private byte[] e; private byte[] getData() { return this.e; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> f;
|
||||
private boolean g;
|
||||
@Nullable
|
||||
private BiomeStorage e;
|
||||
- private byte[] f;
|
||||
+ private byte[] f; private byte[] getData() { return this.f; } // Paper - OBFHELPER
|
||||
private List<NBTTagCompound> g;
|
||||
private boolean h;
|
||||
|
||||
@@ -114,6 +114,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
@@ -129,6 +129,7 @@ public class PacketPlayOutMapChunk implements Packet<PacketListenerPlayOut> {
|
||||
return bytebuf;
|
||||
}
|
||||
|
||||
|
@ -900,7 +900,7 @@ index 4e20cfba41..363ab5da12 100644
|
|||
int j = 0;
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunk.java b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
index 3aedcfc33e..7407c1a564 100644
|
||||
index 775359146..3c6fe0596 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunk.java
|
||||
@@ -63,6 +63,14 @@ public class PlayerChunk {
|
||||
|
@ -919,7 +919,7 @@ index 3aedcfc33e..7407c1a564 100644
|
|||
public CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> getStatusFutureUnchecked(ChunkStatus chunkstatus) {
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture = (CompletableFuture) this.statusFutures.get(chunkstatus.c());
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 58e89dd27c..301b1c0829 100644
|
||||
index ba0293512..b257e1c4e 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -67,9 +67,9 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
|
@ -936,7 +936,7 @@ index 58e89dd27c..301b1c0829 100644
|
|||
private volatile int chatThrottle;
|
||||
private static final AtomicIntegerFieldUpdater chatSpamField = AtomicIntegerFieldUpdater.newUpdater(PlayerConnection.class, "chatThrottle");
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerInventory.java b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
index 2fe3d5d4c2..4aee712a6f 100644
|
||||
index c2b2237c8..d117578f2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerInventory.java
|
||||
@@ -17,7 +17,7 @@ public class PlayerInventory implements IInventory, INamableTileEntity {
|
||||
|
@ -949,7 +949,7 @@ index 2fe3d5d4c2..4aee712a6f 100644
|
|||
public final EntityHuman player;
|
||||
private ItemStack carried;
|
||||
diff --git a/src/main/java/net/minecraft/server/PotionUtil.java b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
index b3824898da..bf4172be52 100644
|
||||
index b3824898d..bf4172be5 100644
|
||||
--- a/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
+++ b/src/main/java/net/minecraft/server/PotionUtil.java
|
||||
@@ -110,6 +110,7 @@ public class PotionUtil {
|
||||
|
@ -961,10 +961,10 @@ index b3824898da..bf4172be52 100644
|
|||
MinecraftKey minecraftkey = IRegistry.POTION.getKey(potionregistry);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/ProtoChunk.java b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
index 2158e239e0..6bdd7dda04 100644
|
||||
index 6e65306a2..39339fa27 100644
|
||||
--- a/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/ProtoChunk.java
|
||||
@@ -79,6 +79,18 @@ public class ProtoChunk implements IChunkAccess {
|
||||
@@ -80,6 +80,18 @@ public class ProtoChunk implements IChunkAccess {
|
||||
|
||||
}
|
||||
|
||||
|
@ -984,10 +984,10 @@ index 2158e239e0..6bdd7dda04 100644
|
|||
public IBlockData getType(BlockPosition blockposition) {
|
||||
int i = blockposition.getY();
|
||||
diff --git a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||
index 7260b9bfd3..ac6687754c 100644
|
||||
index 8c123f265..9d0e8c2d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegionLimitedWorldAccess.java
|
||||
@@ -106,6 +106,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
|
||||
@@ -108,6 +108,26 @@ public class RegionLimitedWorldAccess implements GeneratorAccess {
|
||||
return i >= ichunkaccess.getPos().x && i <= ichunkaccess1.getPos().x && j >= ichunkaccess.getPos().z && j <= ichunkaccess1.getPos().z;
|
||||
}
|
||||
|
||||
|
@ -1015,7 +1015,7 @@ index 7260b9bfd3..ac6687754c 100644
|
|||
public IBlockData getType(BlockPosition blockposition) {
|
||||
return this.getChunkAt(blockposition.getX() >> 4, blockposition.getZ() >> 4).getType(blockposition);
|
||||
diff --git a/src/main/java/net/minecraft/server/RegistryBlockID.java b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
index 4efcb8b595..60948afa4e 100644
|
||||
index 4efcb8b59..60948afa4 100644
|
||||
--- a/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
+++ b/src/main/java/net/minecraft/server/RegistryBlockID.java
|
||||
@@ -57,6 +57,7 @@ public class RegistryBlockID<T> implements Registry<T> {
|
||||
|
@ -1027,7 +1027,7 @@ index 4efcb8b595..60948afa4e 100644
|
|||
return this.b.size();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/SystemUtils.java b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
index 0df534b563..538ed5bb9b 100644
|
||||
index 7b92ecfff..7e224ebef 100644
|
||||
--- a/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
+++ b/src/main/java/net/minecraft/server/SystemUtils.java
|
||||
@@ -58,7 +58,7 @@ public class SystemUtils {
|
||||
|
@ -1040,10 +1040,10 @@ index 0df534b563..538ed5bb9b 100644
|
|||
|
||||
public static long getTimeMillis() {
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7f648dbbc9..1d5e4c5127 100644
|
||||
index 602a395b3..66f74c106 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -210,6 +210,40 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -196,6 +196,40 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
return (Chunk) this.getChunkAt(i, j, ChunkStatus.FULL);
|
||||
}
|
||||
|
||||
|
@ -1084,7 +1084,7 @@ index 7f648dbbc9..1d5e4c5127 100644
|
|||
@Override
|
||||
public IChunkAccess getChunkAt(int i, int j, ChunkStatus chunkstatus, boolean flag) {
|
||||
IChunkAccess ichunkaccess = this.chunkProvider.getChunkAt(i, j, chunkstatus, flag);
|
||||
@@ -371,8 +405,9 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -357,8 +391,9 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
public void a(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
|
||||
|
||||
|
@ -1097,7 +1097,7 @@ index 7f648dbbc9..1d5e4c5127 100644
|
|||
|
||||
return this.setTypeAndData(blockposition, fluid.getBlockData(), 3 | (flag ? 64 : 0));
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index c3a3fbde04..c04ec4a7cb 100644
|
||||
index 2b280e02e..15e3edee2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -85,6 +85,7 @@ public final class CraftItemStack extends ItemStack {
|
||||
|
@ -1109,11 +1109,11 @@ index c3a3fbde04..c04ec4a7cb 100644
|
|||
/**
|
||||
* Mirror
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
index f575b884b0..5bae026dcc 100644
|
||||
index d8358a0f0..d0b813008 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
|
||||
@@ -200,4 +200,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
public boolean b(BlockPosition blockposition, boolean flag) {
|
||||
@@ -196,4 +196,22 @@ public class DummyGeneratorAccess implements GeneratorAccess {
|
||||
public boolean a(BlockPosition blockposition, boolean flag, Entity entity) {
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
+
|
||||
|
@ -1136,5 +1136,5 @@ index f575b884b0..5bae026dcc 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 134dd7a13348a225d87c34327bef514765fd2a3e Mon Sep 17 00:00:00 2001
|
||||
From 6cb23c0849c8579aecb73ffe391df83526bd6281 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 01:40:13 -0400
|
||||
Subject: [PATCH] Add MinecraftKey Information to Objects
|
||||
|
@ -19,7 +19,7 @@ index db899937b..eecf27370 100644
|
|||
MutablePair<Integer, Map<ChunkCoordIntPair, Integer>> info = list.computeIfAbsent(key, k -> MutablePair.of(0, Maps.newHashMap()));
|
||||
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
|
||||
index d4dff9158..1519e481f 100644
|
||||
index da19b682a..a203f5d14 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -49,7 +49,7 @@ import org.bukkit.event.player.PlayerTeleportEvent;
|
||||
|
@ -31,7 +31,7 @@ index d4dff9158..1519e481f 100644
|
|||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@@ -1732,12 +1732,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
@@ -1708,12 +1708,31 @@ public abstract class Entity implements INamableTileEntity, ICommandListener {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -65,16 +65,16 @@ index d4dff9158..1519e481f 100644
|
|||
|
||||
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
|
||||
index 335877889..a7fc34f85 100644
|
||||
index 755d34e61..d49ad0308 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTypes.java
|
||||
@@ -236,6 +236,7 @@ public class EntityTypes<T extends Entity> {
|
||||
@@ -237,6 +237,7 @@ public class EntityTypes<T extends Entity> {
|
||||
}
|
||||
}
|
||||
|
||||
+ public boolean isPersistable() { return a(); } // Paper - OBFHELPER
|
||||
public boolean a() {
|
||||
return this.bb;
|
||||
return this.bc;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/KeyedObject.java b/src/main/java/net/minecraft/server/KeyedObject.java
|
||||
new file mode 100644
|
||||
|
@ -92,7 +92,7 @@ index 000000000..743142d03
|
|||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 33dec830e..7f480b3b3 100644
|
||||
index 40752f761..9071bb7ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -11,7 +11,7 @@ import org.bukkit.inventory.InventoryHolder;
|
||||
|
@ -108,13 +108,13 @@ index 33dec830e..7f480b3b3 100644
|
|||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
// CraftBukkit end
|
||||
private static final Logger LOGGER = LogManager.getLogger();
|
||||
- private final TileEntityTypes<?> b;
|
||||
+ private final TileEntityTypes<?> b; public TileEntityTypes getTileEntityType() { return b; } // Paper - OBFHELPER
|
||||
- private final TileEntityTypes<?> tileType;
|
||||
+ private final TileEntityTypes<?> tileType; public TileEntityTypes getTileEntityType() { return tileType; } // Paper - OBFHELPER
|
||||
@Nullable
|
||||
protected World world;
|
||||
protected BlockPosition position;
|
||||
@@ -33,6 +33,26 @@ public abstract class TileEntity {
|
||||
this.b = tileentitytypes;
|
||||
this.tileType = tileentitytypes;
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -141,5 +141,5 @@ index 33dec830e..7f480b3b3 100644
|
|||
public World getWorld() {
|
||||
return this.world;
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 92d78e2c8e6c305184f27034b3be19a8799aed6e Mon Sep 17 00:00:00 2001
|
||||
From 90f7a4116fa55f0b41e47a9702a7eaad2cc67d4d Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 02:10:36 -0400
|
||||
Subject: [PATCH] Store reference to current Chunk for Entity and Block
|
||||
|
@ -8,12 +8,12 @@ This enables us a fast reference to the entities current chunk instead
|
|||
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
|
||||
index 1cbcefec58..4836d1f715 100644
|
||||
index cfffbd031..125d3acdc 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -29,7 +29,7 @@ public class Chunk implements IChunkAccess {
|
||||
private final ChunkSection[] sections;
|
||||
private final BiomeBase[] d;
|
||||
private BiomeStorage d;
|
||||
private final Map<BlockPosition, NBTTagCompound> e;
|
||||
- public boolean loaded;
|
||||
+ public boolean loaded; public boolean isLoaded() { return loaded; } // Paper - OBFHELPER
|
||||
|
@ -21,7 +21,7 @@ index 1cbcefec58..4836d1f715 100644
|
|||
public final Map<HeightMap.Type, HeightMap> heightMap;
|
||||
private final ChunkConverter i;
|
||||
@@ -55,11 +55,36 @@ public class Chunk implements IChunkAccess {
|
||||
this(world, chunkcoordintpair, abiomebase, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
this(world, chunkcoordintpair, biomestorage, ChunkConverter.a, TickListEmpty.b(), TickListEmpty.b(), 0L, (ChunkSection[]) null, (Consumer) null);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -49,7 +49,7 @@ index 1cbcefec58..4836d1f715 100644
|
|||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
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) {
|
||||
public Chunk(World world, ChunkCoordIntPair chunkcoordintpair, BiomeStorage biomestorage, ChunkConverter chunkconverter, TickList<Block> ticklist, TickList<FluidType> ticklist1, long i, @Nullable ChunkSection[] achunksection, @Nullable Consumer<Chunk> consumer) {
|
||||
this.sections = new ChunkSection[16];
|
||||
this.e = Maps.newHashMap();
|
||||
this.heightMap = Maps.newEnumMap(HeightMap.Type.class);
|
||||
|
@ -58,7 +58,7 @@ index 1cbcefec58..4836d1f715 100644
|
|||
this.l = Maps.newHashMap();
|
||||
this.m = Maps.newHashMap();
|
||||
this.n = new ShortList[16];
|
||||
@@ -366,6 +391,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -361,6 +386,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
entity.inChunk = true;
|
||||
|
@ -66,7 +66,7 @@ index 1cbcefec58..4836d1f715 100644
|
|||
entity.chunkX = this.loc.x;
|
||||
entity.chunkY = k;
|
||||
entity.chunkZ = this.loc.z;
|
||||
@@ -377,6 +403,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -372,6 +398,7 @@ public class Chunk implements IChunkAccess {
|
||||
((HeightMap) this.heightMap.get(heightmap_type)).a(along);
|
||||
}
|
||||
|
||||
|
@ -74,7 +74,7 @@ index 1cbcefec58..4836d1f715 100644
|
|||
public void b(Entity entity) {
|
||||
this.a(entity, entity.chunkY);
|
||||
}
|
||||
@@ -389,8 +416,12 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -384,8 +411,12 @@ public class Chunk implements IChunkAccess {
|
||||
if (i >= this.entitySlices.length) {
|
||||
i = this.entitySlices.length - 1;
|
||||
}
|
||||
|
@ -90,10 +90,10 @@ index 1cbcefec58..4836d1f715 100644
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 1519e481fb..d4954801cb 100644
|
||||
index a203f5d14..2a5e8d34e 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -133,7 +133,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -134,7 +134,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
private static final DataWatcherObject<Boolean> aB = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Boolean> aC = DataWatcher.a(Entity.class, DataWatcherRegistry.i);
|
||||
protected static final DataWatcherObject<EntityPose> POSE = DataWatcher.a(Entity.class, DataWatcherRegistry.s);
|
||||
|
@ -102,7 +102,7 @@ index 1519e481fb..d4954801cb 100644
|
|||
public int chunkX; public int getChunkX() { return chunkX; } // Paper - OBFHELPER
|
||||
public int chunkY; public int getChunkY() { return chunkY; } // Paper - OBFHELPER
|
||||
public int chunkZ; public int getChunkZ() { return chunkZ; } // Paper - OBFHELPER
|
||||
@@ -1733,6 +1733,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1709,6 +1709,39 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
// Paper start
|
||||
|
@ -143,7 +143,7 @@ index 1519e481fb..d4954801cb 100644
|
|||
private String entityKeyString;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 7f480b3b3e..2efaf516ff 100644
|
||||
index 9071bb7ec..820180ab3 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -51,6 +51,15 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
|
@ -163,10 +163,10 @@ index 7f480b3b3e..2efaf516ff 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index f22959ee15..a98f6f3389 100644
|
||||
index 63ecbcd47..c82c21326 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -137,6 +137,7 @@ import net.minecraft.server.EntityZombieVillager;
|
||||
@@ -138,6 +138,7 @@ import net.minecraft.server.EntityZombieVillager;
|
||||
import net.minecraft.server.EnumChatFormat;
|
||||
import net.minecraft.server.IChatBaseComponent;
|
||||
import net.minecraft.server.NBTTagCompound;
|
||||
|
@ -174,7 +174,7 @@ index f22959ee15..a98f6f3389 100644
|
|||
import org.bukkit.EntityEffect;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Server;
|
||||
@@ -178,6 +179,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -179,6 +180,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
this.entity = entity;
|
||||
}
|
||||
|
||||
|
@ -188,5 +188,5 @@ index f22959ee15..a98f6f3389 100644
|
|||
/**
|
||||
* Order is *EXTREMELY* important -- keep it right! =D
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 99e287ab64e89c49290e9d7d1c076d547b90ba75 Mon Sep 17 00:00:00 2001
|
||||
From a5904cd023908ab09a645472a4d04300ae07550a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 4 Jul 2018 02:13:59 -0400
|
||||
Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Store counts for each Entity/Block Entity Type
|
|||
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
|
||||
index dbe7e5c013..8075cc4827 100644
|
||||
index 125d3acdc..dcaf3a509 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -56,15 +56,19 @@ public class Chunk implements IChunkAccess {
|
||||
|
@ -37,7 +37,7 @@ index dbe7e5c013..8075cc4827 100644
|
|||
}
|
||||
return removed;
|
||||
}
|
||||
@@ -390,6 +395,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -385,6 +390,7 @@ public class Chunk implements IChunkAccess {
|
||||
k = this.entitySlices.length - 1;
|
||||
}
|
||||
|
||||
|
@ -45,7 +45,7 @@ index dbe7e5c013..8075cc4827 100644
|
|||
entity.inChunk = true;
|
||||
entity.setCurrentChunk(this); // Paper
|
||||
entity.chunkX = this.loc.x;
|
||||
@@ -421,6 +427,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -416,6 +422,7 @@ public class Chunk implements IChunkAccess {
|
||||
if (!this.entitySlices[i].remove(entity)) {
|
||||
return;
|
||||
}
|
||||
|
@ -54,5 +54,5 @@ index dbe7e5c013..8075cc4827 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 4c63953c6c9a33d2b257fc8fcd781e6291181aba Mon Sep 17 00:00:00 2001
|
||||
From 837594c940509612179c1fa1c2ca6be6c39d9b7e Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 04:00:11 -0600
|
||||
Subject: [PATCH] Timings v2
|
||||
|
@ -329,7 +329,7 @@ index b6d470e59..f402a29b0 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Block.java b/src/main/java/net/minecraft/server/Block.java
|
||||
index abba434da..1426bd01a 100644
|
||||
index 0bae8a335..e485d4a82 100644
|
||||
--- a/src/main/java/net/minecraft/server/Block.java
|
||||
+++ b/src/main/java/net/minecraft/server/Block.java
|
||||
@@ -31,6 +31,15 @@ public class Block implements IMaterial {
|
||||
|
@ -347,12 +347,12 @@ index abba434da..1426bd01a 100644
|
|||
+ // Paper end
|
||||
protected final MaterialMapColor t;
|
||||
private final float frictionFactor;
|
||||
protected final BlockStateList<Block, IBlockData> blockStateList;
|
||||
private final float f;
|
||||
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
|
||||
index 3ed48be38..c4d989f70 100644
|
||||
index dcaf3a509..5f9031257 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -573,6 +573,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -567,6 +567,7 @@ public class Chunk implements IChunkAccess {
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(this.bukkitChunk, this.needsDecoration));
|
||||
|
||||
if (this.needsDecoration) {
|
||||
|
@ -360,7 +360,7 @@ index 3ed48be38..c4d989f70 100644
|
|||
this.needsDecoration = false;
|
||||
java.util.Random random = new java.util.Random();
|
||||
random.setSeed(world.getSeed());
|
||||
@@ -592,6 +593,7 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -586,6 +587,7 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
}
|
||||
server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
|
||||
|
@ -369,7 +369,7 @@ index 3ed48be38..c4d989f70 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
index 3b785a3ad..15480a8df 100644
|
||||
index c5121d369..459baf26d 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java
|
||||
@@ -129,11 +129,13 @@ public class ChunkProviderServer extends IChunkProvider {
|
||||
|
@ -439,7 +439,7 @@ index 3b785a3ad..15480a8df 100644
|
|||
+ this.world.timings.chunkRangeCheckBig.stopTiming();
|
||||
+ if (bigRadiusOutsideRange) {
|
||||
+ // Paper end
|
||||
chunk.b(chunk.q() + j);
|
||||
chunk.setInhabitedTime(chunk.getInhabitedTime() + j);
|
||||
- if (flag1 && (this.allowMonsters || this.allowAnimals) && this.world.getWorldBorder().isInBounds(chunk.getPos()) && !this.playerChunkMap.isOutsideOfRange(chunkcoordintpair, true)) { // Spigot
|
||||
+ // Paper start - timings
|
||||
+ this.world.timings.chunkRangeCheckSmall.startTiming();
|
||||
|
@ -481,7 +481,7 @@ index 3b785a3ad..15480a8df 100644
|
|||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/ChunkRegionLoader.java b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
index 28bf9e14d..03be77299 100644
|
||||
index e16d30f2c..4af5a230b 100644
|
||||
--- a/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
+++ b/src/main/java/net/minecraft/server/ChunkRegionLoader.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -491,7 +491,7 @@ index 28bf9e14d..03be77299 100644
|
|||
import com.google.common.collect.Maps;
|
||||
import it.unimi.dsi.fastutil.longs.LongOpenHashSet;
|
||||
import it.unimi.dsi.fastutil.longs.LongSet;
|
||||
@@ -407,7 +408,7 @@ public class ChunkRegionLoader {
|
||||
@@ -388,7 +389,7 @@ public class ChunkRegionLoader {
|
||||
private static void loadEntities(NBTTagCompound nbttagcompound, Chunk chunk) {
|
||||
NBTTagList nbttaglist = nbttagcompound.getList("Entities", 10);
|
||||
World world = chunk.getWorld();
|
||||
|
@ -500,7 +500,7 @@ index 28bf9e14d..03be77299 100644
|
|||
|
||||
for (int i = 0; i < nbttaglist.size(); ++i) {
|
||||
NBTTagCompound nbttagcompound1 = nbttaglist.getCompound(i);
|
||||
@@ -419,8 +420,6 @@ public class ChunkRegionLoader {
|
||||
@@ -400,8 +401,6 @@ public class ChunkRegionLoader {
|
||||
chunk.d(true);
|
||||
}
|
||||
|
||||
|
@ -509,7 +509,7 @@ index 28bf9e14d..03be77299 100644
|
|||
NBTTagList nbttaglist1 = nbttagcompound.getList("TileEntities", 10);
|
||||
|
||||
for (int j = 0; j < nbttaglist1.size(); ++j) {
|
||||
@@ -437,7 +436,7 @@ public class ChunkRegionLoader {
|
||||
@@ -418,7 +417,7 @@ public class ChunkRegionLoader {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -519,7 +519,7 @@ index 28bf9e14d..03be77299 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/CustomFunction.java b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||
index 12885cbd6..49de6e997 100644
|
||||
index c3218fbc3..94195a7f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/CustomFunction.java
|
||||
+++ b/src/main/java/net/minecraft/server/CustomFunction.java
|
||||
@@ -13,12 +13,22 @@ public class CustomFunction {
|
||||
|
@ -546,7 +546,7 @@ index 12885cbd6..49de6e997 100644
|
|||
return this.b;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/CustomFunctionData.java b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||
index 53735b52a..721839b4c 100644
|
||||
index 334de8b04..872a6cbbb 100644
|
||||
--- a/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||
+++ b/src/main/java/net/minecraft/server/CustomFunctionData.java
|
||||
@@ -101,7 +101,7 @@ public class CustomFunctionData implements IResourcePackListener {
|
||||
|
@ -559,7 +559,7 @@ index 53735b52a..721839b4c 100644
|
|||
int j = 0;
|
||||
CustomFunction.c[] acustomfunction_c = customfunction.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/DedicatedServer.java b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
index e6cf90484..ce3ca4830 100644
|
||||
index 20ed423fa..141673d00 100644
|
||||
--- a/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/DedicatedServer.java
|
||||
@@ -19,6 +19,8 @@ import java.util.Collections;
|
||||
|
@ -647,7 +647,7 @@ index e6cf90484..ce3ca4830 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index d4954801c..fd4712c71 100644
|
||||
index 2a5e8d34e..bf059dc86 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -29,7 +29,8 @@ import org.bukkit.command.CommandSender;
|
||||
|
@ -660,7 +660,7 @@ index d4954801c..fd4712c71 100644
|
|||
import org.bukkit.event.entity.EntityCombustByEntityEvent;
|
||||
import org.bukkit.event.hanging.HangingBreakByEntityEvent;
|
||||
import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
|
||||
@@ -161,7 +162,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -165,7 +166,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public boolean valid;
|
||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean forceExplosionKnockback; // SPIGOT-949
|
||||
|
@ -669,7 +669,7 @@ index d4954801c..fd4712c71 100644
|
|||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -496,7 +497,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -505,7 +506,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
}
|
||||
|
||||
public void move(EnumMoveType enummovetype, Vec3D vec3d) {
|
||||
|
@ -677,19 +677,19 @@ index d4954801c..fd4712c71 100644
|
|||
if (this.noclip) {
|
||||
this.a(this.getBoundingBox().b(vec3d));
|
||||
this.recalcPosition();
|
||||
@@ -661,7 +661,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -657,7 +657,6 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
- org.bukkit.craftbukkit.SpigotTimings.entityMoveTimer.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
protected Vec3D a(Vec3D vec3d, EnumMoveType enummovetype) {
|
||||
protected BlockPosition ag() {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 2b13f4c9f..47379046d 100644
|
||||
index 138bc38e6..906ca1bfa 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -35,7 +35,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
@@ -37,7 +37,7 @@ import org.bukkit.event.entity.EntityTeleportEvent;
|
||||
import org.bukkit.event.player.PlayerItemConsumeEvent;
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -698,25 +698,25 @@ index 2b13f4c9f..47379046d 100644
|
|||
|
||||
public abstract class EntityLiving extends Entity {
|
||||
|
||||
@@ -2215,7 +2215,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2260,7 +2260,6 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
@Override
|
||||
public void tick() {
|
||||
- SpigotTimings.timerEntityBaseTick.startTiming(); // Spigot
|
||||
super.tick();
|
||||
this.o();
|
||||
this.p();
|
||||
@@ -2290,9 +2289,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.r();
|
||||
@@ -2348,9 +2347,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
- SpigotTimings.timerEntityBaseTick.stopTiming(); // Spigot
|
||||
this.movementTick();
|
||||
- SpigotTimings.timerEntityTickRest.startTiming(); // Spigot
|
||||
double d0 = this.locX - this.lastX;
|
||||
double d1 = this.locZ - this.lastZ;
|
||||
double d0 = this.locX() - this.lastX;
|
||||
double d1 = this.locZ() - this.lastZ;
|
||||
float f = (float) (d0 * d0 + d1 * d1);
|
||||
@@ -2372,8 +2369,6 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2430,8 +2427,6 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.isSleeping()) {
|
||||
this.pitch = 0.0F;
|
||||
}
|
||||
|
@ -724,16 +724,16 @@ index 2b13f4c9f..47379046d 100644
|
|||
- SpigotTimings.timerEntityTickRest.stopTiming(); // Spigot
|
||||
}
|
||||
|
||||
protected float e(float f, float f1) {
|
||||
@@ -2447,7 +2442,6 @@ public abstract class EntityLiving extends Entity {
|
||||
protected float f(float f, float f1) {
|
||||
@@ -2510,7 +2505,6 @@ public abstract class EntityLiving extends Entity {
|
||||
|
||||
this.setMot(d4, d5, d6);
|
||||
this.world.getMethodProfiler().enter("ai");
|
||||
- SpigotTimings.timerEntityAI.startTiming(); // Spigot
|
||||
if (this.isFrozen()) {
|
||||
this.jumping = false;
|
||||
this.bb = 0.0F;
|
||||
@@ -2458,7 +2452,6 @@ public abstract class EntityLiving extends Entity {
|
||||
this.aZ = 0.0F;
|
||||
@@ -2520,7 +2514,6 @@ public abstract class EntityLiving extends Entity {
|
||||
this.doTick();
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
|
@ -741,17 +741,17 @@ index 2b13f4c9f..47379046d 100644
|
|||
|
||||
this.world.getMethodProfiler().exit();
|
||||
this.world.getMethodProfiler().enter("jump");
|
||||
@@ -2483,9 +2476,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -2544,9 +2537,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.n();
|
||||
AxisAlignedBB axisalignedbb = this.getBoundingBox();
|
||||
|
||||
- SpigotTimings.timerEntityAIMove.startTiming(); // Spigot
|
||||
this.e(new Vec3D((double) this.bb, (double) this.bc, (double) this.bd));
|
||||
this.e(new Vec3D((double) this.aZ, (double) this.ba, (double) this.bb));
|
||||
- SpigotTimings.timerEntityAIMove.stopTiming(); // Spigot
|
||||
this.world.getMethodProfiler().exit();
|
||||
this.world.getMethodProfiler().enter("push");
|
||||
if (this.bq > 0) {
|
||||
@@ -2493,9 +2484,7 @@ public abstract class EntityLiving extends Entity {
|
||||
if (this.bn > 0) {
|
||||
@@ -2554,9 +2545,7 @@ public abstract class EntityLiving extends Entity {
|
||||
this.a(axisalignedbb, this.getBoundingBox());
|
||||
}
|
||||
|
||||
|
@ -762,7 +762,7 @@ index 2b13f4c9f..47379046d 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index cec3794cd..c76f262db 100644
|
||||
index 0d78187ae..490de37b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -63,7 +63,7 @@ import org.bukkit.craftbukkit.CraftServer;
|
||||
|
@ -785,7 +785,7 @@ index cec3794cd..c76f262db 100644
|
|||
private final IReloadableResourceManager ae;
|
||||
private final ResourcePackRepository<ResourcePackLoader> resourcePackRepository;
|
||||
@Nullable
|
||||
@@ -685,6 +685,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -693,6 +693,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
// CraftBukkit end
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
|
@ -793,7 +793,7 @@ index cec3794cd..c76f262db 100644
|
|||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@@ -875,6 +876,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -883,6 +884,16 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
return this.forceTicks || this.isEntered() || SystemUtils.getMonotonicMillis() < (this.ac ? this.ab : this.nextTick);
|
||||
}
|
||||
|
||||
|
@ -810,7 +810,7 @@ index cec3794cd..c76f262db 100644
|
|||
private void executeModerately() {
|
||||
this.executeAll();
|
||||
java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
|
||||
@@ -882,9 +893,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -890,9 +901,9 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// CraftBukkit end
|
||||
|
||||
protected void sleepForTick() {
|
||||
|
@ -822,7 +822,7 @@ index cec3794cd..c76f262db 100644
|
|||
});
|
||||
}
|
||||
|
||||
@@ -962,7 +973,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -970,7 +981,14 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
protected void exit() {}
|
||||
|
||||
protected void a(BooleanSupplier booleansupplier) {
|
||||
|
@ -838,7 +838,7 @@ index cec3794cd..c76f262db 100644
|
|||
this.slackActivityAccountant.tickStarted(); // Spigot
|
||||
long i = SystemUtils.getMonotonicNanos();
|
||||
|
||||
@@ -983,14 +1001,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -991,14 +1009,12 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
if (autosavePeriod > 0 && this.ticks % autosavePeriod == 0) { // CraftBukkit
|
||||
|
@ -853,7 +853,7 @@ index cec3794cd..c76f262db 100644
|
|||
}
|
||||
|
||||
this.methodProfiler.enter("snooper");
|
||||
@@ -1013,30 +1029,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1021,30 +1037,34 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
this.methodProfiler.exit();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
this.slackActivityAccountant.tickEnded(l); // Spigot
|
||||
|
@ -897,7 +897,7 @@ index cec3794cd..c76f262db 100644
|
|||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
if (this.ticks % 20 == 0) {
|
||||
for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
|
||||
@@ -1044,7 +1064,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1052,7 +1072,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
entityplayer.playerConnection.sendPacket(new PacketPlayOutUpdateTime(entityplayer.world.getTime(), entityplayer.getPlayerTime(), entityplayer.world.getGameRules().getBoolean(GameRules.DO_DAYLIGHT_CYCLE))); // Add support for per player time
|
||||
}
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ index cec3794cd..c76f262db 100644
|
|||
|
||||
while (iterator.hasNext()) {
|
||||
WorldServer worldserver = (WorldServer) iterator.next();
|
||||
@@ -1087,20 +1107,20 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1095,24 +1115,24 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
this.methodProfiler.exitEnter("connection");
|
||||
|
@ -921,6 +921,10 @@ index cec3794cd..c76f262db 100644
|
|||
this.playerList.tick();
|
||||
- SpigotTimings.playerListTimer.stopTiming(); // Spigot
|
||||
+ MinecraftTimings.playerListTimer.stopTiming(); // Spigot // Paper
|
||||
if (SharedConstants.b) {
|
||||
GameTestHarnessTicker.a.b();
|
||||
}
|
||||
|
||||
this.methodProfiler.exitEnter("server gui refresh");
|
||||
|
||||
- SpigotTimings.tickablesTimer.startTiming(); // Spigot
|
||||
|
@ -934,7 +938,7 @@ index cec3794cd..c76f262db 100644
|
|||
this.methodProfiler.exit();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index e81de0971..049ca1b4f 100644
|
||||
index ae0b9208a..b8fa59775 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1,7 +1,9 @@
|
||||
|
@ -947,7 +951,7 @@ index e81de0971..049ca1b4f 100644
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Queues;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -471,8 +473,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -473,8 +475,11 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
private CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> f(ChunkCoordIntPair chunkcoordintpair) {
|
||||
return CompletableFuture.supplyAsync(() -> {
|
||||
|
@ -961,7 +965,7 @@ index e81de0971..049ca1b4f 100644
|
|||
|
||||
if (nbttagcompound != null) {
|
||||
boolean flag = nbttagcompound.hasKeyOfType("Level", 10) && nbttagcompound.getCompound("Level").hasKeyOfType("Status", 8);
|
||||
@@ -509,7 +514,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -511,7 +516,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
});
|
||||
|
||||
return completablefuture.thenComposeAsync((either) -> {
|
||||
|
@ -970,7 +974,7 @@ index e81de0971..049ca1b4f 100644
|
|||
try {
|
||||
CompletableFuture<Either<IChunkAccess, PlayerChunk.Failure>> completablefuture1 = chunkstatus.a(this.world, this.chunkGenerator, this.definedStructureManager, this.lightEngine, (ichunkaccess) -> {
|
||||
return this.c(playerchunk);
|
||||
@@ -562,6 +567,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -564,6 +569,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
ChunkStatus chunkstatus = PlayerChunk.getChunkStatus(playerchunk.getTicketLevel());
|
||||
|
||||
return !chunkstatus.b(ChunkStatus.FULL) ? PlayerChunk.UNLOADED_CHUNK_ACCESS : either.mapLeft((ichunkaccess) -> {
|
||||
|
@ -978,7 +982,7 @@ index e81de0971..049ca1b4f 100644
|
|||
ChunkCoordIntPair chunkcoordintpair = playerchunk.i();
|
||||
Chunk chunk;
|
||||
|
||||
@@ -613,6 +619,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -615,6 +621,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
}
|
||||
|
||||
return chunk;
|
||||
|
@ -986,7 +990,7 @@ index e81de0971..049ca1b4f 100644
|
|||
});
|
||||
}, (runnable) -> {
|
||||
Mailbox mailbox = this.mailboxMain;
|
||||
@@ -1049,6 +1056,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1051,6 +1058,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
|
||||
PlayerChunkMap.EntityTracker playerchunkmap_entitytracker;
|
||||
ObjectIterator objectiterator;
|
||||
|
@ -994,25 +998,29 @@ index e81de0971..049ca1b4f 100644
|
|||
|
||||
for (objectiterator = this.trackedEntities.values().iterator(); objectiterator.hasNext(); playerchunkmap_entitytracker.trackerEntry.a()) {
|
||||
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
|
||||
@@ -1066,13 +1074,16 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1068,16 +1076,20 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
playerchunkmap_entitytracker.e = sectionposition1;
|
||||
}
|
||||
}
|
||||
+ world.timings.tracker1.stopTiming(); // Paper
|
||||
|
||||
objectiterator = this.trackedEntities.values().iterator();
|
||||
if (!list.isEmpty()) {
|
||||
objectiterator = this.trackedEntities.values().iterator();
|
||||
|
||||
+ world.timings.tracker2.startTiming(); // Paper
|
||||
while (objectiterator.hasNext()) {
|
||||
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
|
||||
playerchunkmap_entitytracker.track(list);
|
||||
+ world.timings.tracker2.startTiming(); // Paper
|
||||
while (objectiterator.hasNext()) {
|
||||
playerchunkmap_entitytracker = (PlayerChunkMap.EntityTracker) objectiterator.next();
|
||||
playerchunkmap_entitytracker.track(list);
|
||||
}
|
||||
+ world.timings.tracker2.stopTiming(); // Paper
|
||||
}
|
||||
+ world.timings.tracker2.stopTiming(); // Paper
|
||||
|
||||
+
|
||||
}
|
||||
|
||||
protected void broadcast(Entity entity, Packet<?> packet) {
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 301b1c082..36c56773f 100644
|
||||
index b257e1c4e..b7beb058d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -58,6 +58,7 @@ import org.bukkit.inventory.CraftingInventory;
|
||||
|
@ -1029,9 +1037,9 @@ index 301b1c082..36c56773f 100644
|
|||
public void tick() {
|
||||
- org.bukkit.craftbukkit.SpigotTimings.playerConnectionTimer.startTiming(); // Spigot
|
||||
this.syncPosition();
|
||||
this.player.playerTick();
|
||||
this.player.setLocation(this.l, this.m, this.n, this.player.yaw, this.player.pitch);
|
||||
@@ -208,7 +208,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.player.lastX = this.player.locX();
|
||||
this.player.lastY = this.player.locY();
|
||||
@@ -211,7 +211,6 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.player.resetIdleTimer(); // CraftBukkit - SPIGOT-854
|
||||
this.disconnect(new ChatMessage("multiplayer.disconnect.idling", new Object[0]));
|
||||
}
|
||||
|
@ -1039,7 +1047,7 @@ index 301b1c082..36c56773f 100644
|
|||
|
||||
}
|
||||
|
||||
@@ -1622,7 +1621,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1638,7 +1637,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
// CraftBukkit end
|
||||
|
||||
private void handleCommand(String s) {
|
||||
|
@ -1048,7 +1056,7 @@ index 301b1c082..36c56773f 100644
|
|||
// CraftBukkit start - whole method
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getName() + " issued server command: " + s);
|
||||
@@ -1633,7 +1632,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1649,7 +1648,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
this.server.getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
|
@ -1057,7 +1065,7 @@ index 301b1c082..36c56773f 100644
|
|||
return;
|
||||
}
|
||||
|
||||
@@ -1646,7 +1645,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1662,7 +1661,7 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
|
||||
return;
|
||||
} finally {
|
||||
|
@ -1094,7 +1102,7 @@ index a677ec74d..e928525b8 100644
|
|||
PlayerConnectionUtils.LOGGER.debug("Ignoring packet due to disconnection: " + packet);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerList.java b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
index ee22d6c81..fb6b48e3f 100644
|
||||
index 0694f4563..1652a57e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerList.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -1104,7 +1112,7 @@ index ee22d6c81..fb6b48e3f 100644
|
|||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -895,10 +896,11 @@ public abstract class PlayerList {
|
||||
@@ -898,10 +899,11 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void savePlayers() {
|
||||
|
@ -1168,7 +1176,7 @@ index 00bbd34b6..f533860bb 100644
|
|||
this.g.clear();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 2efaf516f..22a8ea916 100644
|
||||
index 820180ab3..fa6400dcc 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -9,11 +9,12 @@ import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
|
||||
|
@ -1187,7 +1195,7 @@ index 2efaf516f..22a8ea916 100644
|
|||
private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
|
||||
public CraftPersistentDataContainer persistentDataContainer;
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index a71d7a80c..67cfcdd60 100644
|
||||
index 66f74c106..542262fc8 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -1,5 +1,7 @@
|
||||
|
@ -1206,7 +1214,7 @@ index a71d7a80c..67cfcdd60 100644
|
|||
import org.bukkit.craftbukkit.CraftServer;
|
||||
import org.bukkit.craftbukkit.CraftWorld;
|
||||
import org.bukkit.craftbukkit.block.CraftBlockState;
|
||||
@@ -88,7 +89,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -87,7 +88,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
public final com.destroystokyo.paper.PaperWorldConfig paperConfig; // Paper
|
||||
|
||||
|
@ -1215,7 +1223,7 @@ index a71d7a80c..67cfcdd60 100644
|
|||
public static BlockPosition lastPhysicsProblem; // Spigot
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
@@ -150,7 +151,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -150,7 +151,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public void c(WorldBorder worldborder, double d0) {}
|
||||
});
|
||||
// CraftBukkit end
|
||||
|
@ -1224,7 +1232,7 @@ index a71d7a80c..67cfcdd60 100644
|
|||
this.entityLimiter = new org.spigotmc.TickLimiter(spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
@@ -773,15 +774,14 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -746,15 +747,14 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
}
|
||||
|
||||
timings.tileEntityPending.stopTiming(); // Spigot
|
||||
|
@ -1242,18 +1250,19 @@ index a71d7a80c..67cfcdd60 100644
|
|||
CrashReport crashreport = CrashReport.a(throwable, "Ticking entity");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being ticked");
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index f4cefa00f..ef9abdc28 100644
|
||||
index ecb356013..c38963526 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1,5 +1,7 @@
|
||||
@@ -1,6 +1,8 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
+import co.aikar.timings.TimingHistory;
|
||||
+import co.aikar.timings.Timings;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
+import co.aikar.timings.TimingHistory; // Paper
|
||||
+import co.aikar.timings.Timings; // Paper
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Queues;
|
||||
@@ -38,7 +40,6 @@ import org.apache.logging.log4j.Logger;
|
||||
@@ -40,7 +42,6 @@ import org.apache.logging.log4j.Logger;
|
||||
import java.util.logging.Level;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.WeatherType;
|
||||
|
@ -1261,7 +1270,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
import org.bukkit.event.entity.CreatureSpawnEvent;
|
||||
import org.bukkit.event.server.MapInitializeEvent;
|
||||
@@ -94,10 +95,10 @@ public class WorldServer extends World {
|
||||
@@ -96,11 +97,16 @@ public class WorldServer extends World {
|
||||
// CraftBukkit end
|
||||
this.nextTickListBlock = new TickListServer<>(this, (block) -> {
|
||||
return block == null || block.getBlockData().isAir();
|
||||
|
@ -1269,13 +1278,18 @@ index f4cefa00f..ef9abdc28 100644
|
|||
+ }, IRegistry.BLOCK::getKey, IRegistry.BLOCK::get, this::b, "Blocks"); // Paper - Timings
|
||||
this.nextTickListFluid = new TickListServer<>(this, (fluidtype) -> {
|
||||
return fluidtype == null || fluidtype == FluidTypes.EMPTY;
|
||||
- }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a);
|
||||
+<<<<<<< HEAD
|
||||
}, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a);
|
||||
this.navigators = Sets.newHashSet();
|
||||
+=======
|
||||
+ }, IRegistry.FLUID::getKey, IRegistry.FLUID::get, this::a, "Fluids"); // Paper - Timings
|
||||
this.H = Sets.newHashSet();
|
||||
+ this.H = Sets.newHashSet();
|
||||
+>>>>>>> Timings v2
|
||||
this.I = new ObjectLinkedOpenHashSet();
|
||||
this.dataManager = worldnbtstorage;
|
||||
@@ -291,24 +292,28 @@ public class WorldServer extends World {
|
||||
this.M();
|
||||
this.server = minecraftserver;
|
||||
@@ -296,20 +302,28 @@ public class WorldServer extends World {
|
||||
this.N();
|
||||
this.a();
|
||||
gameprofilerfiller.exitEnter("chunkSource");
|
||||
+ this.timings.chunkProviderTick.startTiming(); // Paper - timings
|
||||
|
@ -1291,13 +1305,13 @@ index f4cefa00f..ef9abdc28 100644
|
|||
- timings.doTickPending.stopTiming(); // Spigot
|
||||
+ timings.scheduledBlocks.stopTiming(); // Spigot
|
||||
|
||||
gameprofilerfiller.exitEnter("portalForcer");
|
||||
timings.doPortalForcer.startTiming(); // Spigot
|
||||
this.portalTravelAgent.a(this.getTime());
|
||||
timings.doPortalForcer.stopTiming(); // Spigot
|
||||
gameprofilerfiller.exitEnter("raid");
|
||||
+<<<<<<< HEAD
|
||||
this.persistentRaid.a();
|
||||
+=======
|
||||
+ this.timings.raids.startTiming(); // Paper - timings
|
||||
this.c.a();
|
||||
+ this.c.a();
|
||||
+>>>>>>> Timings v2
|
||||
if (this.mobSpawnerTrader != null) {
|
||||
this.mobSpawnerTrader.a();
|
||||
}
|
||||
|
@ -1305,7 +1319,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
|
||||
gameprofilerfiller.exitEnter("blockEvents");
|
||||
timings.doSounds.startTiming(); // Spigot
|
||||
@@ -351,6 +356,7 @@ public class WorldServer extends World {
|
||||
@@ -352,6 +366,7 @@ public class WorldServer extends World {
|
||||
|
||||
org.spigotmc.ActivationRange.activateEntities(this); // Spigot
|
||||
timings.entityTick.startTiming(); // Spigot
|
||||
|
@ -1313,7 +1327,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
while (objectiterator.hasNext()) {
|
||||
Entry<Entity> entry = (Entry) objectiterator.next();
|
||||
Entity entity1 = (Entity) entry.getValue();
|
||||
@@ -377,6 +383,7 @@ public class WorldServer extends World {
|
||||
@@ -384,6 +399,7 @@ public class WorldServer extends World {
|
||||
gameprofilerfiller.enter("tick");
|
||||
if (!entity1.dead && !(entity1 instanceof EntityComplexPart)) {
|
||||
this.a(this::entityJoinedWorld, entity1);
|
||||
|
@ -1321,7 +1335,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
}
|
||||
|
||||
gameprofilerfiller.exit();
|
||||
@@ -393,9 +400,11 @@ public class WorldServer extends World {
|
||||
@@ -400,9 +416,11 @@ public class WorldServer extends World {
|
||||
|
||||
this.tickingEntities = false;
|
||||
|
||||
|
@ -1333,7 +1347,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
|
||||
gameprofilerfiller.exit();
|
||||
timings.tickEntities.stopTiming(); // Spigot
|
||||
@@ -454,6 +463,7 @@ public class WorldServer extends World {
|
||||
@@ -467,6 +485,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
gameprofilerfiller.exitEnter("tickBlocks");
|
||||
|
@ -1341,7 +1355,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
if (i > 0) {
|
||||
ChunkSection[] achunksection = chunk.getSections();
|
||||
int l = achunksection.length;
|
||||
@@ -485,7 +495,7 @@ public class WorldServer extends World {
|
||||
@@ -498,7 +517,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1350,7 +1364,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
gameprofilerfiller.exit();
|
||||
}
|
||||
|
||||
@@ -780,6 +790,7 @@ public class WorldServer extends World {
|
||||
@@ -780,6 +799,7 @@ public class WorldServer extends World {
|
||||
|
||||
if (!flag1) {
|
||||
org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
|
||||
|
@ -1358,7 +1372,7 @@ index f4cefa00f..ef9abdc28 100644
|
|||
if (iprogressupdate != null) {
|
||||
iprogressupdate.a(new ChatMessage("menu.savingLevel", new Object[0]));
|
||||
}
|
||||
@@ -789,7 +800,10 @@ public class WorldServer extends World {
|
||||
@@ -789,7 +809,10 @@ public class WorldServer extends World {
|
||||
iprogressupdate.c(new ChatMessage("menu.savingChunks", new Object[0]));
|
||||
}
|
||||
|
||||
|
@ -1370,10 +1384,10 @@ index f4cefa00f..ef9abdc28 100644
|
|||
|
||||
// CraftBukkit start - moved from MinecraftServer.saveChunks
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index dce5bde54..a59f61e73 100644
|
||||
index a72238a9d..c2fcdfb49 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1932,12 +1932,31 @@ public final class CraftServer implements Server {
|
||||
@@ -1935,12 +1935,31 @@ public final class CraftServer implements Server {
|
||||
private final Spigot spigot = new Spigot()
|
||||
{
|
||||
|
||||
|
@ -1407,10 +1421,10 @@ index dce5bde54..a59f61e73 100644
|
|||
org.spigotmc.RestartCommand.restart();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java b/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
deleted file mode 100644
|
||||
index b98a7b56a..000000000
|
||||
index 2bd22a369..000000000
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/SpigotTimings.java
|
||||
+++ /dev/null
|
||||
@@ -1,164 +0,0 @@
|
||||
@@ -1,162 +0,0 @@
|
||||
-package org.bukkit.craftbukkit;
|
||||
-
|
||||
-import java.util.HashMap;
|
||||
|
@ -1528,7 +1542,6 @@ index b98a7b56a..000000000
|
|||
- public static class WorldTimingsHandler {
|
||||
- public final CustomTimingsHandler mobSpawn;
|
||||
- public final CustomTimingsHandler doChunkUnload;
|
||||
- public final CustomTimingsHandler doPortalForcer;
|
||||
- public final CustomTimingsHandler doTickPending;
|
||||
- public final CustomTimingsHandler doTickTiles;
|
||||
- public final CustomTimingsHandler doChunkMap;
|
||||
|
@ -1556,7 +1569,6 @@ index b98a7b56a..000000000
|
|||
- doTickTiles = new CustomTimingsHandler("** " + name + "doTickTiles");
|
||||
- doChunkMap = new CustomTimingsHandler("** " + name + "doChunkMap");
|
||||
- doSounds = new CustomTimingsHandler("** " + name + "doSounds");
|
||||
- doPortalForcer = new CustomTimingsHandler("** " + name + "doPortalForcer");
|
||||
- entityTick = new CustomTimingsHandler("** " + name + "entityTick");
|
||||
- tileEntityTick = new CustomTimingsHandler("** " + name + "tileEntityTick");
|
||||
- tileEntityPending = new CustomTimingsHandler("** " + name + "tileEntityPending");
|
||||
|
@ -1576,10 +1588,10 @@ index b98a7b56a..000000000
|
|||
- }
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e434738cb..9f5080b23 100644
|
||||
index 9857b28a3..b26dff0a7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1749,6 +1749,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1727,6 +1727,14 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
packet.components = components;
|
||||
getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
@ -1758,7 +1770,7 @@ index e52ef47b7..3d90b3426 100644
|
|||
this.value = value;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index dd602243d..924ab7f54 100644
|
||||
index 8e23c4750..48a191ae0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -288,6 +288,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 149a9daedf9ca698bc0cb9a0f67af2c293f01858 Mon Sep 17 00:00:00 2001
|
||||
From b458fdb658f363161232e689d2ec1ebf3fcbf8b5 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 13:02:51 -0600
|
||||
Subject: [PATCH] Configurable cactus and reed natural growth heights
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index a738657394..098bd3fba8 100644
|
||||
index a73865739..098bd3fba 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -64,4 +64,13 @@ public class PaperWorldConfig {
|
||||
|
@ -23,7 +23,7 @@ index a738657394..098bd3fba8 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockCactus.java b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
index a26e794124..29f9ff6c18 100644
|
||||
index 1e1d02dc7..4c82fe335 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockCactus.java
|
||||
@@ -30,7 +30,7 @@ public class BlockCactus extends Block {
|
||||
|
@ -34,9 +34,9 @@ index a26e794124..29f9ff6c18 100644
|
|||
+ if (i < world.paperConfig.cactusMaxHeight) { // Paper - Configurable growth height
|
||||
int j = (Integer) iblockdata.get(BlockCactus.AGE);
|
||||
|
||||
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.cactusModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockReed.java b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
index 4d5f485f0f..ff674a9d5b 100644
|
||||
index 2106b0b49..baa2ed2b6 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockReed.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockReed.java
|
||||
@@ -29,7 +29,7 @@ public class BlockReed extends Block {
|
||||
|
@ -47,7 +47,7 @@ index 4d5f485f0f..ff674a9d5b 100644
|
|||
+ if (i < world.paperConfig.reedMaxHeight) { // Paper - Configurable growth height
|
||||
int j = (Integer) iblockdata.get(BlockReed.AGE);
|
||||
|
||||
if (j >= (byte) range(3, ((100.0F / world.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
if (j >= (byte) range(3, ((100.0F / worldserver.spigotConfig.caneModifier) * 15) + 0.5F, 15)) { // Spigot
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 25cefafc2d98a1e48a7c89eba39e0aaa4dbf0e51 Mon Sep 17 00:00:00 2001
|
||||
From bade12a066ada64083a1daf5fc32fb5a14b6bf68 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 13:09:16 -0600
|
||||
Subject: [PATCH] Configurable baby zombie movement speed
|
||||
|
@ -25,7 +25,7 @@ index 098bd3fba..912611cf1 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityZombie.java b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
index b8761e706..4d4e8d022 100644
|
||||
index de818d618..6333d2234 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityZombie.java
|
||||
@@ -21,7 +21,7 @@ public class EntityZombie extends EntityMonster {
|
||||
|
@ -34,8 +34,8 @@ index b8761e706..4d4e8d022 100644
|
|||
private static final UUID b = UUID.fromString("B9766B59-9566-4402-BC1F-2EE2A276D836");
|
||||
- private static final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", 0.5D, AttributeModifier.Operation.MULTIPLY_BASE);
|
||||
+ private final AttributeModifier c = new AttributeModifier(EntityZombie.b, "Baby speed boost", world.paperConfig.babyZombieMovementModifier, AttributeModifier.Operation.MULTIPLY_BASE); private final AttributeModifier babyModifier = this.c; // Paper - remove static - Make baby speed configurable
|
||||
private static final DataWatcherObject<Boolean> bz = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Integer> bA = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||
private static final DataWatcherObject<Boolean> bw = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
private static final DataWatcherObject<Integer> bx = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.b);
|
||||
public static final DataWatcherObject<Boolean> DROWN_CONVERTING = DataWatcher.a(EntityZombie.class, DataWatcherRegistry.i);
|
||||
@@ -129,9 +129,9 @@ public class EntityZombie extends EntityMonster {
|
||||
if (this.world != null && !this.world.isClientSide) {
|
||||
|
@ -50,5 +50,5 @@ index b8761e706..4d4e8d022 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From cef33b935109a611d30b424fbe87c5274f2a6773 Mon Sep 17 00:00:00 2001
|
||||
From 2afe3ea7a4250da4d96188478296fa730ce63a9b Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 13:14:11 -0600
|
||||
Subject: [PATCH] Configurable fishing time ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 1aa046bfa..d9461dec6 100644
|
||||
index 912611cf1..7d9976ce6 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -84,4 +84,12 @@ public class PaperWorldConfig {
|
||||
|
@ -22,20 +22,20 @@ index 1aa046bfa..d9461dec6 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFishingHook.java b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
index cdcad4c29..19a6233c3 100644
|
||||
index c899a99eb..b10de807e 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFishingHook.java
|
||||
@@ -329,8 +329,9 @@ public class EntityFishingHook extends Entity {
|
||||
this.at = MathHelper.nextInt(this.random, 20, 80);
|
||||
@@ -326,8 +326,9 @@ public class EntityFishingHook extends Entity {
|
||||
this.aq = MathHelper.nextInt(this.random, 20, 80);
|
||||
}
|
||||
} else {
|
||||
- this.as = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.as = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.as -= this.ax * 20 * 5;
|
||||
+ this.as = Math.max(0, this.as); // Paper - Don't allow negative values
|
||||
- this.ap = MathHelper.nextInt(this.random, 100, 600);
|
||||
+ this.ap = MathHelper.nextInt(this.random, world.paperConfig.fishingMinTicks, world.paperConfig.fishingMaxTicks); // Paper
|
||||
this.ap -= this.au * 20 * 5;
|
||||
+ this.ap = Math.max(0, this.ap); // Paper - Don't allow negative values
|
||||
}
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 13436ee21cb26e31559a4a9b75bd04e0c7a4751e Mon Sep 17 00:00:00 2001
|
||||
From 7c8195f46ff705cfc7a46c21106ee408888467b3 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 13:24:16 -0600
|
||||
Subject: [PATCH] Allow nerfed mobs to jump
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index d9461dec6..d0c23915d 100644
|
||||
index 7d9976ce6..6d6a68cb1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -92,4 +92,9 @@ public class PaperWorldConfig {
|
||||
|
@ -31,7 +31,7 @@ index 2e869004c..8a6856e0f 100644
|
|||
this.b.setJumping(this.a);
|
||||
this.a = false;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index f31a996aa..7c7d7a123 100644
|
||||
index e0434ff12..25b613249 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -32,6 +32,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
|
@ -41,8 +41,8 @@ index f31a996aa..7c7d7a123 100644
|
|||
+ @Nullable public PathfinderGoalFloat goalFloat; // Paper
|
||||
public PathfinderGoalSelector targetSelector;
|
||||
private EntityLiving goalTarget;
|
||||
private final EntitySenses bz;
|
||||
@@ -637,6 +638,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
private final EntitySenses bw;
|
||||
@@ -643,6 +644,12 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
// Spigot Start
|
||||
if ( this.fromMobSpawner )
|
||||
{
|
||||
|
@ -56,7 +56,7 @@ index f31a996aa..7c7d7a123 100644
|
|||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
index 71b399c65..2e23b5de5 100644
|
||||
index 0f0dc7277..43908b040 100644
|
||||
--- a/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
+++ b/src/main/java/net/minecraft/server/PathfinderGoalFloat.java
|
||||
@@ -8,10 +8,12 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
|
@ -73,7 +73,7 @@ index 71b399c65..2e23b5de5 100644
|
|||
public boolean a() {
|
||||
double d0 = (double) this.a.getHeadHeight() < 0.4D ? 0.2D : 0.4D;
|
||||
@@ -19,6 +21,7 @@ public class PathfinderGoalFloat extends PathfinderGoal {
|
||||
return this.a.isInWater() && this.a.cf() > d0 || this.a.aD();
|
||||
return this.a.isInWater() && this.a.co() > d0 || this.a.aH();
|
||||
}
|
||||
|
||||
+ public void update() { this.e(); } // Paper - OBFHELPER
|
||||
|
@ -81,5 +81,5 @@ index 71b399c65..2e23b5de5 100644
|
|||
public void e() {
|
||||
if (this.a.getRandom().nextFloat() < 0.8F) {
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 9e8ed2ed179e4a41806d9da9b8010ce293eef505 Mon Sep 17 00:00:00 2001
|
||||
From 489eaf7838b02a8c749d5b3322f22f58ae5f54ef Mon Sep 17 00:00:00 2001
|
||||
From: Suddenly <suddenly@suddenly.coffee>
|
||||
Date: Tue, 1 Mar 2016 13:51:54 -0600
|
||||
Subject: [PATCH] Add configurable despawn distances for living entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index d0c23915d..c1103bb8f 100644
|
||||
index 6d6a68cb1..284568641 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -97,4 +97,20 @@ public class PaperWorldConfig {
|
||||
|
@ -30,10 +30,10 @@ index d0c23915d..c1103bb8f 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 7c7d7a123..14b4c1fe6 100644
|
||||
index 25b613249..6e84d6532 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -613,11 +613,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
@@ -622,11 +622,11 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.h(this);
|
||||
|
||||
|
@ -48,5 +48,5 @@ index 7c7d7a123..14b4c1fe6 100644
|
|||
} else if (d0 < 1024.0D) {
|
||||
this.ticksFarFromPlayer = 0;
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 0feb10fd547e0c8bc4a33f5de32b39b1a032f528 Mon Sep 17 00:00:00 2001
|
||||
From abaf524aa29e451b1d24a0584dcb402a0438be0b Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Thu, 3 Mar 2016 03:53:43 -0600
|
||||
Subject: [PATCH] Allow for toggling of spawn chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index c1103bb8f..625e75f93 100644
|
||||
index 284568641..8ee2b9bb1 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -113,4 +113,10 @@ public class PaperWorldConfig {
|
||||
|
@ -20,10 +20,10 @@ index c1103bb8f..625e75f93 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 67cfcdd60..864d0dd00 100644
|
||||
index 542262fc8..53757ee20 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -152,6 +152,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -152,6 +152,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
});
|
||||
// CraftBukkit end
|
||||
timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||
|
@ -32,5 +32,5 @@ index 67cfcdd60..864d0dd00 100644
|
|||
this.tileLimiter = new org.spigotmc.TickLimiter(spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 27fb70c36afb3d6838aaeb9d22dc04797b2ec7ef Mon Sep 17 00:00:00 2001
|
||||
From f96e4e8a051a837672fd544b7d4919fa87b9ab94 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 14:14:15 -0600
|
||||
Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 625e75f93..17ee44ae5 100644
|
||||
index 8ee2b9bb1..d59b82b7b 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -119,4 +119,14 @@ public class PaperWorldConfig {
|
||||
|
@ -24,10 +24,10 @@ index 625e75f93..17ee44ae5 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index fd4712c71..40dcb3125 100644
|
||||
index bf059dc86..2c36fc71c 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -1838,6 +1838,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1814,6 +1814,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
return this.a(itemstack, 0.0F);
|
||||
}
|
||||
|
||||
|
@ -36,10 +36,10 @@ index fd4712c71..40dcb3125 100644
|
|||
public EntityItem a(ItemStack itemstack, float f) {
|
||||
if (itemstack.isEmpty()) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index dff903b6a..f8d8d8f35 100644
|
||||
index 20cb7dbaf..d835b9f85 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -88,6 +88,16 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -85,6 +85,16 @@ public class EntityFallingBlock extends Entity {
|
||||
}
|
||||
|
||||
this.move(EnumMoveType.SELF, this.getMot());
|
||||
|
@ -57,10 +57,10 @@ index dff903b6a..f8d8d8f35 100644
|
|||
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
|
||||
index 775192a59..e988abd67 100644
|
||||
index d04212436..b92c8c47f 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -57,6 +57,11 @@ public class EntityTNTPrimed extends Entity {
|
||||
@@ -54,6 +54,11 @@ public class EntityTNTPrimed extends Entity {
|
||||
}
|
||||
|
||||
this.move(EnumMoveType.SELF, this.getMot());
|
||||
|
@ -73,5 +73,5 @@ index 775192a59..e988abd67 100644
|
|||
if (this.onGround) {
|
||||
this.setMot(this.getMot().d(0.7D, -0.5D, 0.7D));
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 27e24e367383c9b9e2af4cd826c746fee45d5766 Mon Sep 17 00:00:00 2001
|
||||
From 6ecba3a07be62df84867738e6802b5fbab43bbef Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 14:32:43 -0600
|
||||
Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
@ -19,10 +19,10 @@ index 3f35a28ba..cf00f35a5 100644
|
|||
throwable = throwable1;
|
||||
throw throwable1;
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index c76f262db..11048c37f 100644
|
||||
index 490de37b6..b9b4e04ad 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1318,7 +1318,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1330,7 +1330,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
}
|
||||
|
||||
public String getServerModName() {
|
||||
|
@ -32,10 +32,10 @@ index c76f262db..11048c37f 100644
|
|||
|
||||
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
|
||||
index a59f61e73..f49bd144f 100644
|
||||
index c2fcdfb49..d09f26807 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -196,7 +196,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@@ -197,7 +197,7 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
import net.md_5.bungee.api.chat.BaseComponent; // Spigot
|
||||
|
||||
public final class CraftServer implements Server {
|
||||
|
@ -45,11 +45,11 @@ index a59f61e73..f49bd144f 100644
|
|||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
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
|
||||
index 7374b96d7..32c9bb841 100644
|
||||
index a668bc4e8..2481c1860 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -200,12 +200,25 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -3);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
From 66d130d40bbf356e6055727bb4cbbba1eac70025 Mon Sep 17 00:00:00 2001
|
||||
From 85be01721ad128b46f13a6b97181aae6b1555119 Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Tue, 1 Mar 2016 14:47:52 -0600
|
||||
Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityHuman.java b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
index 9daa8ed210..5c45d8ee08 100644
|
||||
index ce6e4395d..761fe32ba 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityHuman.java
|
||||
@@ -71,6 +71,9 @@ public abstract class EntityHuman extends EntityLiving {
|
||||
private final ItemCooldown bZ;
|
||||
private final ItemCooldown bW;
|
||||
@Nullable
|
||||
public EntityFishingHook hookedFish;
|
||||
+ // Paper start
|
||||
|
@ -19,11 +19,11 @@ index 9daa8ed210..5c45d8ee08 100644
|
|||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityInsentient.java b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
index 14b4c1fe69..6e304492cf 100644
|
||||
index 6e84d6532..dac3540c6 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityInsentient.java
|
||||
@@ -610,7 +610,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
if (!this.isPersistent() && !this.I()) {
|
||||
@@ -619,7 +619,7 @@ public abstract class EntityInsentient extends EntityLiving {
|
||||
} else if (!this.isPersistent() && !this.I()) {
|
||||
EntityHuman entityhuman = this.world.findNearbyPlayer(this, -1.0D);
|
||||
|
||||
- if (entityhuman != null) {
|
||||
|
@ -32,7 +32,7 @@ index 14b4c1fe69..6e304492cf 100644
|
|||
|
||||
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
|
||||
index 323a56c63f..eb3c56fefd 100644
|
||||
index 102b3a3c4..08c2a22f7 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySilverfish.java
|
||||
@@ -99,7 +99,7 @@ public class EntitySilverfish extends EntityMonster {
|
||||
|
@ -45,10 +45,10 @@ index 323a56c63f..eb3c56fefd 100644
|
|||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 9280bb6f74..8aba3c775c 100644
|
||||
index b26dff0a7..cce3b25cd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1651,7 +1651,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1635,7 +1635,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@Override
|
||||
public String getLocale() {
|
||||
return getHandle().locale;
|
||||
|
@ -69,5 +69,5 @@ index 9280bb6f74..8aba3c775c 100644
|
|||
@Override
|
||||
public void updateCommands() {
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From a14eae789e9ae1476dc35c2b99a28e950f05d325 Mon Sep 17 00:00:00 2001
|
||||
From aafa39f2c1441391d0ccf971113495d782ed68ea Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 15:08:03 -0600
|
||||
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
|
||||
index 3de0f69758..e990445196 100644
|
||||
index 5f9031257..f62429277 100644
|
||||
--- a/src/main/java/net/minecraft/server/Chunk.java
|
||||
+++ b/src/main/java/net/minecraft/server/Chunk.java
|
||||
@@ -506,6 +506,10 @@ public class Chunk implements IChunkAccess {
|
||||
@@ -500,6 +500,10 @@ public class Chunk implements IChunkAccess {
|
||||
}
|
||||
|
||||
// CraftBukkit start
|
||||
|
@ -20,5 +20,5 @@ index 3de0f69758..e990445196 100644
|
|||
System.out.println("Attempted to place a tile entity (" + tileentity + ") at " + tileentity.position.getX() + "," + tileentity.position.getY() + "," + tileentity.position.getZ()
|
||||
+ " (" + getType(blockposition) + ") where there was no entity tile!");
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From cc69a9a63cd4b9e2e5248acd36fa6f8117868852 Mon Sep 17 00:00:00 2001
|
||||
From ae64864f32d5c93aafbde72778c4bec2f343559f Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sun, 8 Mar 2015 22:55:25 -0600
|
||||
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
|
||||
index ffaf16cff8..6b94826536 100644
|
||||
index 35f4dc75f..c4766f729 100644
|
||||
--- a/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;
|
||||
|
@ -17,7 +17,7 @@ index ffaf16cff8..6b94826536 100644
|
|||
|
||||
private NonNullList<ItemStack> items;
|
||||
protected float a;
|
||||
@@ -101,22 +101,31 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -84,22 +84,31 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
return nbttagcompound;
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ index ffaf16cff8..6b94826536 100644
|
|||
float f1 = this.a;
|
||||
|
||||
if (this.viewingCount > 0) {
|
||||
@@ -132,8 +141,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -115,8 +124,11 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
float f2 = 0.5F;
|
||||
|
||||
if (this.a < 0.5F && f1 >= 0.5F) {
|
||||
|
@ -66,15 +66,15 @@ index ffaf16cff8..6b94826536 100644
|
|||
|
||||
if (this.a < 0.0F) {
|
||||
this.a = 0.0F;
|
||||
@@ -172,6 +184,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -155,6 +167,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
}
|
||||
|
||||
private void a(SoundEffect soundeffect) {
|
||||
+ if (!this.getBlock().hasProperty(BlockChest.b)) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074
|
||||
BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.b);
|
||||
+ if (!this.getBlock().hasProperty(BlockChest.c)) { return; } // Paper - this can be delayed, double check exists - Fixes GH-2074
|
||||
BlockPropertyChestType blockpropertychesttype = (BlockPropertyChestType) this.getBlock().get(BlockChest.c);
|
||||
|
||||
if (blockpropertychesttype != BlockPropertyChestType.LEFT) {
|
||||
@@ -210,6 +223,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -193,6 +206,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
|
||||
++this.viewingCount;
|
||||
if (this.world == null) return; // CraftBukkit
|
||||
|
@ -82,7 +82,7 @@ index ffaf16cff8..6b94826536 100644
|
|||
|
||||
// CraftBukkit start - Call redstone event
|
||||
if (this.getBlock().getBlock() == Blocks.TRAPPED_CHEST) {
|
||||
@@ -232,6 +246,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
@@ -215,6 +229,7 @@ public class TileEntityChest extends TileEntityLootable implements ITickable {
|
||||
--this.viewingCount;
|
||||
|
||||
// CraftBukkit start - Call redstone event
|
||||
|
@ -91,7 +91,7 @@ index ffaf16cff8..6b94826536 100644
|
|||
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
|
||||
index 0fae06d3a0..ae6784b6aa 100644
|
||||
index 68737be5e..17c39edca 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntityEnderChest.java
|
||||
@@ -1,6 +1,6 @@
|
||||
|
@ -182,5 +182,5 @@ index 0fae06d3a0..ae6784b6aa 100644
|
|||
|
||||
public boolean a(EntityHuman entityhuman) {
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From bb298197fb834218d8cd16207a2cbd0b75718392 Mon Sep 17 00:00:00 2001
|
||||
From 049e41c77685600f9b77890820704ae2cf3300cf Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:09:29 -0600
|
||||
Subject: [PATCH] Further improve server tick loop
|
||||
|
@ -12,10 +12,10 @@ Previous implementation did not calculate TPS correctly.
|
|||
Switch to a realistic rolling average and factor in std deviation as an extra reporting variable
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d7c0006605..6594138f35 100644
|
||||
index b9b4e04ad..983b6906e 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -157,7 +157,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -160,7 +160,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
|
||||
public ConsoleReader reader;
|
||||
|
@ -24,7 +24,7 @@ index d7c0006605..6594138f35 100644
|
|||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
public File bukkitDataPackFolder;
|
||||
@@ -167,7 +167,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -170,7 +170,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
// Spigot start
|
||||
public static final int TPS = 20;
|
||||
public static final int TICK_TIME = 1000000000 / TPS;
|
||||
|
@ -33,7 +33,7 @@ index d7c0006605..6594138f35 100644
|
|||
public final double[] recentTps = new double[ 3 ];
|
||||
public final SlackActivityAccountant slackActivityAccountant = new SlackActivityAccountant();
|
||||
// Spigot end
|
||||
@@ -769,6 +769,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -777,6 +777,57 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
{
|
||||
return ( avg * exp ) + ( tps * ( 1 - exp ) );
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ index d7c0006605..6594138f35 100644
|
|||
// Spigot End
|
||||
|
||||
public void run() {
|
||||
@@ -781,30 +832,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -789,30 +840,38 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
// Spigot start
|
||||
Arrays.fill( recentTps, 20 );
|
||||
|
@ -140,10 +140,10 @@ index d7c0006605..6594138f35 100644
|
|||
if (this.T) {
|
||||
this.T = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index f49bd144ff..6446f68b67 100644
|
||||
index d09f26807..9071f3f2e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1929,6 +1929,17 @@ public final class CraftServer implements Server {
|
||||
@@ -1932,6 +1932,17 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
|
||||
|
@ -162,7 +162,7 @@ index f49bd144ff..6446f68b67 100644
|
|||
{
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/TicksPerSecondCommand.java b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
index be2e31deae..6d21c32692 100644
|
||||
index be2e31dea..6d21c3269 100644
|
||||
--- a/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
+++ b/src/main/java/org/spigotmc/TicksPerSecondCommand.java
|
||||
@@ -1,8 +1,5 @@
|
||||
|
@ -203,5 +203,5 @@ index be2e31deae..6d21c32692 100644
|
|||
return ( ( tps > 18.0 ) ? ChatColor.GREEN : ( tps > 16.0 ) ? ChatColor.YELLOW : ChatColor.RED ).toString()
|
||||
+ ( ( tps > 20.0 ) ? "*" : "" ) + Math.min( Math.round( tps * 100.0 ) / 100.0, 20.0 );
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 24913c949ff63f25778ed470bb31cc3c5c67180b Mon Sep 17 00:00:00 2001
|
||||
From 598772a87d9526a0e73e3f87820036645e8bc6d2 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 23:12:03 -0600
|
||||
Subject: [PATCH] Only refresh abilities if needed
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 00d6fc4b32..3d14319b75 100644
|
||||
index cce3b25cd..f0e06ad0e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1340,12 +1340,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -1324,12 +1324,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
||||
@Override
|
||||
public void setFlying(boolean value) {
|
||||
|
@ -24,5 +24,5 @@ index 00d6fc4b32..3d14319b75 100644
|
|||
|
||||
@Override
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 8d953fb5d7e9a7f2f2435cf9b8c31ab55f8bd634 Mon Sep 17 00:00:00 2001
|
||||
From 0a0aeec73ccf11be7323442e86fff56d1ae1e1b5 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Tue, 1 Mar 2016 23:45:08 -0600
|
||||
Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 40dcb31258..5f85eb2ba2 100644
|
||||
index 2c36fc71c..29e6b88d2 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -163,6 +163,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -167,6 +167,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
|
||||
public boolean forceExplosionKnockback; // SPIGOT-949
|
||||
public Timing tickTimer = MinecraftTimings.getEntityTimings(this); // Paper
|
||||
|
@ -16,7 +16,7 @@ index 40dcb31258..5f85eb2ba2 100644
|
|||
// Spigot start
|
||||
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
|
||||
public final boolean defaultActivationState;
|
||||
@@ -1596,6 +1597,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1580,6 +1581,11 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -28,7 +28,7 @@ index 40dcb31258..5f85eb2ba2 100644
|
|||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Saving entity NBT");
|
||||
@@ -1718,6 +1724,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1694,6 +1700,13 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.getBukkitEntity().readBukkitValues(nbttagcompound);
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -42,7 +42,7 @@ index 40dcb31258..5f85eb2ba2 100644
|
|||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.a(throwable, "Loading entity NBT");
|
||||
CrashReportSystemDetails crashreportsystemdetails = crashreport.a("Entity being loaded");
|
||||
@@ -1795,6 +1808,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -1771,6 +1784,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
|
||||
protected abstract void b(NBTTagCompound nbttagcompound);
|
||||
|
||||
|
@ -51,10 +51,10 @@ index 40dcb31258..5f85eb2ba2 100644
|
|||
NBTTagList nbttaglist = new NBTTagList();
|
||||
double[] adouble1 = adouble;
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityFallingBlock.java b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
index f8d8d8f353..0f9fa41133 100644
|
||||
index d835b9f85..55d1b3529 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityFallingBlock.java
|
||||
@@ -254,6 +254,14 @@ public class EntityFallingBlock extends Entity {
|
||||
@@ -252,6 +252,14 @@ public class EntityFallingBlock extends Entity {
|
||||
this.block = Blocks.SAND.getBlockData();
|
||||
}
|
||||
|
||||
|
@ -70,10 +70,10 @@ index f8d8d8f353..0f9fa41133 100644
|
|||
|
||||
public void a(boolean flag) {
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTNTPrimed.java b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
index e988abd67c..f2ee53ab90 100644
|
||||
index b92c8c47f..7625dca00 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTNTPrimed.java
|
||||
@@ -104,6 +104,14 @@ public class EntityTNTPrimed extends Entity {
|
||||
@@ -103,6 +103,14 @@ public class EntityTNTPrimed extends Entity {
|
||||
@Override
|
||||
protected void a(NBTTagCompound nbttagcompound) {
|
||||
this.setFuseTicks(nbttagcompound.getShort("Fuse"));
|
||||
|
@ -89,10 +89,10 @@ index e988abd67c..f2ee53ab90 100644
|
|||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/net/minecraft/server/NBTTagList.java b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
index ce510c4867..b7c94fe238 100644
|
||||
index 22035b6c0..342484373 100644
|
||||
--- a/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
+++ b/src/main/java/net/minecraft/server/NBTTagList.java
|
||||
@@ -161,6 +161,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
@@ -188,6 +188,7 @@ public class NBTTagList extends NBTList<NBTBase> {
|
||||
return new int[0];
|
||||
}
|
||||
|
||||
|
@ -101,11 +101,11 @@ index ce510c4867..b7c94fe238 100644
|
|||
if (i >= 0 && i < this.list.size()) {
|
||||
NBTBase nbtbase = (NBTBase) this.list.get(i);
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index ef9abdc28d..c13f92011e 100644
|
||||
index c38963526..90f08db30 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -1156,6 +1156,11 @@ public class WorldServer extends World {
|
||||
this.H.add(((EntityInsentient) entity).getNavigation());
|
||||
@@ -1164,6 +1164,11 @@ public class WorldServer extends World {
|
||||
this.navigators.add(((EntityInsentient) entity).getNavigation());
|
||||
}
|
||||
entity.valid = true; // CraftBukkit
|
||||
+ // Paper start - Set origin location when the entity is being added to the world
|
||||
|
@ -117,10 +117,10 @@ index ef9abdc28d..c13f92011e 100644
|
|||
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index 824becd272..7d9d0a1f77 100644
|
||||
index c82c21326..a29693674 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1010,4 +1010,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -1007,4 +1007,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
return spigot;
|
||||
}
|
||||
// Spigot end
|
||||
|
@ -134,5 +134,5 @@ index 824becd272..7d9d0a1f77 100644
|
|||
+ // Paper end
|
||||
}
|
||||
--
|
||||
2.22.1
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
From 74eb90e56377cc140589affc4de430a80f24c0c7 Mon Sep 17 00:00:00 2001
|
||||
From b37f294b95b584c122e443d1fb1b91946e0a796a Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:52:34 -0600
|
||||
Subject: [PATCH] Prevent tile entity and entity crashes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/TileEntity.java b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
index 22a8ea916a..e1db243165 100644
|
||||
index fa6400dcc..e2f3cec74 100644
|
||||
--- a/src/main/java/net/minecraft/server/TileEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/TileEntity.java
|
||||
@@ -193,7 +193,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.q()) + " // " + this.getClass().getCanonicalName();
|
||||
@@ -194,7 +194,12 @@ public abstract class TileEntity implements KeyedObject { // Paper
|
||||
return IRegistry.BLOCK_ENTITY_TYPE.getKey(this.getTileType()) + " // " + this.getClass().getCanonicalName();
|
||||
});
|
||||
if (this.world != null) {
|
||||
- CrashReportSystemDetails.a(crashreportsystemdetails, this.position, this.getBlock());
|
||||
|
@ -23,10 +23,10 @@ index 22a8ea916a..e1db243165 100644
|
|||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 67ea828427..35c6306b34 100644
|
||||
index 53757ee20..970ead244 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -714,11 +714,13 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -687,11 +687,13 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
|
||||
gameprofilerfiller.exit();
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -45,7 +45,7 @@ index 67ea828427..35c6306b34 100644
|
|||
}
|
||||
// Spigot start
|
||||
finally {
|
||||
@@ -784,11 +786,12 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -757,11 +759,12 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
try {
|
||||
consumer.accept(entity);
|
||||
} catch (Throwable throwable) {
|
||||
|
@ -64,5 +64,5 @@ index 67ea828427..35c6306b34 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From a06c734c17e971836d677e5d7c45be34e36f20c4 Mon Sep 17 00:00:00 2001
|
||||
From b72bf1ab0143c458b17f8fe333df6f52c7d1c8af Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Tue, 1 Mar 2016 23:58:50 -0600
|
||||
Subject: [PATCH] Configurable top of nether void damage
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 17ee44ae5..4077f4c28 100644
|
||||
index d59b82b7b..f7a0a33e4 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -129,4 +129,19 @@ public class PaperWorldConfig {
|
||||
|
@ -29,17 +29,18 @@ index 17ee44ae5..4077f4c28 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
||||
index 5f85eb2ba..9629489fa 100644
|
||||
index 29e6b88d2..2aea9ba50 100644
|
||||
--- a/src/main/java/net/minecraft/server/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/server/Entity.java
|
||||
@@ -398,9 +398,15 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -407,9 +407,16 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fallDistance *= 0.5F;
|
||||
}
|
||||
|
||||
+ // Paper start - Configurable nether ceiling damage
|
||||
+
|
||||
+ // Extracted to own function
|
||||
+ /*
|
||||
if (this.locY < -64.0D) {
|
||||
if (this.locY() < -64.0D) {
|
||||
this.af();
|
||||
}
|
||||
+ */
|
||||
|
@ -48,7 +49,7 @@ index 5f85eb2ba..9629489fa 100644
|
|||
|
||||
if (!this.world.isClientSide) {
|
||||
this.setFlag(0, this.fireTicks > 0);
|
||||
@@ -410,6 +416,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -419,6 +426,17 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.world.getMethodProfiler().exit();
|
||||
}
|
||||
|
||||
|
@ -66,7 +67,7 @@ index 5f85eb2ba..9629489fa 100644
|
|||
protected void E() {
|
||||
if (this.portalCooldown > 0) {
|
||||
--this.portalCooldown;
|
||||
@@ -485,6 +502,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
@@ -494,6 +512,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
||||
this.fireTicks = 0;
|
||||
}
|
||||
|
||||
|
@ -75,17 +76,17 @@ index 5f85eb2ba..9629489fa 100644
|
|||
this.die();
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
index ff5d12817..e1a684b37 100644
|
||||
index e7fc442c8..1b64ad824 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java
|
||||
@@ -182,9 +182,15 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
@@ -210,9 +210,15 @@ public abstract class EntityMinecartAbstract extends Entity {
|
||||
this.setDamage(this.getDamage() - 1.0F);
|
||||
}
|
||||
|
||||
+ // Paper start - Configurable nether ceiling damage
|
||||
+ // Extracted to own function
|
||||
+ /*
|
||||
if (this.locY < -64.0D) {
|
||||
if (this.locY() < -64.0D) {
|
||||
this.af();
|
||||
}
|
||||
+ */
|
||||
|
@ -95,5 +96,5 @@ index ff5d12817..e1a684b37 100644
|
|||
// this.doPortalTick(); // CraftBukkit - handled in postTick
|
||||
if (this.world.isClientSide) {
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 0f0308d28c55c73c25e8a82d198dc1ae26b86652 Mon Sep 17 00:00:00 2001
|
||||
From 2c065ba0b3996372f97f9b2f6e60eb09c441d409 Mon Sep 17 00:00:00 2001
|
||||
From: DoctorDark <doctordark11@gmail.com>
|
||||
Date: Wed, 16 Mar 2016 02:21:39 -0500
|
||||
Subject: [PATCH] Configurable end credits
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 4077f4c28..29cd51f6b 100644
|
||||
index f7a0a33e4..50dec5cb5 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -144,4 +144,10 @@ public class PaperWorldConfig {
|
||||
|
@ -20,26 +20,26 @@ index 4077f4c28..29cd51f6b 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityPlayer.java b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
index 94021e9b6..eecdade96 100644
|
||||
index 9e63f4412..15de985d3 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityPlayer.java
|
||||
@@ -60,7 +60,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private long cm = SystemUtils.getMonotonicMillis();
|
||||
private long cj = SystemUtils.getMonotonicMillis();
|
||||
private Entity spectatedEntity;
|
||||
public boolean worldChangeInvuln;
|
||||
- private boolean cp;
|
||||
+ private boolean cp; private void setHasSeenCredits(boolean has) { this.cp = has; } // Paper - OBFHELPER
|
||||
- private boolean cm;
|
||||
+ private boolean cm; private void setHasSeenCredits(boolean has) { this.cm = has; } // Paper - OBFHELPER
|
||||
private final RecipeBookServer recipeBook;
|
||||
private Vec3D cr;
|
||||
private int cs;
|
||||
@@ -706,6 +706,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
private Vec3D co;
|
||||
private int cp;
|
||||
@@ -689,6 +689,7 @@ public class EntityPlayer extends EntityHuman implements ICrafting {
|
||||
this.getWorldServer().removePlayer(this);
|
||||
if (!this.viewingCredits) {
|
||||
this.viewingCredits = true;
|
||||
+ if (world.paperConfig.disableEndCredits) this.setHasSeenCredits(true); // Paper - Toggle to always disable end credits
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cp ? 0.0F : 1.0F));
|
||||
this.cp = true;
|
||||
this.playerConnection.sendPacket(new PacketPlayOutGameStateChange(4, this.cm ? 0.0F : 1.0F));
|
||||
this.cm = true;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From c52d35277cee8d0e03e323c2b717b510d667c1db Mon Sep 17 00:00:00 2001
|
||||
From 682369f59b4dab57e3950544df0c5eebd23620aa Mon Sep 17 00:00:00 2001
|
||||
From: Iceee <andrew@opticgaming.tv>
|
||||
Date: Wed, 2 Mar 2016 01:39:52 -0600
|
||||
Subject: [PATCH] Fix lag from explosions processing dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index 462f8f33a1..e1c628f177 100644
|
||||
index 4033f680c..4398f7441 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -146,7 +146,14 @@ public class Explosion {
|
||||
@@ -151,7 +151,14 @@ public class Explosion {
|
||||
int i1 = MathHelper.floor(this.posY + (double) f3 + 1.0D);
|
||||
int j1 = MathHelper.floor(this.posZ - (double) f3 - 1.0D);
|
||||
int k1 = MathHelper.floor(this.posZ + (double) f3 + 1.0D);
|
||||
|
@ -25,7 +25,7 @@ index 462f8f33a1..e1c628f177 100644
|
|||
|
||||
for (int l1 = 0; l1 < list.size(); ++l1) {
|
||||
diff --git a/src/main/java/net/minecraft/server/IEntitySelector.java b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
index e2744dc40d..9bf1919451 100644
|
||||
index c75ed9ddc..c1f462d9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/server/IEntitySelector.java
|
||||
@@ -14,6 +14,7 @@ public final class IEntitySelector {
|
||||
|
@ -37,5 +37,5 @@ index e2744dc40d..9bf1919451 100644
|
|||
return !(entity instanceof EntityHuman) || !entity.isSpectator() && !((EntityHuman) entity).isCreative();
|
||||
};
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From c4a77f7b5d3d220be6ec5da3dce2caed19fd2c0d Mon Sep 17 00:00:00 2001
|
||||
From 83daf1f5fe7b50047031dfadbb0839c5dc087fe7 Mon Sep 17 00:00:00 2001
|
||||
From: Byteflux <byte@byteflux.net>
|
||||
Date: Wed, 2 Mar 2016 11:59:48 -0600
|
||||
Subject: [PATCH] Optimize explosions
|
||||
|
@ -10,7 +10,7 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
|||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 29cd51f6b..131b78dec 100644
|
||||
index 50dec5cb5..f038d3f7d 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -150,4 +150,10 @@ public class PaperWorldConfig {
|
||||
|
@ -25,10 +25,10 @@ index 29cd51f6b..131b78dec 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index cdd893950..bd6a0bd16 100644
|
||||
index 4398f7441..069ffb141 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -172,7 +172,7 @@ public class Explosion {
|
||||
@@ -177,7 +177,7 @@ public class Explosion {
|
||||
d8 /= d11;
|
||||
d9 /= d11;
|
||||
d10 /= d11;
|
||||
|
@ -37,7 +37,7 @@ index cdd893950..bd6a0bd16 100644
|
|||
double d13 = (1.0D - d7) * d12;
|
||||
|
||||
// CraftBukkit start
|
||||
@@ -361,4 +361,84 @@ public class Explosion {
|
||||
@@ -383,4 +383,84 @@ public class Explosion {
|
||||
|
||||
private Effect() {}
|
||||
}
|
||||
|
@ -123,10 +123,10 @@ index cdd893950..bd6a0bd16 100644
|
|||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 64c961e5b..f56edde78 100644
|
||||
index 983b6906e..81d3a5262 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1162,6 +1162,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
@@ -1170,6 +1170,7 @@ public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTas
|
||||
|
||||
this.methodProfiler.exit();
|
||||
this.methodProfiler.exit();
|
||||
|
@ -135,7 +135,7 @@ index 64c961e5b..f56edde78 100644
|
|||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 7a4c56353..3c3ba5df3 100644
|
||||
index 970ead244..5eff80d35 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -19,6 +19,7 @@ import org.apache.logging.log4j.util.Supplier;
|
||||
|
@ -146,7 +146,7 @@ index 7a4c56353..3c3ba5df3 100644
|
|||
import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.block.BlockState;
|
||||
@@ -94,6 +95,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -93,6 +94,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter entityLimiter;
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
|
@ -155,5 +155,5 @@ index 7a4c56353..3c3ba5df3 100644
|
|||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From a6a7e3593b128112343ff7c7b5970fe738ee0035 Mon Sep 17 00:00:00 2001
|
||||
From 0048c6713b2c1c206635ebefaf64a04c8b6d82ef Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 14:48:03 -0600
|
||||
Subject: [PATCH] Disable explosion knockback
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 131b78dec..3fa78d286 100644
|
||||
index f038d3f7d..25e071718 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -156,4 +156,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,10 +19,10 @@ index 131b78dec..3fa78d286 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
index 47379046d..fd5d1e1c8 100644
|
||||
index 906ca1bfa..e38be6eba 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -1118,6 +1118,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1071,6 +1071,7 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -30,7 +30,7 @@ index 47379046d..fd5d1e1c8 100644
|
|||
if (flag1) {
|
||||
if (flag) {
|
||||
this.world.broadcastEntityEffect(this, (byte) 29);
|
||||
@@ -1136,6 +1137,7 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1089,6 +1090,7 @@ public abstract class EntityLiving extends Entity {
|
||||
b0 = 2;
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,7 @@ index 47379046d..fd5d1e1c8 100644
|
|||
this.world.broadcastEntityEffect(this, b0);
|
||||
}
|
||||
|
||||
@@ -1159,6 +1161,8 @@ public abstract class EntityLiving extends Entity {
|
||||
@@ -1112,6 +1114,8 @@ public abstract class EntityLiving extends Entity {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -48,10 +48,10 @@ index 47379046d..fd5d1e1c8 100644
|
|||
if (!this.f(damagesource)) {
|
||||
SoundEffect soundeffect = this.getSoundDeath();
|
||||
diff --git a/src/main/java/net/minecraft/server/Explosion.java b/src/main/java/net/minecraft/server/Explosion.java
|
||||
index bd6a0bd16..8cfdac036 100644
|
||||
index 069ffb141..8e134ba89 100644
|
||||
--- a/src/main/java/net/minecraft/server/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/server/Explosion.java
|
||||
@@ -188,14 +188,14 @@ public class Explosion {
|
||||
@@ -193,14 +193,14 @@ public class Explosion {
|
||||
double d14 = d13;
|
||||
|
||||
if (entity instanceof EntityLiving) {
|
||||
|
@ -69,5 +69,5 @@ index bd6a0bd16..8cfdac036 100644
|
|||
}
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 5aae7de1321e74e61cb8d184344d1e7a3b373584 Mon Sep 17 00:00:00 2001
|
||||
From 48087a2935330eccfbd79774767a96cb7aba2194 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 14:52:43 -0600
|
||||
Subject: [PATCH] Disable thunder
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 3fa78d286..597a119db 100644
|
||||
index 25e071718..41436a4ea 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -161,4 +161,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,10 +19,10 @@ index 3fa78d286..597a119db 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index c13f92011..2d84c5e6f 100644
|
||||
index 90f08db30..465cda646 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -424,7 +424,7 @@ public class WorldServer extends World {
|
||||
@@ -446,7 +446,7 @@ public class WorldServer extends World {
|
||||
gameprofilerfiller.enter("thunder");
|
||||
BlockPosition blockposition;
|
||||
|
||||
|
@ -32,5 +32,5 @@ index c13f92011..2d84c5e6f 100644
|
|||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyDamageScaler difficultydamagescaler = this.getDamageScaler(blockposition);
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From dc0333e3d9c9b29a3f9bf0a5a754288a1ddcd798 Mon Sep 17 00:00:00 2001
|
||||
From e6f27f91e80b08f0b05fcd074214da2d173f536d Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 14:57:24 -0600
|
||||
Subject: [PATCH] Disable ice and snow
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 597a119db..77444bb90 100644
|
||||
index 41436a4ea..f53d8b967 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -166,4 +166,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,10 +19,10 @@ index 597a119db..77444bb90 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index 2d84c5e6f..9928e5aab 100644
|
||||
index 465cda646..fe20687b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -444,7 +444,7 @@ public class WorldServer extends World {
|
||||
@@ -466,7 +466,7 @@ public class WorldServer extends World {
|
||||
}
|
||||
|
||||
gameprofilerfiller.exitEnter("iceandsnow");
|
||||
|
@ -32,5 +32,5 @@ index 2d84c5e6f..9928e5aab 100644
|
|||
BlockPosition blockposition1 = blockposition.down();
|
||||
BiomeBase biomebase = this.getBiome(blockposition);
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 83d1593f9fac787d5a019d02227c10630209f3d7 Mon Sep 17 00:00:00 2001
|
||||
From a5c5c4e007001bce2c77cf3267946058c89d7b06 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Wed, 2 Mar 2016 15:03:53 -0600
|
||||
Subject: [PATCH] Configurable mob spawner tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 77444bb90..2e9bbc7e9 100644
|
||||
index f53d8b967..428deed56 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -171,4 +171,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,10 +19,10 @@ index 77444bb90..2e9bbc7e9 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
index dc0e93926..13e62e3d7 100644
|
||||
index 813de2a6d..deb32db2b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
+++ b/src/main/java/net/minecraft/server/MobSpawnerAbstract.java
|
||||
@@ -23,6 +23,7 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -24,6 +24,7 @@ public abstract class MobSpawnerAbstract {
|
||||
public int maxNearbyEntities = 6;
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
|
@ -30,7 +30,7 @@ index dc0e93926..13e62e3d7 100644
|
|||
|
||||
public MobSpawnerAbstract() {}
|
||||
|
||||
@@ -52,6 +53,10 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -53,6 +54,10 @@ public abstract class MobSpawnerAbstract {
|
||||
}
|
||||
|
||||
public void c() {
|
||||
|
@ -41,7 +41,7 @@ index dc0e93926..13e62e3d7 100644
|
|||
if (!this.h()) {
|
||||
this.f = this.e;
|
||||
} else {
|
||||
@@ -66,18 +71,18 @@ public abstract class MobSpawnerAbstract {
|
||||
@@ -67,18 +72,18 @@ public abstract class MobSpawnerAbstract {
|
||||
world.addParticle(Particles.SMOKE, d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
world.addParticle(Particles.FLAME, d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
if (this.spawnDelay > 0) {
|
||||
|
@ -64,5 +64,5 @@ index dc0e93926..13e62e3d7 100644
|
|||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 2709e7544ecdfd3e3a55c130e518e64f00a1f2fe Mon Sep 17 00:00:00 2001
|
||||
From 78beb804696f00b03b7d198577819a7d2aaabc0a Mon Sep 17 00:00:00 2001
|
||||
From: Jedediah Smith <jedediah@silencegreys.com>
|
||||
Date: Wed, 2 Mar 2016 23:13:07 -0600
|
||||
Subject: [PATCH] Send absolute position the first time an entity is seen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/EntityTrackerEntry.java b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
index cf0e1a6a0..f04a9d18c 100644
|
||||
index a75e0ec54..a13fd9b34 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntityTrackerEntry.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.server;
|
||||
|
@ -77,10 +77,10 @@ index cf0e1a6a0..f04a9d18c 100644
|
|||
|
||||
this.c();
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerChunkMap.java b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
index 049ca1b4f..04a65b487 100644
|
||||
index b8fa59775..25eb8f648 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerChunkMap.java
|
||||
@@ -1172,10 +1172,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1177,10 +1177,14 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
private final Entity tracker;
|
||||
private final int trackingDistance;
|
||||
private SectionPosition e;
|
||||
|
@ -97,7 +97,7 @@ index 049ca1b4f..04a65b487 100644
|
|||
this.tracker = entity;
|
||||
this.trackingDistance = i;
|
||||
this.e = SectionPosition.a(entity);
|
||||
@@ -1257,7 +1261,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
@@ -1262,7 +1266,7 @@ public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.d {
|
||||
entityplayer.removeQueue.remove(Integer.valueOf(this.tracker.getId()));
|
||||
// CraftBukkit end
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From a44e2aef583dd4b9366de604bfa8a57c531c488c Mon Sep 17 00:00:00 2001
|
||||
From 2357ec11aeeff0b009a8d7c978218a13f0a566c3 Mon Sep 17 00:00:00 2001
|
||||
From: Zach Brown <zach.brown@destroystokyo.com>
|
||||
Date: Wed, 2 Mar 2016 23:45:17 -0600
|
||||
Subject: [PATCH] Disable spigot tick limiters
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index 1db06c6d94..8d72146760 100644
|
||||
index 5eff80d35..f4598134e 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -685,9 +685,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -658,9 +658,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
// Spigot start
|
||||
// Iterator iterator = this.tileEntityListTick.iterator();
|
||||
int tilesThisCycle = 0;
|
||||
|
@ -20,5 +20,5 @@ index 1db06c6d94..8d72146760 100644
|
|||
TileEntity tileentity = (TileEntity) this.tileEntityListTick.get(tileTickPosition);
|
||||
// Spigot start
|
||||
--
|
||||
2.21.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From cce60db4469922e6072042bec0b026f11476d8fa Mon Sep 17 00:00:00 2001
|
||||
From 7687b0b9af411a973b794867e15d793d9e02ccd8 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 01:13:45 -0600
|
||||
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
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 6c775986d..e80ffe34a 100644
|
||||
index a4da22ea6..345ac63e2 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -181,4 +181,9 @@ public class PaperWorldConfig {
|
||||
|
@ -20,10 +20,10 @@ index 6c775986d..e80ffe34a 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/BlockChest.java b/src/main/java/net/minecraft/server/BlockChest.java
|
||||
index 7bde15861..65b616481 100644
|
||||
index 033cb78d9..72fb92f7c 100644
|
||||
--- a/src/main/java/net/minecraft/server/BlockChest.java
|
||||
+++ b/src/main/java/net/minecraft/server/BlockChest.java
|
||||
@@ -280,6 +280,11 @@ public class BlockChest extends BlockTileEntity implements IBlockWaterlogged {
|
||||
@@ -267,6 +267,11 @@ public class BlockChest extends BlockChestAbstract<TileEntityChest> implements I
|
||||
}
|
||||
|
||||
private static boolean b(GeneratorAccess generatoraccess, BlockPosition blockposition) {
|
||||
|
@ -36,5 +36,5 @@ index 7bde15861..65b616481 100644
|
|||
|
||||
if (!list.isEmpty()) {
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From 0cc40466e571ab5f15871a0f80ec29c84fe8f0b3 Mon Sep 17 00:00:00 2001
|
||||
From 935414e173cae94fea0a72650e1d0030dcd85abb Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Thu, 3 Mar 2016 01:17:12 -0600
|
||||
Subject: [PATCH] Ensure commands are not ran async
|
||||
|
@ -14,10 +14,10 @@ big slowdown in execution but throwing an exception at same time to raise awaren
|
|||
that it is happening so that plugin authors can fix their code to stop executing commands async.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
index 36c56773f..962362889 100644
|
||||
index b7beb058d..fae57fc2c 100644
|
||||
--- a/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
+++ b/src/main/java/net/minecraft/server/PlayerConnection.java
|
||||
@@ -1553,6 +1553,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
@@ -1569,6 +1569,29 @@ public class PlayerConnection implements PacketListenerPlayIn {
|
||||
}
|
||||
|
||||
if (!async && s.startsWith("/")) {
|
||||
|
@ -48,10 +48,10 @@ index 36c56773f..962362889 100644
|
|||
} else if (this.player.getChatFlags() == EnumChatVisibility.SYSTEM) {
|
||||
// Do nothing, this is coming from a plugin
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 688ab8ccf..115d4b600 100644
|
||||
index 9071f3f2e..82d73bc10 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -707,6 +707,29 @@ public final class CraftServer implements Server {
|
||||
@@ -708,6 +708,29 @@ public final class CraftServer implements Server {
|
||||
Validate.notNull(commandLine, "CommandLine cannot be null");
|
||||
org.spigotmc.AsyncCatcher.catchOp("command dispatch"); // Spigot
|
||||
|
||||
|
@ -118,5 +118,5 @@ index e7b953ca3..ccea803f5 100644
|
|||
{
|
||||
String[] split = restartScript.split( " " );
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From ad7bce2e1884350804f9b327ef455cae84ab4ade Mon Sep 17 00:00:00 2001
|
||||
From ecd92c0006460eebd39762c760e565c218971cc5 Mon Sep 17 00:00:00 2001
|
||||
From: vemacs <d@nkmem.es>
|
||||
Date: Thu, 3 Mar 2016 01:19:22 -0600
|
||||
Subject: [PATCH] All chunks are slime spawn chunks toggle
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index e80ffe34a..95245a981 100644
|
||||
index 345ac63e2..62e793b71 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -186,4 +186,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,10 +19,10 @@ index e80ffe34a..95245a981 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/EntitySlime.java b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
index 87c37c0d6..a5238c673 100644
|
||||
index 8e8526f37..3ecf73219 100644
|
||||
--- a/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
+++ b/src/main/java/net/minecraft/server/EntitySlime.java
|
||||
@@ -274,7 +274,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
@@ -289,7 +289,7 @@ public class EntitySlime extends EntityInsentient implements IMonster {
|
||||
}
|
||||
|
||||
ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(blockposition);
|
||||
|
@ -32,5 +32,5 @@ index 87c37c0d6..a5238c673 100644
|
|||
if (random.nextInt(10) == 0 && flag && blockposition.getY() < 40) {
|
||||
return a(entitytypes, generatoraccess, enummobspawn, blockposition, random);
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 538ced5fe40748ce53726acf37c6434946c2b531 Mon Sep 17 00:00:00 2001
|
||||
From 71b2c1cb1242909e944ae6d3d572194c0740dc8b Mon Sep 17 00:00:00 2001
|
||||
From: kashike <kashike@vq.lc>
|
||||
Date: Thu, 3 Mar 2016 02:15:57 -0600
|
||||
Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 145178ebc0..a21067c279 100644
|
||||
index 82d73bc10..a050fb87a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1588,6 +1588,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1591,6 +1591,7 @@ public final class CraftServer implements Server {
|
||||
return helpMap;
|
||||
}
|
||||
|
||||
|
@ -17,5 +17,5 @@ index 145178ebc0..a21067c279 100644
|
|||
return commandMap;
|
||||
}
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From e3b7c7b79f0a486813a8d148e919771c456bb9f9 Mon Sep 17 00:00:00 2001
|
||||
From 591d96f983925b1f11835a5820a718022391c25f Mon Sep 17 00:00:00 2001
|
||||
From: Techcable <Techcable@outlook.com>
|
||||
Date: Thu, 3 Mar 2016 02:32:10 -0600
|
||||
Subject: [PATCH] Player Tab List and Title APIs
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/IChatBaseComponent.java b/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
index 2dc6342d46..1d0de5d9a7 100644
|
||||
index cf89622a8..fb97c51bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
+++ b/src/main/java/net/minecraft/server/IChatBaseComponent.java
|
||||
@@ -433,6 +433,7 @@ public interface IChatBaseComponent extends Message, Iterable<IChatBaseComponent
|
||||
@@ -439,6 +439,7 @@ public interface IChatBaseComponent extends Message, Iterable<IChatBaseComponent
|
||||
return IChatBaseComponent.ChatSerializer.a.toJsonTree(ichatbasecomponent);
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ index 2dc6342d46..1d0de5d9a7 100644
|
|||
public static IChatBaseComponent a(String s) {
|
||||
return (IChatBaseComponent) ChatDeserializer.a(IChatBaseComponent.ChatSerializer.a, s, IChatBaseComponent.class, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
index 3a6e780007..535056c64e 100644
|
||||
index 3a6e78000..535056c64 100644
|
||||
--- a/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
+++ b/src/main/java/net/minecraft/server/PacketPlayOutTitle.java
|
||||
@@ -43,12 +43,29 @@ public class PacketPlayOutTitle implements Packet<PacketListenerPlayOut> {
|
||||
|
@ -52,7 +52,7 @@ index 3a6e780007..535056c64e 100644
|
|||
|
||||
if (this.a == PacketPlayOutTitle.EnumTitleAction.TIMES) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 3d14319b75..982b06b840 100644
|
||||
index f0e06ad0e..7ca32d0be 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1,5 +1,6 @@
|
||||
|
@ -62,7 +62,7 @@ index 3d14319b75..982b06b840 100644
|
|||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.io.BaseEncoding;
|
||||
@@ -211,6 +212,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -210,6 +211,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -160,5 +160,5 @@ index 3d14319b75..982b06b840 100644
|
|||
public String getDisplayName() {
|
||||
return getHandle().displayName;
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From dd0db11122691ff1924e355426213c49f300506d Mon Sep 17 00:00:00 2001
|
||||
From c48197025b94d692932bad5256ceb2e1a7fc2b50 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:39:54 -0600
|
||||
Subject: [PATCH] Change implementation of (tile)entity removal list
|
||||
|
@ -6,18 +6,18 @@ Subject: [PATCH] Change implementation of (tile)entity removal list
|
|||
use sets for faster removal
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
|
||||
index da049cefe4..76704abda1 100644
|
||||
index f4598134e..6435b71ce 100644
|
||||
--- a/src/main/java/net/minecraft/server/World.java
|
||||
+++ b/src/main/java/net/minecraft/server/World.java
|
||||
@@ -40,7 +40,7 @@ public abstract class World implements IIBlockAccess, GeneratorAccess, AutoClose
|
||||
@@ -40,7 +40,7 @@ public abstract class World implements GeneratorAccess, AutoCloseable {
|
||||
public final List<TileEntity> tileEntityList = Lists.newArrayList();
|
||||
public final List<TileEntity> tileEntityListTick = Lists.newArrayList();
|
||||
protected final List<TileEntity> tileEntityListPending = Lists.newArrayList();
|
||||
- protected final List<TileEntity> tileEntityListUnload = Lists.newArrayList();
|
||||
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet(); // Paper
|
||||
private final long b = 16777215L;
|
||||
final Thread serverThread; // CraftBukkit - package private
|
||||
private int u;
|
||||
+ protected final java.util.Set<TileEntity> tileEntityListUnload = com.google.common.collect.Sets.newHashSet();
|
||||
final Thread serverThread; // CraftBukkit - package private // PAIL
|
||||
private int c;
|
||||
protected int i = (new Random()).nextInt();
|
||||
--
|
||||
2.22.1
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
From 63dc2abcfda17e4a21a4c439763da839d46fbf5d Mon Sep 17 00:00:00 2001
|
||||
From e0d4cb66f977db1a360ec9c70b9d5147e587f7c9 Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:46:17 -0600
|
||||
Subject: [PATCH] Add configurable portal search radius
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 95245a981..1d4ba4703 100644
|
||||
index 62e793b71..5de4ec052 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -191,4 +191,9 @@ public class PaperWorldConfig {
|
||||
|
@ -19,23 +19,22 @@ index 95245a981..1d4ba4703 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/PortalTravelAgent.java b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
index 6552f9e25..2f0a8e4bb 100644
|
||||
index 192ddb90a..25b694e7d 100644
|
||||
--- a/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
+++ b/src/main/java/net/minecraft/server/PortalTravelAgent.java
|
||||
@@ -70,10 +70,11 @@ public class PortalTravelAgent {
|
||||
} else {
|
||||
double d2 = Double.MAX_VALUE;
|
||||
@@ -39,10 +39,10 @@ public class PortalTravelAgent {
|
||||
public ShapeDetector.Shape a(BlockPosition blockposition, Vec3D vec3d, EnumDirection enumdirection, double d0, double d1, boolean flag) {
|
||||
VillagePlace villageplace = this.world.B();
|
||||
|
||||
- for (int i = -128; i <= 128; ++i) {
|
||||
+ int portalSearchRadius = world.paperConfig.portalSearchRadius; // Paper
|
||||
+ for (int i = -portalSearchRadius; i <= portalSearchRadius; ++i) { // Paper
|
||||
BlockPosition blockposition2;
|
||||
|
||||
- for (int j = -128; j <= 128; ++j) {
|
||||
+ for (int j = -world.paperConfig.portalSearchRadius; j <= world.paperConfig.portalSearchRadius; ++j) { // Paper
|
||||
for (BlockPosition blockposition3 = blockposition.b(i, this.world.getHeight() - 1 - blockposition.getY(), j); blockposition3.getY() >= 0; blockposition3 = blockposition2) {
|
||||
blockposition2 = blockposition3.down();
|
||||
if (this.world.getType(blockposition3).getBlock() == PortalTravelAgent.b) {
|
||||
- villageplace.a(this.world, blockposition, 128);
|
||||
+ villageplace.a(this.world, blockposition, world.paperConfig.portalSearchRadius); // Paper - TODO: VALIDATE
|
||||
List<VillagePlaceRecord> list = (List) villageplace.b((villageplacetype) -> {
|
||||
return villageplacetype == VillagePlaceType.u;
|
||||
- }, blockposition, 128, VillagePlace.Occupancy.ANY).collect(Collectors.toList());
|
||||
+ }, blockposition, world.paperConfig.portalSearchRadius, VillagePlace.Occupancy.ANY).collect(Collectors.toList()); // Paper - TODO: VALIDATE
|
||||
Optional<VillagePlaceRecord> optional = list.stream().min(Comparator.<VillagePlaceRecord>comparingDouble((villageplacerecord) -> { // CraftBukkit - decompile error
|
||||
return villageplacerecord.f().m(blockposition);
|
||||
}).thenComparingInt((villageplacerecord) -> {
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
From 404b45940ad785a62c5d7d90d72522e3cddd6a3e Mon Sep 17 00:00:00 2001
|
||||
From 4a11cde4aec5f912cdb2443ccb89f201fb9e8eef Mon Sep 17 00:00:00 2001
|
||||
From: Joseph Hirschfeld <joe@ibj.io>
|
||||
Date: Thu, 3 Mar 2016 02:48:12 -0600
|
||||
Subject: [PATCH] Add velocity warnings
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 63bd74f78..576bdd3ce 100644
|
||||
index a050fb87a..733abbbd9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -231,6 +231,7 @@ public final class CraftServer implements Server {
|
||||
@@ -232,6 +232,7 @@ public final class CraftServer implements Server {
|
||||
public boolean ignoreVanillaPermissions = false;
|
||||
private final List<CraftPlayer> playerView;
|
||||
public int reloadCount;
|
||||
|
@ -17,10 +17,10 @@ index 63bd74f78..576bdd3ce 100644
|
|||
static {
|
||||
ConfigurationSerialization.registerClass(CraftOfflinePlayer.class);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index d1d37c06b..ed496d03a 100644
|
||||
index a29693674..bb07dec3c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -405,10 +405,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
@@ -407,10 +407,41 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
||||
public void setVelocity(Vector velocity) {
|
||||
Preconditions.checkArgument(velocity != null, "velocity");
|
||||
velocity.checkFinite();
|
||||
|
@ -88,5 +88,5 @@ index 70b187190..56f5f54bd 100644
|
|||
log.log( Level.SEVERE, "Server thread dump (Look for plugins here before reporting to Paper!):" ); // Paper
|
||||
dumpThread( ManagementFactory.getThreadMXBean().getThreadInfo( MinecraftServer.getServer().serverThread.getId(), Integer.MAX_VALUE ), log );
|
||||
--
|
||||
2.22.0
|
||||
2.24.0
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
From c18e8929f1658981d8b517c7b3bf626db1b69654 Mon Sep 17 00:00:00 2001
|
||||
From e42da3bd1c37f4c4600ef73b72650e45d95aa9c9 Mon Sep 17 00:00:00 2001
|
||||
From: Sudzzy <originmc@outlook.com>
|
||||
Date: Thu, 3 Mar 2016 02:50:31 -0600
|
||||
Subject: [PATCH] Configurable inter-world teleportation safety
|
||||
|
@ -16,7 +16,7 @@ The wanted destination was on top of the emerald block however the player ended
|
|||
This only is the case if the player is teleporting between worlds.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 1d4ba4703..773fa8c32 100644
|
||||
index 5de4ec052..ba16bcc31 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -196,4 +196,9 @@ public class PaperWorldConfig {
|
||||
|
@ -30,10 +30,10 @@ index 1d4ba4703..773fa8c32 100644
|
|||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c50600b22..d247917f0 100644
|
||||
index 7ca32d0be..b0a459d3f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -755,7 +755,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -754,7 +754,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (fromWorld == toWorld) {
|
||||
entity.playerConnection.teleport(to);
|
||||
} else {
|
||||
|
@ -43,5 +43,5 @@ index c50600b22..d247917f0 100644
|
|||
return true;
|
||||
}
|
||||
--
|
||||
2.23.0
|
||||
2.24.0
|
||||
|
||||
|
|
Loading…
Reference in a new issue