More more more more work

This commit is contained in:
Nassim Jahnke 2021-11-23 14:22:49 +01:00 committed by MiniDigger | Martin
parent e9954ed32a
commit d7cdc72bdf
85 changed files with 272 additions and 261 deletions

View File

@ -8,5 +8,3 @@
# To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId: # To import classes from the vanilla Minecraft jar use `minecraft` as the artifactId:
# minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter # minecraft net.minecraft.world.level.entity.LevelEntityGetterAdapter
# minecraft net/minecraft/world/level/entity/LevelEntityGetter.java # minecraft net/minecraft/world/level/entity/LevelEntityGetter.java
minecraft net.minecraft.network.protocol.game.ClientboundLoginPacket

View File

@ -7,7 +7,7 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java
index 49be21d2676a93c384f37c09fe84eba2ffc11781..98c74a6b4f126f2a3e65f95e55561f652c10c4b9 100644 index 7b1fb280a86ab44756fc233b085f878d2a27ad66..cec39714294127478b6e73452354ba7ccab78b25 100644
--- a/src/main/java/org/bukkit/World.java --- a/src/main/java/org/bukkit/World.java
+++ b/src/main/java/org/bukkit/World.java +++ b/src/main/java/org/bukkit/World.java
@@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable; @@ -40,6 +40,33 @@ import org.jetbrains.annotations.Nullable;

View File

@ -25,10 +25,10 @@ index 817d4572c9991992b720b3ba163188ac0e5b59b7..01da2246c70237676597b3e70e3e169a
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
index a0516f72671522a6d7d9ea649506760f120b88bd..3d07235ad34d219c7c5fccd216a3a6935ced645c 100644 index eaf22cec54b512e0f57606f50627d5fe9b39bd5c..deb852aa0fb2ad55a94d3c7ee542a0cc8013be42 100644
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java --- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java +++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
@@ -35,7 +35,7 @@ public class RegionFileStorage implements AutoCloseable { @@ -36,7 +36,7 @@ public class RegionFileStorage implements AutoCloseable {
if (regionfile != null) { if (regionfile != null) {
return regionfile; return regionfile;
} else { } else {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Do not load chunks for Pathfinding
diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java diff --git a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
index 204ed5665adf2df7252fe2d21872db6956415311..b37acb6e6e253529a38f44a518a02c7747d3145e 100644 index be29c3a361415064c418256d5c0eca9e5a7cefd2..c33fda773ec071d27e924461a30a2938db35c231 100644
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java --- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java +++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
@@ -453,7 +453,12 @@ public class WalkNodeEvaluator extends NodeEvaluator { @@ -453,7 +453,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {

View File

@ -20,10 +20,10 @@ index 8834ed411a7db86b4d2b88183a1315317107d719..c45b5ab6776f3ac79f856c3a6467c510
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() { static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
@Override @Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index edb66e8c4507597ec8c35883460f88de8b263e54..60772b6d6fe171d7dd832cb132f7c56db9439bdb 100644 index 76e34fb4bb6b3d194e155bec30d36887350f3ee3..7d6fc7b64a4cdec0f432374c5258ec99ea52889c 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2190,8 +2190,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2200,8 +2200,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
}); });
} }
} }

View File

@ -20,7 +20,7 @@ index a0688ef7eb38e7c156193db3d94c44a3c290d8f2..53692c9a72a75cb5280165a99c956679
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
index 4c6c91deacddc4f383ecb6986e8e265a4e8eb7e6..d8c29bc282365b68951a39b4b2590b19957d578b 100644 index 954defe131bdcd81178e3bd31755eb18b9aef026..be5ad056571f6522a205b8e9de8940ad1fe8c988 100644
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
@@ -3,6 +3,7 @@ package net.minecraft.world.level.block; @@ -3,6 +3,7 @@ package net.minecraft.world.level.block;
@ -31,11 +31,13 @@ index 4c6c91deacddc4f383ecb6986e8e265a4e8eb7e6..d8c29bc282365b68951a39b4b2590b19
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.tags.FluidTags; import net.minecraft.tags.FluidTags;
import net.minecraft.tags.Tag; import net.minecraft.tags.Tag;
@@ -41,6 +42,7 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { @@ -40,7 +41,8 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock {
@Override @Override
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
- if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) {
+ if (this instanceof GrassBlock && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper + if (this instanceof GrassBlock && world.paperConfig.grassUpdateRate != 1 && (world.paperConfig.grassUpdateRate < 1 || (MinecraftServer.currentTick + pos.hashCode()) % world.paperConfig.grassUpdateRate != 0)) { return; } // Paper
if (!SpreadingSnowyDirtBlock.canBeGrass(state, (LevelReader) world, pos)) { + if (!SpreadingSnowyDirtBlock.canBeGrass(state, (LevelReader) world, pos)) {
// CraftBukkit start // CraftBukkit start
if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) { if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
return;

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 322edb169e9b482aac71292b992d4a3c2622b2d8..07a4f76d8142b5ee60910faf552fb33095694512 100644 index bb6083b40e211964730f88057df509f6d860bc11..7c0437929964d95797c13b690a6167f2bce95736 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -544,6 +544,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -545,6 +545,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public void setBlocksDirty(BlockPos pos, BlockState old, BlockState updated) {} public void setBlocksDirty(BlockPos pos, BlockState old, BlockState updated) {}
public void updateNeighborsAt(BlockPos pos, Block block) { public void updateNeighborsAt(BlockPos pos, Block block) {

View File

@ -10,11 +10,11 @@ After: http://i.imgur.com/nJ46crB.png
Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor Optimize redundant converting of static fields into an unsigned long each call by precomputing it in ctor
diff --git a/src/main/java/net/minecraft/util/BitStorage.java b/src/main/java/net/minecraft/util/BitStorage.java diff --git a/src/main/java/net/minecraft/util/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java
index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..07e1374ac3430662edd9f585e59b785e329f0820 100644 index b74970e3b3e429284099385b2b3d543793f75319..62ec6e7bd99451eb62daf86c05217e4693ce9d20 100644
--- a/src/main/java/net/minecraft/util/BitStorage.java --- a/src/main/java/net/minecraft/util/SimpleBitStorage.java
+++ b/src/main/java/net/minecraft/util/BitStorage.java +++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java
@@ -12,8 +12,8 @@ public class BitStorage { @@ -11,8 +11,8 @@ public class SimpleBitStorage implements BitStorage {
private final long mask; private final long mask;
private final int size; private final int size;
private final int valuesPerLong; private final int valuesPerLong;
@ -24,19 +24,19 @@ index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..07e1374ac3430662edd9f585e59b785e
+ private final int divideAdd; private final long divideAddUnsigned; // Paper + private final int divideAdd; private final long divideAddUnsigned; // Paper
private final int divideShift; private final int divideShift;
public BitStorage(int elementBits, int size) { public SimpleBitStorage(int elementBits, int size, int[] is) {
@@ -27,8 +27,8 @@ public class BitStorage { @@ -56,8 +56,8 @@ public class SimpleBitStorage implements BitStorage {
this.mask = (1L << elementBits) - 1L; this.mask = (1L << elementBits) - 1L;
this.valuesPerLong = (char)(64 / elementBits); this.valuesPerLong = (char)(64 / elementBits);
int i = 3 * (this.valuesPerLong - 1); int i = 3 * (this.valuesPerLong - 1);
- this.divideMul = MAGIC[i + 0]; - this.divideMul = MAGIC[i + 0];
- this.divideAdd = MAGIC[i + 1]; - this.divideAdd = MAGIC[i + 1];
+ this.divideMul = BitStorage.MAGIC[i + 0]; this.divideMulUnsigned = Integer.toUnsignedLong(this.divideMul); // Paper + this.divideMul = MAGIC[i + 0]; this.divideMulUnsigned = Integer.toUnsignedLong(this.divideMul); // Paper
+ this.divideAdd = BitStorage.MAGIC[i + 1]; this.divideAddUnsigned = Integer.toUnsignedLong(this.divideAdd); // Paper + this.divideAdd = MAGIC[i + 1]; this.divideAddUnsigned = Integer.toUnsignedLong(this.divideAdd); // Paper
this.divideShift = MAGIC[i + 2]; this.divideShift = MAGIC[i + 2];
int j = (size + this.valuesPerLong - 1) / this.valuesPerLong; int j = (size + this.valuesPerLong - 1) / this.valuesPerLong;
if (storage != null) { if (data != null) {
@@ -44,14 +44,14 @@ public class BitStorage { @@ -73,15 +73,15 @@ public class SimpleBitStorage implements BitStorage {
} }
private int cellIndex(int index) { private int cellIndex(int index) {
@ -48,6 +48,7 @@ index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..07e1374ac3430662edd9f585e59b785e
+ return (int) ((long) index * this.divideMulUnsigned + this.divideAddUnsigned >> 32 >> this.divideShift); // Paper + return (int) ((long) index * this.divideMulUnsigned + this.divideAddUnsigned >> 32 >> this.divideShift); // Paper
} }
@Override
- public int getAndSet(int index, int value) { - public int getAndSet(int index, int value) {
- Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index);
- Validate.inclusiveBetween(0L, this.mask, (long)value); - Validate.inclusiveBetween(0L, this.mask, (long)value);
@ -57,10 +58,10 @@ index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..07e1374ac3430662edd9f585e59b785e
int i = this.cellIndex(index); int i = this.cellIndex(index);
long l = this.data[i]; long l = this.data[i];
int j = (index - i * this.valuesPerLong) * this.bits; int j = (index - i * this.valuesPerLong) * this.bits;
@@ -60,17 +60,17 @@ public class BitStorage { @@ -91,9 +91,9 @@ public class SimpleBitStorage implements BitStorage {
return k;
} }
@Override
- public void set(int index, int value) { - public void set(int index, int value) {
- Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index);
- Validate.inclusiveBetween(0L, this.mask, (long)value); - Validate.inclusiveBetween(0L, this.mask, (long)value);
@ -70,9 +71,10 @@ index 65bd706ca96f5c0ec4573da9fb144fb51d2de919..07e1374ac3430662edd9f585e59b785e
int i = this.cellIndex(index); int i = this.cellIndex(index);
long l = this.data[i]; long l = this.data[i];
int j = (index - i * this.valuesPerLong) * this.bits; int j = (index - i * this.valuesPerLong) * this.bits;
this.data[i] = l & ~(this.mask << j) | ((long)value & this.mask) << j; @@ -101,8 +101,8 @@ public class SimpleBitStorage implements BitStorage {
} }
@Override
- public int get(int index) { - public int get(int index) {
- Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index); - Validate.inclusiveBetween(0L, (long)(this.size - 1), (long)index);
+ public final int get(int index) { // Paper - make final for inline + public final int get(int index) { // Paper - make final for inline

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Workaround for setting passengers on players
SPIGOT-1915 & GH-114 SPIGOT-1915 & GH-114
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index f65140c04efd036019c7f91643ecd9644cd498df..4592ac12058e7cf575ceb47a0021528f5dd91b0a 100644 index e41df687f7d681574bc16f5d3b1572a3ea9902f0..a880c6434f6dbbc8ce9f82315ba906090c7240a1 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -908,6 +908,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -915,6 +915,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
return true; return true;
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Player Collision
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
index ad73dbb8e7112e2843c4104d367c98bf8b2b3370..f54096daee8c51a887b943ddd257ac2eae63952e 100644 index 01da2246c70237676597b3e70e3e169ab1132071..c8242aa5b4a896111b23de60fa120ec6be06d0ca 100644
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java --- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java +++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
@@ -244,4 +244,9 @@ public class PaperConfig { @@ -244,4 +244,9 @@ public class PaperConfig {
@ -19,7 +19,7 @@ index ad73dbb8e7112e2843c4104d367c98bf8b2b3370..f54096daee8c51a887b943ddd257ac2e
+ } + }
} }
diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
index 8885220e4813b34627b42523834bbec995d8950d..4c9660176e783999301565790b8cf6f47b0d02a2 100644 index 8993d8809c109212ab278e15c09cebab9e89342f..005a3058c51a41a39f050b1817e2079be93ad366 100644
--- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
+++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundSetPlayerTeamPacket.java
@@ -193,7 +193,7 @@ public class ClientboundSetPlayerTeamPacket implements Packet<ClientGamePacketLi @@ -193,7 +193,7 @@ public class ClientboundSetPlayerTeamPacket implements Packet<ClientGamePacketLi
@ -32,10 +32,10 @@ index 8885220e4813b34627b42523834bbec995d8950d..4c9660176e783999301565790b8cf6f4
buf.writeComponent(this.playerPrefix); buf.writeComponent(this.playerPrefix);
buf.writeComponent(this.playerSuffix); buf.writeComponent(this.playerSuffix);
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d6195f7b0bac1bd1ababe8c4eec07654c323c014..4e7016c20a72271ff62fb676280d3880864919f1 100644 index 697f2e6c10a74cb60191ed8c1cb563360089c8ea..d2941bb9bfb0517a05942714015bdf72da0a775d 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -161,6 +161,7 @@ import net.minecraft.world.level.storage.loot.LootTables; @@ -159,6 +159,7 @@ import net.minecraft.world.level.storage.loot.LootTables;
import net.minecraft.world.level.storage.loot.PredicateManager; import net.minecraft.world.level.storage.loot.PredicateManager;
import net.minecraft.world.phys.Vec2; import net.minecraft.world.phys.Vec2;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
@ -43,7 +43,7 @@ index d6195f7b0bac1bd1ababe8c4eec07654c323c014..4e7016c20a72271ff62fb676280d3880
import org.apache.commons.lang3.Validate; import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@@ -616,6 +617,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -608,6 +609,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld())); this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
} }
@ -65,7 +65,7 @@ index d6195f7b0bac1bd1ababe8c4eec07654c323c014..4e7016c20a72271ff62fb676280d3880
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP)); this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
this.connection.acceptConnections(); this.connection.acceptConnections();
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index e2e20a33c8e434af6b3637f49181c530b32633c7..4b21d3d73d76b81377a1d2222f37074c75ac3753 100644 index db52eb4df917c9ad3ba807e40f1d44ea9c52aae8..e4ebac252ac25bd51acfc6a0e9513c96ef4cfd95 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -87,6 +87,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage; @@ -87,6 +87,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
@ -76,7 +76,7 @@ index e2e20a33c8e434af6b3637f49181c530b32633c7..4b21d3d73d76b81377a1d2222f37074c
import net.minecraft.world.scores.Team; import net.minecraft.world.scores.Team;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.Logger;
@@ -149,6 +150,7 @@ public abstract class PlayerList { @@ -150,6 +151,7 @@ public abstract class PlayerList {
// CraftBukkit start // CraftBukkit start
private CraftServer cserver; private CraftServer cserver;
private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>(); private final Map<String,ServerPlayer> playersByName = new java.util.HashMap<>();
@ -115,7 +115,7 @@ index e2e20a33c8e434af6b3637f49181c530b32633c7..4b21d3d73d76b81377a1d2222f37074c
this.save(entityplayer); this.save(entityplayer);
if (entityplayer.isPassenger()) { if (entityplayer.isPassenger()) {
Entity entity = entityplayer.getRootVehicle(); Entity entity = entityplayer.getRootVehicle();
@@ -1127,6 +1146,13 @@ public abstract class PlayerList { @@ -1132,6 +1151,13 @@ public abstract class PlayerList {
} }
// CraftBukkit end // CraftBukkit end

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Configurable RCON IP address
For servers with multiple IP's, ability to bind to a specific interface. For servers with multiple IP's, ability to bind to a specific interface.
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
index 9793b51080d0f4adba0d6bc684a6927382420a0b..12e55aabf0daf341ec74688e79c43451e820e6dc 100644 index 9682a149d996cc19d7bc0e9506acb1346e5c222e..07fd3da4de300f80516961ae22700dbc741e81dc 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServerProperties.java
@@ -67,6 +67,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie @@ -70,6 +70,8 @@ public class DedicatedServerProperties extends Settings<DedicatedServerPropertie
@Nullable @Nullable
private WorldGenSettings worldGenSettings; private WorldGenSettings worldGenSettings;

View File

@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
Don't even get me started Don't even get me started
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 407292123b29fbc558b6b826878bf739fba05436..f6761a4bfa7a73cdbd1ecd4be1f9e78f61a67ae3 100644 index e5a0f6edbb1d43f8c918b9cee9a291db630663b4..88066799a0090d22a2e22df17e2967774089f8b7 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1230,10 +1230,16 @@ public abstract class LivingEntity extends Entity { @@ -1225,10 +1225,16 @@ public abstract class LivingEntity extends Entity {
} }
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) { public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
@ -28,7 +28,7 @@ index 407292123b29fbc558b6b826878bf739fba05436..f6761a4bfa7a73cdbd1ecd4be1f9e78f
if (this.valid) { if (this.valid) {
this.level.getCraftServer().getPluginManager().callEvent(event); this.level.getCraftServer().getPluginManager().callEvent(event);
diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java diff --git a/src/main/java/net/minecraft/world/food/FoodData.java b/src/main/java/net/minecraft/world/food/FoodData.java
index 4957366784799fb204ecec735655c3440734ca57..97133bd4af30d0ba92cbf884b83140f3399f92e2 100644 index ae323c786b5a0d61d9292469baa50a3ad8e4ccff..2934b6de1f1fb914a532ee20184df99d1acd8e65 100644
--- a/src/main/java/net/minecraft/world/food/FoodData.java --- a/src/main/java/net/minecraft/world/food/FoodData.java
+++ b/src/main/java/net/minecraft/world/food/FoodData.java +++ b/src/main/java/net/minecraft/world/food/FoodData.java
@@ -84,7 +84,7 @@ public class FoodData { @@ -84,7 +84,7 @@ public class FoodData {
@ -37,6 +37,6 @@ index 4957366784799fb204ecec735655c3440734ca57..97133bd4af30d0ba92cbf884b83140f3
- player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason - player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
+ player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED, true); // CraftBukkit - added RegainReason // Paper - This is fast regen + player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED, true); // CraftBukkit - added RegainReason // Paper - This is fast regen
// this.a(f); CraftBukkit - EntityExhaustionEvent // this.addExhaustion(f); CraftBukkit - EntityExhaustionEvent
player.applyExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent player.causeFoodExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
this.tickTimer = 0; this.tickTimer = 0;

View File

@ -24,7 +24,7 @@ index 91d9717c88d7a413a71cc0897402dac0013fea4d..ee771addea0af09749d6cbed8ff332dd
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
index 958d84d0046814a4a5715d9c8be09318f483aa22..54eb7ba0265bb155dd1c753661242fa9d299ff80 100644 index 0c063ec7c5907710947d8e1ee0f122448364e64e..48776edab1479b5e861eca8146da04ebee01c46a 100644
--- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java --- a/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FrostedIceBlock.java
@@ -32,6 +32,7 @@ public class FrostedIceBlock extends IceBlock { @@ -32,6 +32,7 @@ public class FrostedIceBlock extends IceBlock {
@ -39,14 +39,14 @@ index 958d84d0046814a4a5715d9c8be09318f483aa22..54eb7ba0265bb155dd1c753661242fa9
mutableBlockPos.setWithOffset(pos, direction); mutableBlockPos.setWithOffset(pos, direction);
BlockState blockState = world.getBlockState(mutableBlockPos); BlockState blockState = world.getBlockState(mutableBlockPos);
if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) { if (blockState.is(this) && !this.slightlyMelt(blockState, world, mutableBlockPos)) {
- world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, 20, 40)); - world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, 20, 40));
+ world.getBlockTicks().scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + world.scheduleTick(mutableBlockPos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
} }
} }
} else { } else {
- world.getBlockTicks().scheduleTick(pos, this, Mth.nextInt(random, 20, 40)); - world.scheduleTick(pos, this, Mth.nextInt(random, 20, 40));
+ world.getBlockTicks().scheduleTick(pos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay + world.scheduleTick(pos, this, Mth.nextInt(random, world.paperConfig.frostedIceDelayMin, world.paperConfig.frostedIceDelayMax)); // Paper - use configurable min/max delay
} }
} }

View File

@ -6,18 +6,18 @@ Subject: [PATCH] remove null possibility for getServer singleton
to stop IDE complaining about potential NPE to stop IDE complaining about potential NPE
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 4e7016c20a72271ff62fb676280d3880864919f1..d58516922198ffeb51263243e7b7b666de2d9ea2 100644 index d2941bb9bfb0517a05942714015bdf72da0a775d..9a58a678b07bb45ee0e608fdd662b13fcc04d31c 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -188,6 +188,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot @@ -185,6 +185,7 @@ import org.spigotmc.SlackActivityAccountant; // Spigot
public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements SnooperPopulator, CommandSource, AutoCloseable { public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements CommandSource, AutoCloseable {
+ private static MinecraftServer SERVER; // Paper + private static MinecraftServer SERVER; // Paper
public static final Logger LOGGER = LogManager.getLogger(); public static final Logger LOGGER = LogManager.getLogger();
public static final String VANILLA_BRAND = "vanilla";
private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F; private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
private static final int TICK_STATS_SPAN = 100; @@ -319,6 +320,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -317,6 +318,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, Thread thread, RegistryAccess.RegistryHolder iregistrycustom_dimension, LevelStorageSource.LevelStorageAccess convertable_conversionsession, WorldData savedata, PackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, ServerResources datapackresources, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) { public MinecraftServer(OptionSet options, DataPackConfig datapackconfiguration, Thread thread, RegistryAccess.RegistryHolder iregistrycustom_dimension, LevelStorageSource.LevelStorageAccess convertable_conversionsession, WorldData savedata, PackRepository resourcepackrepository, Proxy proxy, DataFixer datafixer, ServerResources datapackresources, @Nullable MinecraftSessionService minecraftsessionservice, @Nullable GameProfileRepository gameprofilerepository, @Nullable GameProfileCache usercache, ChunkProgressListenerFactory worldloadlistenerfactory) {
super("Server"); super("Server");
@ -25,7 +25,7 @@ index 4e7016c20a72271ff62fb676280d3880864919f1..d58516922198ffeb51263243e7b7b666
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE; this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
this.profiler = this.metricsRecorder.getProfiler(); this.profiler = this.metricsRecorder.getProfiler();
this.onMetricsRecordingStopped = (methodprofilerresults) -> { this.onMetricsRecordingStopped = (methodprofilerresults) -> {
@@ -2259,7 +2261,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -2255,7 +2257,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Deprecated @Deprecated
public static MinecraftServer getServer() { public static MinecraftServer getServer() {

View File

@ -13,10 +13,10 @@ custom renderers are in use, defaulting to the much simpler Vanilla system.
Additionally, numerous issues to player position tracking on maps has been fixed. Additionally, numerous issues to player position tracking on maps has been fixed.
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index 9d6ff9aff140574038b7f619cdfebf47d4b3a14c..26c25b103f08a2e66179d1ed8f450778aa2e539a 100644 index 9582da4afcc68b3c898be86dcf74f0833258e34c..94a64e0e7a0ea147ae008f91a0787c8840566f4f 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java --- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -1976,6 +1976,7 @@ public class ServerLevel extends Level implements WorldGenLevel { @@ -2010,6 +2010,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
{ {
if ( iter.next().player == entity ) if ( iter.next().player == entity )
{ {
@ -25,10 +25,10 @@ index 9d6ff9aff140574038b7f619cdfebf47d4b3a14c..26c25b103f08a2e66179d1ed8f450778
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 1bdaa8d1a65b11175801f47ddfe15bffee6143bf..82d71f529dd5d270820fbfcd9a6ee7363ae94941 100644 index 5d37c82bd5cd20aa2d452f0214f3303768e36a3d..6cf50fbfdeee38f8835ad8dd6ec6d16416174067 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -88,6 +88,7 @@ import net.minecraft.world.item.ElytraItem; @@ -87,6 +87,7 @@ import net.minecraft.world.item.ElytraItem;
import net.minecraft.world.item.ItemCooldowns; import net.minecraft.world.item.ItemCooldowns;
import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.Items; import net.minecraft.world.item.Items;
@ -36,7 +36,7 @@ index 1bdaa8d1a65b11175801f47ddfe15bffee6143bf..82d71f529dd5d270820fbfcd9a6ee736
import net.minecraft.world.item.ProjectileWeaponItem; import net.minecraft.world.item.ProjectileWeaponItem;
import net.minecraft.world.item.SwordItem; import net.minecraft.world.item.SwordItem;
import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.Recipe;
@@ -107,6 +108,7 @@ import net.minecraft.world.level.block.entity.SignBlockEntity; @@ -105,6 +106,7 @@ import net.minecraft.world.level.block.entity.SignBlockEntity;
import net.minecraft.world.level.block.entity.StructureBlockEntity; import net.minecraft.world.level.block.entity.StructureBlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.level.block.state.pattern.BlockInWorld; import net.minecraft.world.level.block.state.pattern.BlockInWorld;
@ -44,7 +44,7 @@ index 1bdaa8d1a65b11175801f47ddfe15bffee6143bf..82d71f529dd5d270820fbfcd9a6ee736
import net.minecraft.world.phys.AABB; import net.minecraft.world.phys.AABB;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
import net.minecraft.world.scores.PlayerTeam; import net.minecraft.world.scores.PlayerTeam;
@@ -732,6 +734,14 @@ public abstract class Player extends LivingEntity { @@ -730,6 +732,14 @@ public abstract class Player extends LivingEntity {
return null; return null;
} }
// CraftBukkit end // CraftBukkit end
@ -60,10 +60,10 @@ index 1bdaa8d1a65b11175801f47ddfe15bffee6143bf..82d71f529dd5d270820fbfcd9a6ee736
return entityitem; return entityitem;
} }
diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java diff --git a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be83b4cae86 100644 index 3b35ec1df648a3de920ea0c15962388044737bbc..a6219dd70ab76959b2aaa155d5d17acc22095753 100644
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java --- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java +++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
@@ -64,6 +64,7 @@ public class MapItemSavedData extends SavedData { @@ -63,6 +63,7 @@ public class MapItemSavedData extends SavedData {
public final Map<String, MapDecoration> decorations = Maps.newLinkedHashMap(); public final Map<String, MapDecoration> decorations = Maps.newLinkedHashMap();
private final Map<String, MapFrame> frameMarkers = Maps.newHashMap(); private final Map<String, MapFrame> frameMarkers = Maps.newHashMap();
private int trackedDecorationCount; private int trackedDecorationCount;
@ -71,7 +71,7 @@ index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be8
// CraftBukkit start // CraftBukkit start
public final CraftMapView mapView; public final CraftMapView mapView;
@@ -84,6 +85,7 @@ public class MapItemSavedData extends SavedData { @@ -83,6 +84,7 @@ public class MapItemSavedData extends SavedData {
// CraftBukkit start // CraftBukkit start
this.mapView = new CraftMapView(this); this.mapView = new CraftMapView(this);
this.server = (CraftServer) org.bukkit.Bukkit.getServer(); this.server = (CraftServer) org.bukkit.Bukkit.getServer();
@ -79,7 +79,7 @@ index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be8
// CraftBukkit end // CraftBukkit end
} }
@@ -139,6 +141,7 @@ public class MapItemSavedData extends SavedData { @@ -138,6 +140,7 @@ public class MapItemSavedData extends SavedData {
if (abyte.length == 16384) { if (abyte.length == 16384) {
worldmap.colors = abyte; worldmap.colors = abyte;
} }
@ -87,7 +87,7 @@ index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be8
ListTag nbttaglist = nbt.getList("banners", 10); ListTag nbttaglist = nbt.getList("banners", 10);
@@ -549,6 +552,21 @@ public class MapItemSavedData extends SavedData { @@ -548,6 +551,21 @@ public class MapItemSavedData extends SavedData {
public class HoldingPlayer { public class HoldingPlayer {
@ -109,7 +109,7 @@ index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be8
public final Player player; public final Player player;
private boolean dirtyData = true; private boolean dirtyData = true;
private int minDirtyX; private int minDirtyX;
@@ -582,7 +600,9 @@ public class MapItemSavedData extends SavedData { @@ -581,7 +599,9 @@ public class MapItemSavedData extends SavedData {
@Nullable @Nullable
Packet<?> nextUpdatePacket(int mapId) { Packet<?> nextUpdatePacket(int mapId) {
MapItemSavedData.MapPatch worldmap_b; MapItemSavedData.MapPatch worldmap_b;
@ -120,7 +120,7 @@ index 6859fafa42527d45366018f737c19e6c3777d152..15c6f9d1c43fbedac70526a84a010be8
if (this.dirtyData) { if (this.dirtyData) {
this.dirtyData = false; this.dirtyData = false;
@@ -598,6 +618,8 @@ public class MapItemSavedData extends SavedData { @@ -597,6 +617,8 @@ public class MapItemSavedData extends SavedData {
// CraftBukkit start // CraftBukkit start
java.util.Collection<MapDecoration> icons = new java.util.ArrayList<MapDecoration>(); java.util.Collection<MapDecoration> icons = new java.util.ArrayList<MapDecoration>();

View File

@ -515,10 +515,10 @@ index 0000000000000000000000000000000000000000..3377b86c337d0234bbb9b0349e4034a7
+ } + }
+} +}
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index cff2867eb92fb3b69ed4645d3b5294eaca62e998..78d547660cc3996606e671466d33170faa8a2c29 100644 index 30d30c2fd66b312a45d3bf706d41b38724d52a7b..4b23eaa6bcd7fd3eddbe7512bae4270c6324242b 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -168,6 +168,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -168,6 +168,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
}; };
// Paper end // Paper end
@ -527,7 +527,7 @@ index cff2867eb92fb3b69ed4645d3b5294eaca62e998..78d547660cc3996606e671466d33170f
public CraftEntity getBukkitEntity() { public CraftEntity getBukkitEntity() {
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
index e347f30d7c5be460788cc815da2f4f8742488713..f57864ce919ef4721cfb5913c636fe8903ce4cc1 100644 index 298f7e29412ecaf15b3fb15da9ee3d6b250f772a..8a07d5d25086d7544757bb86181fbe2b5e743d29 100644
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
@@ -46,6 +46,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme @@ -46,6 +46,7 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
@ -642,7 +642,7 @@ index b79d9d26a8e60f9c0ecd69e9c2f9cfd087e21d23..f23fff80d07ac7d06715efe67cb49ebb
if (player != null) { if (player != null) {
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player); builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index e9f671b9e6b73c28835bf787f6517b997c306fa2..6a1f47c58f1186f12fd112feedaf11da85b0bdcc 100644 index d0c1121fabe46e8268cd2691398361c182be9db5..9796e2d3cd9601416124ad5c36f962ed3f8682e8 100644
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java --- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -13,8 +13,9 @@ import org.bukkit.craftbukkit.CraftWorld; @@ -13,8 +13,9 @@ import org.bukkit.craftbukkit.CraftWorld;

View File

@ -19,10 +19,10 @@ index c8242aa5b4a896111b23de60fa120ec6be06d0ca..c6ca15a5cc53995ca0ada9c9ac9dc1d0
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java diff --git a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
index 90a97a87fe67d8c3bbc60f08c9911faa4259349e..2153e7035535990b5307b85d8bc3dab50c0a3ae8 100644 index 819cd341c4e352a75c38a0ed48097170ddd53082..79683676311d0e13383887db5cb8638f13a0af94 100644
--- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java --- a/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
+++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java +++ b/src/main/java/net/minecraft/world/scores/ScoreboardSaveData.java
@@ -144,6 +144,7 @@ public class ScoreboardSaveData extends SavedData { @@ -136,6 +136,7 @@ public class ScoreboardSaveData extends SavedData {
ListTag listTag = new ListTag(); ListTag listTag = new ListTag();
for(PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) { for(PlayerTeam playerTeam : this.scoreboard.getPlayerTeams()) {

View File

@ -12,10 +12,10 @@ the user never changed the default setting for Spigot's save on stop only.
1.17: TODO does this need the synchronized blocks anymore? 1.17: TODO does this need the synchronized blocks anymore?
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index d58516922198ffeb51263243e7b7b666de2d9ea2..9c73d69658de96b8216c7d945521af84d41c69ab 100644 index 9a58a678b07bb45ee0e608fdd662b13fcc04d31c..625a133eacf38fb8b11f4451e063dc21150f0e79 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -989,7 +989,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -972,7 +972,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} catch (java.lang.InterruptedException ignored) {} // Paper } catch (java.lang.InterruptedException ignored) {} // Paper
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) { if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
MinecraftServer.LOGGER.info("Saving usercache.json"); MinecraftServer.LOGGER.info("Saving usercache.json");
@ -25,10 +25,10 @@ index d58516922198ffeb51263243e7b7b666de2d9ea2..9c73d69658de96b8216c7d945521af84
// Spigot end // Spigot end
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index bd94277862e0f5546b4df81fbd535d2e4c7ef5b1..7d834c1b1588851188372eebd9efad9313c610f7 100644 index 66f74553fdddf1a6304919e4a9cde1dc2b935cf5..2201aeecd9936402825200dd696dc5607fe0f880 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -257,7 +257,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -255,7 +255,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
} }
if (this.convertOldUsers()) { if (this.convertOldUsers()) {
@ -38,7 +38,7 @@ index bd94277862e0f5546b4df81fbd535d2e4c7ef5b1..7d834c1b1588851188372eebd9efad93
if (!OldUsersConverter.serverReadyAfterUserconversion(this)) { if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 769f2a595f8ca6030c17d5472ee1773063ebe52c..548627b5a12e79ac31136b2695e45f9452115348 100644 index 2ead61f86571b9ae67300a6c286d363dd7d64a8a..e8515f4ed1f29ba926bc4ab6d918722aee450ac2 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java --- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java +++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -118,7 +118,7 @@ public class GameProfileCache { @@ -118,7 +118,7 @@ public class GameProfileCache {
@ -76,7 +76,7 @@ index 769f2a595f8ca6030c17d5472ee1773063ebe52c..548627b5a12e79ac31136b2695e45f94
} }
return optional; return optional;
@@ -270,7 +270,7 @@ public class GameProfileCache { @@ -274,7 +274,7 @@ public class GameProfileCache {
return arraylist; return arraylist;
} }
@ -85,7 +85,7 @@ index 769f2a595f8ca6030c17d5472ee1773063ebe52c..548627b5a12e79ac31136b2695e45f94
JsonArray jsonarray = new JsonArray(); JsonArray jsonarray = new JsonArray();
DateFormat dateformat = GameProfileCache.createDateFormat(); DateFormat dateformat = GameProfileCache.createDateFormat();
@@ -278,6 +278,7 @@ public class GameProfileCache { @@ -282,6 +282,7 @@ public class GameProfileCache {
jsonarray.add(GameProfileCache.writeGameProfile(usercache_usercacheentry, dateformat)); jsonarray.add(GameProfileCache.writeGameProfile(usercache_usercacheentry, dateformat));
}); });
String s = this.gson.toJson(jsonarray); String s = this.gson.toJson(jsonarray);
@ -93,7 +93,7 @@ index 769f2a595f8ca6030c17d5472ee1773063ebe52c..548627b5a12e79ac31136b2695e45f94
try { try {
BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8); BufferedWriter bufferedwriter = Files.newWriter(this.file, StandardCharsets.UTF_8);
@@ -302,7 +303,14 @@ public class GameProfileCache { @@ -306,7 +307,14 @@ public class GameProfileCache {
} catch (IOException ioexception) { } catch (IOException ioexception) {
; ;
} }

View File

@ -24,10 +24,10 @@ index 1c8ca94e981b216c338f8b0a34303d558901c5d8..6324c3465cf34cea2e7fd7d8c26a0cbe
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
index c062b9e2b58485ad54afe06ec09d9ed2d22adefb..3a94e2fca036ba7853de2e79a585e66116612845 100644 index 28210d31d10de624aba1aeb30b99f3f576d5c4e6..3d27cbf5e9105def2f38525a85da5acf8ebf8fe9 100644
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java --- a/src/main/java/net/minecraft/server/level/ServerEntity.java
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java +++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
@@ -68,7 +68,7 @@ public class ServerEntity { @@ -67,7 +67,7 @@ public class ServerEntity {
private boolean wasRiding; private boolean wasRiding;
private boolean wasOnGround; private boolean wasOnGround;
// CraftBukkit start // CraftBukkit start
@ -37,7 +37,7 @@ index c062b9e2b58485ad54afe06ec09d9ed2d22adefb..3a94e2fca036ba7853de2e79a585e661
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) { public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
this.trackedPlayers = trackedPlayers; this.trackedPlayers = trackedPlayers;
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
index 8ad1b3cb16533d62deda643ce0cdda308743f78e..dcbd9ec44fb8d1334aca33c136b121ab5c25a0e2 100644 index 7135e22a2ee274eaef52804d60f15002176ff1db..114ea3c898a23575bb2b06bf5c754330c38495e7 100644
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
@@ -97,6 +97,27 @@ public class PrimedTnt extends Entity { @@ -97,6 +97,27 @@ public class PrimedTnt extends Entity {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Faster redstone torch rapid clock removal
Only resize the the redstone torch list once, since resizing arrays / lists is costly Only resize the the redstone torch list once, since resizing arrays / lists is costly
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 07a4f76d8142b5ee60910faf552fb33095694512..3032f52ea3375c62aa13dc1802a85df22a9f3082 100644 index 7c0437929964d95797c13b690a6167f2bce95736..8142f6c2d3bd17aec313d46141910f0743c6345e 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -161,6 +161,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -162,6 +162,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
private org.spigotmc.TickLimiter tileLimiter; private org.spigotmc.TickLimiter tileLimiter;
private int tileTickPosition; private int tileTickPosition;
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
@ -18,7 +18,7 @@ index 07a4f76d8142b5ee60910faf552fb33095694512..3032f52ea3375c62aa13dc1802a85df2
public CraftWorld getWorld() { public CraftWorld getWorld() {
return this.world; return this.world;
diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java diff --git a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
index 28e785813628e5763576812ec6201d1e5b1def23..47df36208d91dad126849e29c0e410f95b168f23 100644 index 298928f9dae5fc307872f4cb286b644ed5dbcfde..954b86bea345a8e0e3a8dd425f356db6f5cd496f 100644
--- a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java --- a/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
+++ b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RedstoneTorchBlock.java
@@ -21,7 +21,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit @@ -21,7 +21,7 @@ import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
@ -33,7 +33,7 @@ index 28e785813628e5763576812ec6201d1e5b1def23..47df36208d91dad126849e29c0e410f9
@@ -72,11 +72,15 @@ public class RedstoneTorchBlock extends TorchBlock { @@ -72,11 +72,15 @@ public class RedstoneTorchBlock extends TorchBlock {
@Override @Override
public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) { public void tick(BlockState state, ServerLevel world, BlockPos pos, Random random) {
boolean flag = this.hasNeighborSignal((Level) world, pos, state); boolean flag = this.hasNeighborSignal(world, pos, state);
- List list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world); - List list = (List) RedstoneTorchBlock.RECENT_TOGGLES.get(world);
- -
- while (list != null && !list.isEmpty() && world.getGameTime() - ((RedstoneTorchBlock.Toggle) list.get(0)).when > 60L) { - while (list != null && !list.isEmpty() && world.getGameTime() - ((RedstoneTorchBlock.Toggle) list.get(0)).when > 60L) {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add server-name parameter
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 2da0896ca3b15deded3556c6298a41f18324db58..f09520b7723dee6ab04215276d037012d643999f 100644 index f8a5adaff31bb5aa91550f24aab6cce83642d86f..c6312e189751a637341c9cf4fd24dc05766b09d6 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -143,6 +143,14 @@ public class Main { @@ -143,6 +143,14 @@ public class Main {

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Only send Dragon/Wither Death sounds to same world
Also fix view distance lookup Also fix view distance lookup
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index fb6aef4cdbd2ad4037e20c9302ae5ef07ff0c7ce..e17cf38b791f509447ce2c8ef38411530a0fb09b 100644 index 7de279a1bef44a76173a1b71b98425ca6aa219aa..2584c02a5f6511ade260986a6aacef401c294549 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -640,8 +640,9 @@ public class EnderDragon extends Mob implements Enemy { @@ -640,8 +640,9 @@ public class EnderDragon extends Mob implements Enemy {
@ -22,17 +22,16 @@ index fb6aef4cdbd2ad4037e20c9302ae5ef07ff0c7ce..e17cf38b791f509447ce2c8ef3841153
double deltaZ = this.getZ() - player.getZ(); double deltaZ = this.getZ() - player.getZ();
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ; double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java diff --git a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
index 07b631e074ef91ea51dfecfa0232482d8983a12d..9a89e6ff72d285a941be986300ff5c2a723a80e0 100644 index 6fde138a3da49fee4fdbf36e0ab58438e114e196..09c862ff597629bccd3bf98ef168aa96fb69d230 100644
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java --- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java +++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
@@ -260,8 +260,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob @@ -272,8 +272,9 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
if (!this.isSilent()) { if (!this.isSilent()) {
// CraftBukkit start - Use relative location for far away sounds // CraftBukkit start - Use relative location for far away sounds
// this.world.b(1023, new BlockPosition(this), 0); // this.world.globalLevelEvent(1023, new BlockPosition(this), 0);
- int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; - int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16;
- for (ServerPlayer player : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players) { + //int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API
+ //int viewDistance = ((WorldServer) this.world).getServer().getViewDistance() * 16; // Paper - updated to use worlds actual view distance incase we have to uncomment this due to removal of player view distance API for (ServerPlayer player : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players) {
+ for (ServerPlayer player : (List<ServerPlayer>)this.level.players()) {
+ final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch + final int viewDistance = player.getViewDistance(); // TODO apply view distance api patch
double deltaX = this.getX() - player.getX(); double deltaX = this.getX() - player.getX();
double deltaZ = this.getZ() - player.getZ(); double deltaZ = this.getZ() - player.getZ();

View File

@ -9,10 +9,10 @@ Subject: [PATCH] Fix Old Sign Conversion
This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures This causes Igloos and such to render broken signs. We fix this by ignoring sign conversion for Defined Structures
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
index 66ab4deedd177f507d170a61ceca4c3ebbac9adc..77645019c88d61dde28b7598d8a29b7d0c23c209 100644 index 52b4c231faa2f33f766f50399e52e30184fb01a7..67315a86e5db51029d0f355c6dc223e93e4141db 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
@@ -30,6 +30,7 @@ public abstract class BlockEntity implements net.minecraft.server.KeyedObject { @@ -33,6 +33,7 @@ public abstract class BlockEntity implements io.papermc.paper.util.KeyedObject {
public CraftPersistentDataContainer persistentDataContainer; public CraftPersistentDataContainer persistentDataContainer;
// CraftBukkit end // CraftBukkit end
private static final Logger LOGGER = LogManager.getLogger(); private static final Logger LOGGER = LogManager.getLogger();
@ -21,10 +21,10 @@ index 66ab4deedd177f507d170a61ceca4c3ebbac9adc..77645019c88d61dde28b7598d8a29b7d
@Nullable @Nullable
protected Level level; protected Level level;
diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
index dbb59775422b80fb4b60a8cfd2c0bd81c1646e88..589fbdd5c86655244aa92a42e5f45747b5c5026e 100644 index e390cfea5bed64284a97c88a717503f07f073a30..3a2e2adeefe73981b443216724270023408c1feb 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SignBlockEntity.java
@@ -95,7 +95,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C @@ -93,7 +93,7 @@ public class SignBlockEntity extends BlockEntity implements CommandSource { // C
s = "\"\""; s = "\"\"";
} }
@ -34,10 +34,10 @@ index dbb59775422b80fb4b60a8cfd2c0bd81c1646e88..589fbdd5c86655244aa92a42e5f45747
continue; continue;
} }
diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
index f0795f0cff1314604dc58c19b64467a4c8cd4de9..3cbb764c8afd7f0a6b14aad4a4960a25d82ec9d9 100644 index 06b981d4c6b764d9298adb75ee9944e24a9ba195..2314d858fab555c8cafba6b7c2e8302961c77666 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
@@ -283,7 +283,9 @@ public class StructureTemplate { @@ -275,7 +275,9 @@ public class StructureTemplate {
definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong()); definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong());
} }

View File

@ -6,7 +6,7 @@ Subject: [PATCH] Avoid blocking on Network Manager creation
Per Paper issue 294 Per Paper issue 294
diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
index 8fffe354d40c5fac4daa03af87c2323e307bd3ea..abcd335f5577dae6d613e5e0dd2656e1ab3ee9f0 100644 index 4a392a95b6fc3cb4d4186bdc0632d10d1a90b9b1..526e07d8ea21af42c271bee4da5bccd766227006 100644
--- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
+++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java
@@ -61,6 +61,15 @@ public class ServerConnectionListener { @@ -61,6 +61,15 @@ public class ServerConnectionListener {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Don't lookup game profiles that have no UUID and no name
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 548627b5a12e79ac31136b2695e45f9452115348..7ef77c38537b85deb7d388a7331e895c54a8ba95 100644 index e8515f4ed1f29ba926bc4ab6d918722aee450ac2..6914ab77fc868844c391ac41ba2d344a26012208 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java --- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java +++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -101,7 +101,7 @@ public class GameProfileCache { @@ -101,7 +101,7 @@ public class GameProfileCache {

View File

@ -32,7 +32,7 @@ index c6ca15a5cc53995ca0ada9c9ac9dc1d084963eb5..728835cddd413d778e9628360989724f
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java diff --git a/src/main/java/net/minecraft/server/players/GameProfileCache.java b/src/main/java/net/minecraft/server/players/GameProfileCache.java
index 7ef77c38537b85deb7d388a7331e895c54a8ba95..6e1b7d5b20e9f6ed1b650eb9d6ac9f8c4867b4b7 100644 index 6914ab77fc868844c391ac41ba2d344a26012208..00f783aafd81fa7e836e4eea5bfeac7434f33b0f 100644
--- a/src/main/java/net/minecraft/server/players/GameProfileCache.java --- a/src/main/java/net/minecraft/server/players/GameProfileCache.java
+++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java +++ b/src/main/java/net/minecraft/server/players/GameProfileCache.java
@@ -98,6 +98,7 @@ public class GameProfileCache { @@ -98,6 +98,7 @@ public class GameProfileCache {
@ -53,7 +53,7 @@ index 7ef77c38537b85deb7d388a7331e895c54a8ba95..6e1b7d5b20e9f6ed1b650eb9d6ac9f8c
public synchronized void add(GameProfile profile) { // Paper - synchronize public synchronized void add(GameProfile profile) { // Paper - synchronize
diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java diff --git a/src/main/java/net/minecraft/server/players/OldUsersConverter.java b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
index f6cb864c45f960811acc02829d1f7883b916de29..8703f97dc2f392b136c6851aa09b607cbfdfa5de 100644 index 876658b685ea09adb4c01d436da56daadb7eedaa..5445cb5910ec63408dc4379eec5e12d305182527 100644
--- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java --- a/src/main/java/net/minecraft/server/players/OldUsersConverter.java
+++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java +++ b/src/main/java/net/minecraft/server/players/OldUsersConverter.java
@@ -66,7 +66,8 @@ public class OldUsersConverter { @@ -66,7 +66,8 @@ public class OldUsersConverter {
@ -67,10 +67,10 @@ index f6cb864c45f960811acc02829d1f7883b916de29..8703f97dc2f392b136c6851aa09b607c
} else { } else {
String[] astring1 = astring; String[] astring1 = astring;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 9db5f614512d05eb99b4811c71fbc914e50c712e..db8704fb3533d774fbb6146926939151816bc48d 100644 index bf18ed30b1e66cb94f346b1e63a67ec5f4030b0b..1bc319a3423a2cff776e30ac04a09e6d38e13e49 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -1666,7 +1666,7 @@ public final class CraftServer implements Server { @@ -1677,7 +1677,7 @@ public final class CraftServer implements Server {
// Spigot Start // Spigot Start
GameProfile profile = null; GameProfile profile = null;
// Only fetch an online UUID in online mode // Only fetch an online UUID in online mode

View File

@ -23,10 +23,10 @@ index 6cdb0716f2a4b29f7a5ecd109bf3c4700ebd22ad..ff1a0d125edd2ea10c870cbb62ae9aa2
return true; return true;
} else if (object instanceof BooleanProperty && super.equals(object)) { } else if (object instanceof BooleanProperty && super.equals(object)) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
index e76591dec764d92e1a760c5208714f3c80ea8fc7..bcf8b24e9f9e9870c1a1d27c721a6a433305d55a 100644 index 4d6e7b5889ecb81195c7152225ae8e3343d3408c..0bca0f971dac994bd8b6ecd87e8b33e26c0f18f9 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java --- a/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java +++ b/src/main/java/net/minecraft/world/level/block/state/properties/EnumProperty.java
@@ -48,8 +48,7 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope @@ -45,8 +45,7 @@ public class EnumProperty<T extends Enum<T> & StringRepresentable> extends Prope
return value.getSerializedName(); return value.getSerializedName();
} }
@ -51,22 +51,23 @@ index c3ec7f91794d802e5b9ddac3fffccce378dace68..72f508321ebffcca31240fbdd068b4d1
return true; return true;
} else if (object instanceof IntegerProperty && super.equals(object)) { } else if (object instanceof IntegerProperty && super.equals(object)) {
diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java diff --git a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
index 0dc91cfaef2bc6004270c380e673da1728287433..81b43e0b0146729a8a1c6ade82634c86cde67857 100644 index 29a0de2ae1991b969f3d816b9ad8420a7e674d1f..1560e77d0831d20c4a53316bcb0791a5930ada3c 100644
--- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java --- a/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
+++ b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java +++ b/src/main/java/net/minecraft/world/level/block/state/properties/Property.java
@@ -66,14 +66,7 @@ public abstract class Property<T extends Comparable<T>> { @@ -69,15 +69,7 @@ public abstract class Property<T extends Comparable<T>> {
}
@Override
public boolean equals(Object object) { public boolean equals(Object object) {
- if (this == object) { - if (this == object) {
- return true; - return true;
- } else if (!(object instanceof Property)) { - } else if (!(object instanceof Property)) {
- return false; - return false;
- } else { - } else {
- Property<?> property = (Property)object; - Property<?> iblockstate = (Property) object;
- return this.clazz.equals(property.clazz) && this.name.equals(property.name); -
- return this.clazz.equals(iblockstate.clazz) && this.name.equals(iblockstate.name);
- } - }
+ return this == object; + return this == object; // Paper
} }
@Override public final int hashCode() {

View File

@ -23,10 +23,10 @@ index 728835cddd413d778e9628360989724f65335b46..6c13fe725ca2b2a6f0f375b80f6c2cb6
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 60772b6d6fe171d7dd832cb132f7c56db9439bdb..451a2ea80c6262008be6b075c122c78a5b435c75 100644 index 7d6fc7b64a4cdec0f432374c5258ec99ea52889c..9b24ddf170e00e60391a240686e6767e19b04fd3 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -1483,13 +1483,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -1489,13 +1489,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
// Spigot start - limit place/interactions // Spigot start - limit place/interactions
private int limitedPackets; private int limitedPackets;
private long lastLimitedPacket = -1; private long lastLimitedPacket = -1;

View File

@ -21,10 +21,10 @@ index 6c13fe725ca2b2a6f0f375b80f6c2cb643b9913d..5e23ff0c5e44427a996281ae42fc12c2
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 451a2ea80c6262008be6b075c122c78a5b435c75..9026dd91f8d874209bbfd4cdfd3c41e37cdd7560 100644 index 9b24ddf170e00e60391a240686e6767e19b04fd3..73293dff5dac52c0737bbda65caea3a1e0cc4acd 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -301,7 +301,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -300,7 +300,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
if (this.clientIsFloating && !this.player.isSleeping()) { if (this.clientIsFloating && !this.player.isSleeping()) {
if (++this.aboveGroundTickCount > 80) { if (++this.aboveGroundTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString()); ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating too long!", this.player.getName().getString());
@ -33,7 +33,7 @@ index 451a2ea80c6262008be6b075c122c78a5b435c75..9026dd91f8d874209bbfd4cdfd3c41e3
return; return;
} }
} else { } else {
@@ -320,7 +320,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -319,7 +319,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) { if (this.clientVehicleIsFloating && this.player.getRootVehicle().getControllingPassenger() == this.player) {
if (++this.aboveGroundVehicleTickCount > 80) { if (++this.aboveGroundVehicleTickCount > 80) {
ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString()); ServerGamePacketListenerImpl.LOGGER.warn("{} was kicked for floating a vehicle too long!", this.player.getName().getString());

View File

@ -19,17 +19,26 @@ index 6324c3465cf34cea2e7fd7d8c26a0cbeeb20eefd..097991f2dd8d35fd5bc62e23e7361d47
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
index 702dbe24bfd19b0999648d4364f68a5675bee6e0..8141935e2ee58bbb58c6b5cfdef5a9a88d7658ec 100644 index e641779c58b503c88cb533a45a3614f45c4b8fa3..805101792508bd721dd38fb57514f7f21bd90504 100644
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
@@ -640,6 +640,12 @@ public class LevelChunk implements ChunkAccess { @@ -261,7 +261,7 @@ public class LevelChunk extends ChunkAccess {
}
this.setLightCorrect(protoChunk.isLightCorrect());
- this.unsaved = true;
+ this.setUnsaved(true);
this.needsDecoration = true; // CraftBukkit
}
@@ -579,6 +579,12 @@ public class LevelChunk extends ChunkAccess {
"Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16)); "Chunk coordinates: " + (this.chunkPos.x * 16) + "," + (this.chunkPos.z * 16));
e.printStackTrace(); e.printStackTrace();
ServerInternalException.reportInternalException(e); ServerInternalException.reportInternalException(e);
+ +
+ if (this.level.paperConfig.removeCorruptTEs) { + if (this.level.paperConfig.removeCorruptTEs) {
+ this.removeBlockEntity(blockEntity.getBlockPos()); + this.removeBlockEntity(blockEntity.getBlockPos());
+ this.markUnsaved(); + this.setUnsaved(true);
+ org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity"); + org.bukkit.Bukkit.getLogger().info("Removing corrupt tile entity");
+ } + }
// Paper end // Paper end

View File

@ -5,16 +5,16 @@ Subject: [PATCH] Add EntityZapEvent
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index e6f1f9794ddd86a1ea0a6adceb9c9dc81997183f..7ddcdafdd9b60e9cab2d6b0a3c5b40694ea59506 100644 index 4529692f3e5df444bf4d58704d7608d8f4219a77..d9539f906348c13afc6f1b0032c3ce259f1c87c0 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -826,9 +826,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -829,9 +829,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
@Override @Override
public void thunderHit(ServerLevel world, LightningBolt lightning) { public void thunderHit(ServerLevel world, LightningBolt lightning) {
if (world.getDifficulty() != Difficulty.PEACEFUL) { if (world.getDifficulty() != Difficulty.PEACEFUL) {
- Villager.LOGGER.info("Villager {} was struck by lightning {}.", this, lightning); - Villager.LOGGER.info("Villager {} was struck by lightning {}.", this, lightning);
+ // Paper - move log down, event can cancel + // Paper - move log down, event can cancel
Witch entitywitch = (Witch) EntityType.WITCH.create((Level) world); Witch entitywitch = (Witch) EntityType.WITCH.create(world);
+ // Paper start + // Paper start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, lightning, entitywitch).isCancelled()) { + if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityZapEvent(this, lightning, entitywitch).isCancelled()) {

View File

@ -22,10 +22,10 @@ index 097991f2dd8d35fd5bc62e23e7361d47e70da493..4bda78d36a64e89bc68885a2a10b40a7
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
index 1d538f490c7aa48991446fb55c7f0916bb5d5e29..69f385c57f3716a489781debb32b4adf1cb9383d 100644 index 0366303a986ae6da8e95ed3051610c432a790194..a8a9cbcece45c3480120cb2fa0fa03523a87d317 100644
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
@@ -309,6 +309,18 @@ public class FallingBlockEntity extends Entity { @@ -324,6 +324,18 @@ public class FallingBlockEntity extends Entity {
@Override @Override
protected void readAdditionalSaveData(CompoundTag nbt) { protected void readAdditionalSaveData(CompoundTag nbt) {
this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState")); this.blockState = NbtUtils.readBlockState(nbt.getCompound("BlockState"));

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Cache user authenticator threads
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
index c8d8d766de86dc3e47b06a355b28d2279820c570..a60b40d8cc802456374625af216c27998f8348b3 100644 index 4ae61a810c63a259490dde53e7bdb862ed4df5ad..58617412e4759fe6c1c975f352c0c8281b744de1 100644
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
@@ -117,6 +117,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -117,6 +117,18 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
@ -27,7 +27,7 @@ index c8d8d766de86dc3e47b06a355b28d2279820c570..a60b40d8cc802456374625af216c2799
// Spigot start // Spigot start
public void initUUID() public void initUUID()
{ {
@@ -209,8 +221,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -210,8 +222,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce)); this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.nonce));
} else { } else {
// Spigot start // Spigot start
@ -38,7 +38,7 @@ index c8d8d766de86dc3e47b06a355b28d2279820c570..a60b40d8cc802456374625af216c2799
@Override @Override
public void run() { public void run() {
try { try {
@@ -221,7 +233,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -222,7 +234,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex); server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.gameProfile.getName(), ex);
} }
} }
@ -48,7 +48,7 @@ index c8d8d766de86dc3e47b06a355b28d2279820c570..a60b40d8cc802456374625af216c2799
// Spigot end // Spigot end
} }
@@ -250,7 +263,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -251,7 +264,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
throw new IllegalStateException("Protocol error", cryptographyexception); throw new IllegalStateException("Protocol error", cryptographyexception);
} }
@ -58,7 +58,7 @@ index c8d8d766de86dc3e47b06a355b28d2279820c570..a60b40d8cc802456374625af216c2799
public void run() { public void run() {
GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile; GameProfile gameprofile = ServerLoginPacketListenerImpl.this.gameProfile;
@@ -295,10 +309,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener @@ -296,10 +310,8 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null; return ServerLoginPacketListenerImpl.this.server.getPreventProxyConnections() && socketaddress instanceof InetSocketAddress ? ((InetSocketAddress) socketaddress).getAddress() : null;
} }

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
Reload the aliases stored in commands.yml Reload the aliases stored in commands.yml
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index db8704fb3533d774fbb6146926939151816bc48d..70cbf25466b7b7800c69d72c5f83b733cb83228b 100644 index 1bc319a3423a2cff776e30ac04a09e6d38e13e49..5a6d044a0b3a60e50c55d2f854b923f46df12d5e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2460,5 +2460,24 @@ public final class CraftServer implements Server { @@ -2472,5 +2472,24 @@ public final class CraftServer implements Server {
DefaultPermissions.registerCorePermissions(); DefaultPermissions.registerCorePermissions();
CraftDefaultPermissions.registerCorePermissions(); CraftDefaultPermissions.registerCorePermissions();
} }

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add source to PlayerExpChangeEvent
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index b902bca6135c3a7be4804a441bbf8f73b4596432..41556294841b2c280ba4eff861405ccb6aee19e5 100644 index 687904d3e1b3ee7b514c707d9b2eeccabbf56603..f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -246,7 +246,7 @@ public class ExperienceOrb extends Entity { @@ -246,7 +246,7 @@ public class ExperienceOrb extends Entity {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't let fishinghooks use portals
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index b007efe91c0abef3e90179b67dfdaf999ced11d2..3353892ab858db5e0ad2833bf56c6a367248f6fb 100644 index eaa3ed52a57b56fc0f260aadfd23c2fd6dfc0f51..54bd343def9f1ebc987640c5d756db906593f320 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -253,6 +253,11 @@ public class FishingHook extends Projectile { @@ -252,6 +252,11 @@ public class FishingHook extends Projectile {
this.setDeltaMovement(this.getDeltaMovement().scale(0.92D)); this.setDeltaMovement(this.getDeltaMovement().scale(0.92D));
this.reapplyPosition(); this.reapplyPosition();

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Add ProjectileCollideEvent
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
index 97a4d3b3709028d322617efdfe9a5aabe2197d82..65faf775b786f9c237ee33c1fb0f8ab9f37d738c 100644 index 68b15e3061e1e8637a34ee5e0f0953dd23645f49..91505b592e95240e0dc71a17906ab48f5eb94f34 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
@@ -225,6 +225,17 @@ public abstract class AbstractArrow extends Projectile { @@ -225,6 +225,17 @@ public abstract class AbstractArrow extends Projectile {
@ -27,7 +27,7 @@ index 97a4d3b3709028d322617efdfe9a5aabe2197d82..65faf775b786f9c237ee33c1fb0f8ab9
this.preOnHit((HitResult) object); // CraftBukkit - projectile hit event this.preOnHit((HitResult) object); // CraftBukkit - projectile hit event
this.hasImpulse = true; this.hasImpulse = true;
diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
index a8b51bece92676f1964a795112a1d490b437ed0f..dd5209ab2e5b59312349e709392689f25da162c0 100644 index fc37e18f02b27f76244da3363e6c31d000b8e2e6..3370f4d331637bf13c7912218041f23872971e25 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java --- a/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
@@ -11,6 +11,7 @@ import net.minecraft.world.entity.Entity; @@ -11,6 +11,7 @@ import net.minecraft.world.entity.Entity;
@ -40,7 +40,7 @@ index a8b51bece92676f1964a795112a1d490b437ed0f..dd5209ab2e5b59312349e709392689f2
import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
@@ -82,7 +83,16 @@ public abstract class AbstractHurtingProjectile extends Projectile { @@ -82,7 +83,16 @@ public abstract class AbstractHurtingProjectile extends Projectile {
HitResult movingobjectposition = ProjectileUtil.getHitResult((Entity) this, this::canHitEntity); HitResult movingobjectposition = ProjectileUtil.getHitResult(this, this::canHitEntity);
- if (movingobjectposition.getType() != HitResult.Type.MISS) { - if (movingobjectposition.getType() != HitResult.Type.MISS) {
+ // Paper start - Call ProjectileCollideEvent + // Paper start - Call ProjectileCollideEvent
@ -57,10 +57,10 @@ index a8b51bece92676f1964a795112a1d490b437ed0f..dd5209ab2e5b59312349e709392689f2
// CraftBukkit start - Fire ProjectileHitEvent // CraftBukkit start - Fire ProjectileHitEvent
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java
index f81be1c6a5efc5090fbb8832f44dbb2ae6aa2f4a..8e81b19706a14c21b5ffdc4f12818fe74adc9ddb 100644 index 88181c59e604ba3b132b9e695cef5eaf5b836029..94d09b05737679b133ec462815b010b19c01b4fa 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java --- a/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrowableProjectile.java
@@ -11,6 +11,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; @@ -10,6 +10,7 @@ import net.minecraft.world.level.block.entity.BlockEntity;
import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity; import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity;
import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.BlockHitResult;
@ -68,7 +68,7 @@ index f81be1c6a5efc5090fbb8832f44dbb2ae6aa2f4a..8e81b19706a14c21b5ffdc4f12818fe7
import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3; import net.minecraft.world.phys.Vec3;
@@ -67,7 +68,17 @@ public abstract class ThrowableProjectile extends Projectile { @@ -66,7 +67,17 @@ public abstract class ThrowableProjectile extends Projectile {
} }
if (movingobjectposition.getType() != HitResult.Type.MISS && !flag) { if (movingobjectposition.getType() != HitResult.Type.MISS && !flag) {

View File

@ -13,10 +13,10 @@ by adding code to all overrides in:
to return BLOCKED if it is outside the world border. to return BLOCKED if it is outside the world border.
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
index 5ddc033594c26a69f8c610cf1610a06a9be8dd4d..c7147605f0f2c57274e48ecee20a78efda84ddf9 100644 index e10d377eb7540ed54ddcb6632afc2395c021b8ab..e675eca77a0a1718cdaceefa20b026dffdcc5508 100644
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java --- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java +++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
@@ -157,7 +157,7 @@ public abstract class PathNavigation { @@ -159,7 +159,7 @@ public abstract class PathNavigation {
// Paper start - Pathfind event // Paper start - Pathfind event
boolean copiedSet = false; boolean copiedSet = false;
for (BlockPos possibleTarget : positions) { for (BlockPos possibleTarget : positions) {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Optimize World.isLoaded(BlockPosition)Z
Reduce method invocations for World.isLoaded(BlockPosition)Z Reduce method invocations for World.isLoaded(BlockPosition)Z
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 3032f52ea3375c62aa13dc1802a85df22a9f3082..3400f8120ee73fe78209e88619ad9acef93cd5b8 100644 index 8142f6c2d3bd17aec313d46141910f0743c6345e..ca2e81b9eace4124b83588c604a88a0e5595c6e6 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -319,6 +319,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -320,6 +320,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
return chunk == null ? null : chunk.getFluidState(blockposition); return chunk == null ? null : chunk.getFluidState(blockposition);
} }

View File

@ -11,10 +11,10 @@ that is outside happens to be closer, but unreachable, yet another reachable
one is in border that would of been missed. one is in border that would of been missed.
diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java diff --git a/src/main/java/net/minecraft/world/level/border/WorldBorder.java b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
index a0c4bc4eb42a3d2de6f66510d88f92c06b535353..c2c54dc4bbfe469f2b8c751012b93d5e728936d6 100644 index 6ec5a1525d0b8ced8fe78d3eab29c5eb82996844..2442c287a7f26cfee10a19e9015558cdebdcf3ac 100644
--- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java --- a/src/main/java/net/minecraft/world/level/border/WorldBorder.java
+++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java +++ b/src/main/java/net/minecraft/world/level/border/WorldBorder.java
@@ -36,6 +36,18 @@ public class WorldBorder { @@ -37,6 +37,18 @@ public class WorldBorder {
return (double) (pos.getX() + 1) > this.getMinX() && (double) pos.getX() < this.getMaxX() && (double) (pos.getZ() + 1) > this.getMinZ() && (double) pos.getZ() < this.getMaxZ(); return (double) (pos.getX() + 1) > this.getMinX() && (double) pos.getX() < this.getMaxX() && (double) (pos.getZ() + 1) > this.getMinZ() && (double) pos.getZ() < this.getMaxZ();
} }
@ -34,14 +34,14 @@ index a0c4bc4eb42a3d2de6f66510d88f92c06b535353..c2c54dc4bbfe469f2b8c751012b93d5e
return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ(); return (double) pos.getMaxBlockX() > this.getMinX() && (double) pos.getMinBlockX() < this.getMaxX() && (double) pos.getMaxBlockZ() > this.getMinZ() && (double) pos.getMinBlockZ() < this.getMaxZ();
} }
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
index 9aaa5faff7cdabd54189598b0938fdc6354e2bb8..d7129f3379f2edecbcfd85f83d75e4d7064ce71d 100644 index 3ff9f40df7f4f837a59362c6da6a172f42d6e8bc..0670c1f72d9d0c4f8ea32ed314f75a106b2e2b09 100644
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java --- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java +++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
@@ -168,6 +168,7 @@ public abstract class StructureFeature<C extends FeatureConfiguration> { @@ -168,6 +168,7 @@ public class StructureFeature<C extends FeatureConfiguration> {
int o = j + i * m; int o = j + i * m;
int p = k + i * n; int p = k + i * n;
ChunkPos chunkPos = this.getPotentialFeatureChunk(config, worldSeed, worldgenRandom, o, p); ChunkPos chunkPos = this.getPotentialFeatureChunk(config, worldSeed, o, p);
+ if (!world.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper + if (!levelReader.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper
boolean bl3 = world.getBiomeManager().getPrimaryBiomeAtChunk(chunkPos).getGenerationSettings().isValidStart(this); StructureCheckResult structureCheckResult = structureAccessor.checkStructurePresence(chunkPos, this, skipExistingChunks);
if (bl3) { if (structureCheckResult != StructureCheckResult.START_NOT_PRESENT) {
ChunkAccess chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS); if (!skipExistingChunks && structureCheckResult == StructureCheckResult.START_PRESENT) {

View File

@ -28,7 +28,7 @@ index 4bda78d36a64e89bc68885a2a10b40a759720d1a..bfb83d85601f6e3298395c8424cf4476
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
index ae2fba922b5a8c9b4096ea8255ff20db58fcd88f..314617cb0d2df92cc394f7a80011f5b6d075419b 100644 index a75236c1374919f7640e3b705f696dd8568eb3dc..90d77153d818534b1cb53ce80ea5409a709a2384 100644
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java --- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java +++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
@@ -383,7 +383,8 @@ public class VillagerTrades { @@ -383,7 +383,8 @@ public class VillagerTrades {
@ -42,7 +42,7 @@ index ae2fba922b5a8c9b4096ea8255ff20db58fcd88f..314617cb0d2df92cc394f7a80011f5b6
ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true); ItemStack itemStack = MapItem.create(serverLevel, blockPos.getX(), blockPos.getZ(), (byte)2, true, true);
MapItem.renderBiomePreviewMap(serverLevel, itemStack); MapItem.renderBiomePreviewMap(serverLevel, itemStack);
diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java diff --git a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
index ce5375dc1974042fd4e81a93a6087d7d286074af..d9452518368c6da097ee142d9b38b52188dc4a5b 100644 index bdc0de577d3acca7d9e03d184ac65b97c5b3e68a..6dc8d85f4b8a0aa24ae22d46da4a3f89c7e01871 100644
--- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java --- a/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
+++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java +++ b/src/main/java/net/minecraft/world/level/storage/loot/functions/ExplorationMapFunction.java
@@ -65,7 +65,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction { @@ -65,7 +65,16 @@ public class ExplorationMapFunction extends LootItemConditionalFunction {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Optimize ItemStack.isEmpty()
Remove hashMap lookup every check, simplify code to remove ternary Remove hashMap lookup every check, simplify code to remove ternary
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
index 7f44e9e382aa87ad9be94394d05bbcacfb0bacc8..d921113214e7bf3693e80d417f3c5ae217500e7a 100644 index 4019a8cd594f8c093cf790600a92f0725250e82b..6c82bb01db0431080425bfa65ab67ce703194214 100644
--- a/src/main/java/net/minecraft/world/item/ItemStack.java --- a/src/main/java/net/minecraft/world/item/ItemStack.java
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java
@@ -239,7 +239,7 @@ public final class ItemStack { @@ -240,7 +240,7 @@ public final class ItemStack {
} }
public boolean isEmpty() { public boolean isEmpty() {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Add API methods to control if armour stands can move
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 2574fc58386197160d1fa875dd67031406d86356..4d5870f4bfe4bd33333419687a787ab1d1aa3330 100644 index a02fe7542c7809d98d8ec68f1013594ee86ccb3f..a82503bc791b5b01e509b333e9d5baa7abbb60b8 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -92,6 +92,7 @@ public class ArmorStand extends LivingEntity { @@ -91,6 +91,7 @@ public class ArmorStand extends LivingEntity {
public Rotations rightArmPose; public Rotations rightArmPose;
public Rotations leftLegPose; public Rotations leftLegPose;
public Rotations rightLegPose; public Rotations rightLegPose;
@ -16,7 +16,7 @@ index 2574fc58386197160d1fa875dd67031406d86356..4d5870f4bfe4bd33333419687a787ab1
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) { public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
super(type, world); super(type, world);
@@ -927,4 +928,13 @@ public class ArmorStand extends LivingEntity { @@ -926,4 +927,13 @@ public class ArmorStand extends LivingEntity {
public boolean canBeSeenByAnyone() { public boolean canBeSeenByAnyone() {
return !this.isInvisible() && !this.isMarker(); return !this.isInvisible() && !this.isMarker();
} }

View File

@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
// Paper end // Paper end
buf.writeComponent(this.text); buf.writeComponent(this.text);
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index d972f7b5faa5d865c0ab550c6605f9839a162c07..4233f5ffa673801c57e3f929cd9ae919d6c7169f 100644 index a880c6434f6dbbc8ce9f82315ba906090c7240a1..d475f9a3eb3b4e3c0ed78bef1d233dde26c391b9 100644
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -249,6 +249,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -255,6 +255,26 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
// Paper start // Paper start

View File

@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
Credit to prplz for figuring out the real issue Credit to prplz for figuring out the real issue
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
index da722cddaaa8c40715748de81104a5b213c2fea8..a61798909aee1b73b62c88c22fa6cfc1fe2a5942 100644 index 3a97690a1e65db9a1c184fa4df5899cfda3d44bc..ab73818893b00551f8137704a727e33046d43a6a 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
@@ -2128,7 +2128,7 @@ public class ServerPlayer extends Player { @@ -2158,7 +2158,7 @@ public class ServerPlayer extends Player {
@Override @Override
public boolean isImmobile() { public boolean isImmobile() {
@ -19,10 +19,10 @@ index da722cddaaa8c40715748de81104a5b213c2fea8..a61798909aee1b73b62c88c22fa6cfc1
@Override @Override
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index 9c7843c2623fce4ec423acbcc0c76a35b1bd5969..36bb3b502a26ab43f442d85b3cad4a1de0a5bda8 100644 index 73293dff5dac52c0737bbda65caea3a1e0cc4acd..f9d5af3842696c1a0286098f2d255f44932d4a4a 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2812,7 +2812,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2817,7 +2817,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
} }
public final boolean isDisconnected() { public final boolean isDisconnected() {

View File

@ -5,7 +5,7 @@ Subject: [PATCH] Firework API's
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
index 28e32cdac5b8c51dfcef14b585860f3181e814f3..3ac0d0419cbdacabf647a530a82ddf67ddaa13b7 100644 index 60d60e368191038537f6a18f336565994a6b23ec..fe502e148e218ae404e0049c0251d3e3ca08c825 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java --- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
@@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier { @@ -39,6 +39,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
@ -42,7 +42,7 @@ index 28e32cdac5b8c51dfcef14b585860f3181e814f3..3ac0d0419cbdacabf647a530a82ddf67
@Override @Override
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
index d336b44f9486ddc93b57938413d8dec4503710fa..35f3f3887c0696b757553af9a5997506c97b24c0 100644 index 77249825f3d29cdde19d0562caaa95ab862fad54..1ec3fd560a2b6528040bca68be4a05c9a8435ae9 100644
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java --- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java +++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
@@ -222,6 +222,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable { @@ -222,6 +222,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {

View File

@ -6,10 +6,10 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
Allows you to access the Gateway being used in a teleport event Allows you to access the Gateway being used in a teleport event
diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
index fe33ed6fde98de61a9db594e8752b978b16db3e4..d6f67a87c46c95bd4c2dfad4c1c13cbfd263ef30 100644 index 1001c318be6e57f5f55a842c148d29cf09d1e138..8af71dd1b916be666ee163904118db46fd3c9850 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
@@ -11,6 +11,7 @@ import net.minecraft.data.worldgen.Features; @@ -11,6 +11,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.CompoundTag;
import net.minecraft.nbt.NbtUtils; import net.minecraft.nbt.NbtUtils;
import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
@ -17,7 +17,7 @@ index fe33ed6fde98de61a9db594e8752b978b16db3e4..d6f67a87c46c95bd4c2dfad4c1c13cbf
import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerLevel;
import net.minecraft.server.level.ServerPlayer; import net.minecraft.server.level.ServerPlayer;
import net.minecraft.util.Mth; import net.minecraft.util.Mth;
@@ -211,7 +212,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity { @@ -209,7 +210,7 @@ public class TheEndGatewayBlockEntity extends TheEndPortalBlockEntity {
location.setPitch(player.getLocation().getPitch()); location.setPitch(player.getLocation().getPitch());
location.setYaw(player.getLocation().getYaw()); location.setYaw(player.getLocation().getYaw());

View File

@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
which creates copy of the collections. which creates copy of the collections.
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
index 3400f8120ee73fe78209e88619ad9acef93cd5b8..acfa844c87e5814c033cad4318813800f57885fd 100644 index ca2e81b9eace4124b83588c604a88a0e5595c6e6..8fbf239cdc5bc2f1ec7b91eaee85d032e65f250f 100644
--- a/src/main/java/net/minecraft/world/level/Level.java --- a/src/main/java/net/minecraft/world/level/Level.java
+++ b/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java
@@ -110,7 +110,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { @@ -111,7 +111,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
public static final int TICKS_PER_DAY = 24000; public static final int TICKS_PER_DAY = 24000;
public static final int MAX_ENTITY_SPAWN_Y = 20000000; public static final int MAX_ENTITY_SPAWN_Y = 20000000;
public static final int MIN_ENTITY_SPAWN_Y = -20000000; public static final int MIN_ENTITY_SPAWN_Y = -20000000;
@ -20,7 +20,7 @@ index 3400f8120ee73fe78209e88619ad9acef93cd5b8..acfa844c87e5814c033cad4318813800
private boolean tickingBlockEntities; private boolean tickingBlockEntities;
public final Thread thread; public final Thread thread;
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0b846204ba0e08ead4ca044505efe91f23c116e4..1f4880cd6abc68731abd5943619a9bf7e7ddb02f 100644 index a465ef627169e62132287cded07efb5b05e1ed36..8579696f971824688500c8837f9451d23f84dae2 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -133,6 +133,57 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -133,6 +133,57 @@ public class CraftWorld extends CraftRegionAccessor implements World {

View File

@ -7,7 +7,7 @@ Saving players async is extremely dangerous. This will force it to main
the same way we handle async chunk loads. the same way we handle async chunk loads.
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 4b21d3d73d76b81377a1d2222f37074c75ac3753..db95a5d89267f5bfc8020fcedf57b31daffc73a5 100644 index e4ebac252ac25bd51acfc6a0e9513c96ef4cfd95..79290edb6014027e1ceb34f21ee9f1220fe74784 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1036,11 +1036,13 @@ public abstract class PlayerList { @@ -1036,11 +1036,13 @@ public abstract class PlayerList {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Don't allow entities to ride themselves - #572
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 8473dcb54b26ea6b264125423fc2d52b87176b83..6211a425e81f9ba9718af6c30e534d35b10bad02 100644 index 4b23eaa6bcd7fd3eddbe7512bae4270c6324242b..819fbb2e786cc4546a981b34ff55a6241c72b5a3 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -2250,6 +2250,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -2283,6 +2283,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
} }
protected boolean addPassenger(Entity entity) { // CraftBukkit protected boolean addPassenger(Entity entity) { // CraftBukkit

View File

@ -8,10 +8,10 @@ Adds lots of information about why this orb exists.
Replaces isFromBottle() with logic that persists entity reloads too. Replaces isFromBottle() with logic that persists entity reloads too.
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
index f772924217c0531b09662a145d8ee5d22dd5ca51..ecfb88b4d9727ad20a2c33475cc6b1ec88821a19 100644 index 15220779927ff722960401643e99971833fc5704..2869d9bb0d374c26f9569eef3ecf0480cbaa85a6 100644
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
@@ -415,7 +415,7 @@ public class ServerPlayerGameMode { @@ -414,7 +414,7 @@ public class ServerPlayerGameMode {
// Drop event experience // Drop event experience
if (flag && event != null) { if (flag && event != null) {
@ -21,7 +21,7 @@ index f772924217c0531b09662a145d8ee5d22dd5ca51..ecfb88b4d9727ad20a2c33475cc6b1ec
return true; return true;
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
index 41556294841b2c280ba4eff861405ccb6aee19e5..5220e3ee9fab4c4cbc95e0cf1928392316a35e34 100644 index f7cbe6819b8c4f7eaca2389de8eaceb50bce4b15..90692df7e02346d4ba785d2eaf724d06b98b4438 100644
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
@@ -38,13 +38,63 @@ public class ExperienceOrb extends Entity { @@ -38,13 +38,63 @@ public class ExperienceOrb extends Entity {
@ -129,10 +129,10 @@ index 41556294841b2c280ba4eff861405ccb6aee19e5..5220e3ee9fab4c4cbc95e0cf19283923
@Override @Override
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index f6761a4bfa7a73cdbd1ecd4be1f9e78f61a67ae3..4f915072f9847327ec4fa5b33541f7105bc7fff6 100644 index 88066799a0090d22a2e22df17e2967774089f8b7..a11ee8a247affeb97de4c3152ea1449e8bc5b223 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -1704,7 +1704,8 @@ public abstract class LivingEntity extends Entity { @@ -1699,7 +1699,8 @@ public abstract class LivingEntity extends Entity {
protected void dropExperience() { protected void dropExperience() {
// CraftBukkit start - Update getExpReward() above if the removed if() changes! // CraftBukkit start - Update getExpReward() above if the removed if() changes!
if (true) { if (true) {
@ -143,10 +143,10 @@ index f6761a4bfa7a73cdbd1ecd4be1f9e78f61a67ae3..4f915072f9847327ec4fa5b33541f710
} }
// CraftBukkit end // CraftBukkit end
diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java
index c955f34e9c92f3310d2ead4eb887b5fe94180619..43841b5c77beb73169e2ff1645afe1234d8f74c7 100644 index 4f18af2691e149e42567c45b934adf62a589ebe0..2bc77858b4a78e24227b4b096fd44177202d5292 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java --- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java +++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
@@ -264,7 +264,7 @@ public abstract class Animal extends AgeableMob { @@ -272,7 +272,7 @@ public abstract class Animal extends AgeableMob {
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience // CraftBukkit start - use event experience
if (experience > 0) { if (experience > 0) {
@ -156,10 +156,10 @@ index c955f34e9c92f3310d2ead4eb887b5fe94180619..43841b5c77beb73169e2ff1645afe123
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java
index a493b9998cd08eda1aeb34087736c5646ee2d8d3..7de3d73232d985ab18d7266371d301c490b79b9f 100644 index 5220c9512c2a3e12a183b3c5ee42346f073661d9..2caf3aa6ca876d59deb98ee917e8228df140b414 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
@@ -883,7 +883,7 @@ public class Fox extends Animal { @@ -888,7 +888,7 @@ public class Fox extends Animal {
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
// CraftBukkit start - use event experience // CraftBukkit start - use event experience
if (experience > 0) { if (experience > 0) {
@ -169,10 +169,10 @@ index a493b9998cd08eda1aeb34087736c5646ee2d8d3..7de3d73232d985ab18d7266371d301c4
// CraftBukkit end // CraftBukkit end
} }
diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
index 10e4ed61e20edc4e2203150780d377a0fd8515bb..3ba8fafcd5de584209dd30cadb8e76a46dac4bc8 100644 index 29ced58a41889b63282ac5abf984e14f007407c3..44679e3b44b03dc20b3763af84df655d81680c06 100644
--- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java
+++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java
@@ -455,7 +455,7 @@ public class Turtle extends Animal { @@ -452,7 +452,7 @@ public class Turtle extends Animal {
Random random = this.animal.getRandom(); Random random = this.animal.getRandom();
if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { if (this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
@ -182,7 +182,7 @@ index 10e4ed61e20edc4e2203150780d377a0fd8515bb..3ba8fafcd5de584209dd30cadb8e76a4
} }
diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
index e17cf38b791f509447ce2c8ef38411530a0fb09b..3a01ffffcc37a93866b8b6774874959dfcabba26 100644 index 2584c02a5f6511ade260986a6aacef401c294549..19e594757fca90c64c4dc59233ff956e7c316da9 100644
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
@@ -634,7 +634,7 @@ public class EnderDragon extends Mob implements Enemy { @@ -634,7 +634,7 @@ public class EnderDragon extends Mob implements Enemy {
@ -204,10 +204,10 @@ index e17cf38b791f509447ce2c8ef38411530a0fb09b..3a01ffffcc37a93866b8b6774874959d
if (this.dragonFight != null) { if (this.dragonFight != null) {
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
index 7ddcdafdd9b60e9cab2d6b0a3c5b40694ea59506..3839bacbd5f4d06eb13d0e604651232d9fbd7b6a 100644 index d9539f906348c13afc6f1b0032c3ce259f1c87c0..8d76fe0154f31445a889dfe4cca716cb658053f6 100644
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
@@ -616,7 +616,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @@ -617,7 +617,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
} }
if (offer.shouldRewardExp()) { if (offer.shouldRewardExp()) {
@ -230,10 +230,10 @@ index 9001d627060b9691b703b4c0e157124b0cdee6bb..1101989e93758294c1adebbef0ab12a3
} }
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
index 3353892ab858db5e0ad2833bf56c6a367248f6fb..45d007c519e80415e34eaf404c03bf104b6f9dc1 100644 index 54bd343def9f1ebc987640c5d756db906593f320..abab779379e60d4b775f7b39cc46943e91c8749c 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java --- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java +++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
@@ -516,7 +516,7 @@ public class FishingHook extends Projectile { @@ -515,7 +515,7 @@ public class FishingHook extends Projectile {
this.level.addFreshEntity(entityitem); this.level.addFreshEntity(entityitem);
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop() // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
if (playerFishEvent.getExpToDrop() > 0) { if (playerFishEvent.getExpToDrop() > 0) {
@ -243,7 +243,7 @@ index 3353892ab858db5e0ad2833bf56c6a367248f6fb..45d007c519e80415e34eaf404c03bf10
// CraftBukkit end // CraftBukkit end
if (itemstack1.is((Tag) ItemTags.FISHES)) { if (itemstack1.is((Tag) ItemTags.FISHES)) {
diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java diff --git a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
index 467f9814e0991d31bff7259f266262c81328f05f..11d1db5ef709dfb6fa596ebc4f5fff1415ad4f6d 100644 index db6b1a9804a6d75dce22b780044beb04ca69cc94..dcbbff3a8dfcac869f07025e0e8e3d9c47956093 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java --- a/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java +++ b/src/main/java/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
@@ -51,7 +51,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile { @@ -51,7 +51,7 @@ public class ThrownExperienceBottle extends ThrowableItemProjectile {
@ -256,23 +256,23 @@ index 467f9814e0991d31bff7259f266262c81328f05f..11d1db5ef709dfb6fa596ebc4f5fff14
} }
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
index c5e4a0aa901d362cb299298fe2426c1c8f546ece..b268645827b7a57b906fd925d694f802a75da25d 100644 index dbdba510d8ff3c622ed928151cf525cfd1d1b1b5..aa0ba9c7dcb0ee81c9081031c447eeab61d92a10 100644
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java --- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java +++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
@@ -98,7 +98,7 @@ public class GrindstoneMenu extends AbstractContainerMenu { @@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) { public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
context.execute((world, blockposition) -> { context.execute((world, blockposition) -> {
if (world instanceof ServerLevel) { if (world instanceof ServerLevel) {
- ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf((Vec3i) blockposition), this.getExperienceAmount(world)); - ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf(blockposition), this.getExperienceAmount(world));
+ ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf((Vec3i) blockposition), this.getExperienceAmount(world), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); // Paper + ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf(blockposition), this.getExperienceAmount(world), org.bukkit.entity.ExperienceOrb.SpawnReason.GRINDSTONE, player); // Paper
} }
world.levelEvent(1042, blockposition, 0); world.levelEvent(1042, blockposition, 0);
diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java diff --git a/src/main/java/net/minecraft/world/level/block/Block.java b/src/main/java/net/minecraft/world/level/block/Block.java
index 72ef08a59dbf72bec2ce54ab76455c4230395959..6a31e3a3466369ede28e28bc3b9fda8dcb77e136 100644 index 5147f67c87ba3b8912a8ae24f876a9e996504600..b77eda6af8b430311e502465a2590d83555ff6cf 100644
--- a/src/main/java/net/minecraft/world/level/block/Block.java --- a/src/main/java/net/minecraft/world/level/block/Block.java
+++ b/src/main/java/net/minecraft/world/level/block/Block.java +++ b/src/main/java/net/minecraft/world/level/block/Block.java
@@ -374,8 +374,13 @@ public class Block extends BlockBehaviour implements ItemLike { @@ -372,8 +372,13 @@ public class Block extends BlockBehaviour implements ItemLike {
} }
public void popExperience(ServerLevel world, BlockPos pos, int size) { public void popExperience(ServerLevel world, BlockPos pos, int size) {
@ -282,16 +282,16 @@ index 72ef08a59dbf72bec2ce54ab76455c4230395959..6a31e3a3466369ede28e28bc3b9fda8d
+ public void popExperience(ServerLevel world, BlockPos pos, int size, net.minecraft.server.level.ServerPlayer player) { + public void popExperience(ServerLevel world, BlockPos pos, int size, net.minecraft.server.level.ServerPlayer player) {
+ // Paper end - add player parameter + // Paper end - add player parameter
if (world.getGameRules().getBoolean(GameRules.RULE_DOBLOCKDROPS)) { if (world.getGameRules().getBoolean(GameRules.RULE_DOBLOCKDROPS)) {
- ExperienceOrb.award(world, Vec3.atCenterOf((Vec3i) pos), size); - ExperienceOrb.award(world, Vec3.atCenterOf(pos), size);
+ ExperienceOrb.award(world, Vec3.atCenterOf((Vec3i) pos), size, org.bukkit.entity.ExperienceOrb.SpawnReason.BLOCK_BREAK, player); // Paper + ExperienceOrb.award(world, Vec3.atCenterOf(pos), size, org.bukkit.entity.ExperienceOrb.SpawnReason.BLOCK_BREAK, player); // Paper
} }
} }
diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
index 61ab07be21759df7b92ba71e31c537860f4e5dc2..265fa3cb96b7d39194a7e83b8b77b811bc3e8b40 100644 index ba9f209c2674107fd5751cb28c4f80fcbbc0aaa2..6c33b524d81ccd8ed060c3a9067cb1b669c7660d 100644
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
@@ -624,7 +624,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @@ -623,7 +623,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
j = event.getExpToDrop(); j = event.getExpToDrop();
// CraftBukkit end // CraftBukkit end
@ -301,10 +301,10 @@ index 61ab07be21759df7b92ba71e31c537860f4e5dc2..265fa3cb96b7d39194a7e83b8b77b811
@Override @Override
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index f426891c2ca5688d46b47d5c050314b9e6f6c349..d0873200aa8f66648e23fc2954a27a83289e748c 100644 index 14e24df5431078d6072c8c49c709bb3cb6988a4b..7c00bae9082d02f712c6e80f5ed69a55eb01d8da 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -870,7 +870,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -871,7 +871,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
} else if (TNTPrimed.class.isAssignableFrom(clazz)) { } else if (TNTPrimed.class.isAssignableFrom(clazz)) {
entity = new PrimedTnt(world, x, y, z, null); entity = new PrimedTnt(world, x, y, z, null);
} else if (ExperienceOrb.class.isAssignableFrom(clazz)) { } else if (ExperienceOrb.class.isAssignableFrom(clazz)) {

View File

@ -27,10 +27,10 @@ index bfb83d85601f6e3298395c8424cf4476797a2e79..299f4b5967a740429b2074161449a279
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
index 700cf06b588f4a6d25fc5050cc94ba56e2e2c4f9..56c05c91fc0306437c97339589268e8a4c2c5d76 100644 index 819fbb2e786cc4546a981b34ff55a6241c72b5a3..4f1add992cef7bfa194a9e464ae9ea56eab1f191 100644
--- a/src/main/java/net/minecraft/world/entity/Entity.java --- a/src/main/java/net/minecraft/world/entity/Entity.java
+++ b/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java
@@ -322,6 +322,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n @@ -326,6 +326,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this); public final org.spigotmc.ActivationRange.ActivationType activationType = org.spigotmc.ActivationRange.initializeEntityActivationType(this);
public final boolean defaultActivationState; public final boolean defaultActivationState;
public long activatedTick = Integer.MIN_VALUE; public long activatedTick = Integer.MIN_VALUE;
@ -39,10 +39,10 @@ index 700cf06b588f4a6d25fc5050cc94ba56e2e2c4f9..56c05c91fc0306437c97339589268e8a
// Spigot end // Spigot end
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
index 84c7955cb6eacf7d552a2310b7820453cfb3e999..2940738eb6ac4aba76bd67fc10392b525f07f3f0 100644 index a11ee8a247affeb97de4c3152ea1449e8bc5b223..77b96f632342026fcd2c37e34e63db3e11396c34 100644
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
@@ -3228,8 +3228,11 @@ public abstract class LivingEntity extends Entity { @@ -3227,8 +3227,11 @@ public abstract class LivingEntity extends Entity {
} }
} }

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Do not let armorstands drown
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
index 4d5870f4bfe4bd33333419687a787ab1d1aa3330..04ee36326b16e2aa070fd3318bd4a30bce67e49a 100644 index a82503bc791b5b01e509b333e9d5baa7abbb60b8..138422903dcb3056cd011a72e0625a1a225b4280 100644
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java --- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
@@ -936,5 +936,12 @@ public class ArmorStand extends LivingEntity { @@ -935,5 +935,12 @@ public class ArmorStand extends LivingEntity {
super.move(type, movement); super.move(type, movement);
} }
} }

View File

@ -30,10 +30,10 @@ will have plugins and worlds saving to the disk has a high potential to result
in corruption/dataloss. in corruption/dataloss.
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 9c73d69658de96b8216c7d945521af84d41c69ab..0b70123deec6470c8bcf46df7418086f31e893fe 100644 index 625a133eacf38fb8b11f4451e063dc21150f0e79..450e7165bd4806a4ed39a1b25486b408cc760460 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -232,6 +232,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -229,6 +229,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public final Map<ResourceKey<Level>, ServerLevel> levels; public final Map<ResourceKey<Level>, ServerLevel> levels;
private PlayerList playerList; private PlayerList playerList;
private volatile boolean running; private volatile boolean running;
@ -41,7 +41,7 @@ index 9c73d69658de96b8216c7d945521af84d41c69ab..0b70123deec6470c8bcf46df7418086f
private boolean stopped; private boolean stopped;
private int tickCount; private int tickCount;
protected final Proxy proxy; protected final Proxy proxy;
@@ -942,7 +943,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -928,7 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
if (this.playerList != null) { if (this.playerList != null) {
MinecraftServer.LOGGER.info("Saving players"); MinecraftServer.LOGGER.info("Saving players");
this.playerList.saveAll(); this.playerList.saveAll();
@ -50,7 +50,7 @@ index 9c73d69658de96b8216c7d945521af84d41c69ab..0b70123deec6470c8bcf46df7418086f
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
} }
@@ -1008,6 +1009,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -991,6 +992,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
} }
public void halt(boolean flag) { public void halt(boolean flag) {
@ -64,10 +64,10 @@ index 9c73d69658de96b8216c7d945521af84d41c69ab..0b70123deec6470c8bcf46df7418086f
if (flag) { if (flag) {
try { try {
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index db95a5d89267f5bfc8020fcedf57b31daffc73a5..71991aee0d60299f744c896075502d1b436b3e44 100644 index 79290edb6014027e1ceb34f21ee9f1220fe74784..b5ee56706c04fd9c0c294856860eebff9f62531a 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -1142,8 +1142,15 @@ public abstract class PlayerList { @@ -1147,8 +1147,15 @@ public abstract class PlayerList {
} }
public void removeAll() { public void removeAll() {

View File

@ -26,10 +26,10 @@ index 299f4b5967a740429b2074161449a27941f5c387..c93346af613c50c7797c991c0b3bb656
+ } + }
} }
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
index b10cc589871f2d35704f5f58b4902101904a1d8f..ab33f49318132a78402726a88e49bb58bc9a9de8 100644 index f9d5af3842696c1a0286098f2d255f44932d4a4a..1eac0962c59fffe47a33903238f7f43e5f77450e 100644
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
@@ -2044,6 +2044,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser @@ -2050,6 +2050,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
switch (packet.getAction()) { switch (packet.getAction()) {
case PRESS_SHIFT_KEY: case PRESS_SHIFT_KEY:
this.player.setShiftKeyDown(true); this.player.setShiftKeyDown(true);
@ -44,10 +44,10 @@ index b10cc589871f2d35704f5f58b4902101904a1d8f..ab33f49318132a78402726a88e49bb58
case RELEASE_SHIFT_KEY: case RELEASE_SHIFT_KEY:
this.player.setShiftKeyDown(false); this.player.setShiftKeyDown(false);
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
index 82d71f529dd5d270820fbfcd9a6ee7363ae94941..a4eb5de429f6934cf6f2b771d62db51e328f8987 100644 index 6cf50fbfdeee38f8835ad8dd6ec6d16416174067..6da451d587c419ffead981876731b847ce3e81db 100644
--- a/src/main/java/net/minecraft/world/entity/player/Player.java --- a/src/main/java/net/minecraft/world/entity/player/Player.java
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java
@@ -579,7 +579,7 @@ public abstract class Player extends LivingEntity { @@ -577,7 +577,7 @@ public abstract class Player extends LivingEntity {
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft()); this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight()); this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) { if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {

View File

@ -20,10 +20,10 @@ index 5e23ff0c5e44427a996281ae42fc12c28649e158..7a69f9d9bb9c05474d8fbab22d626529
+ } + }
} }
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 70cbf25466b7b7800c69d72c5f83b733cb83228b..50427b48a0f823cff8826ca205a9af16b2e2fe93 100644 index 5a6d044a0b3a60e50c55d2f854b923f46df12d5e..5a2bd4c382b72157d1d11381665ce1398c63cb2d 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -2479,5 +2479,10 @@ public final class CraftServer implements Server { @@ -2491,5 +2491,10 @@ public final class CraftServer implements Server {
commandMap.registerServerAliases(); commandMap.registerServerAliases();
return true; return true;
} }

View File

@ -19,7 +19,7 @@ Other changes:
configuration configuration
diff --git a/build.gradle.kts b/build.gradle.kts diff --git a/build.gradle.kts b/build.gradle.kts
index 1f4c0f2156c588fcbb3b0329a416dc20a4b355a8..ba7f0c199c60c062d399586e5c9a0d3da8ddb013 100644 index 6cab6b2f348366e7e0357638ac11df5961a7388d..ff067710300454ed284d38a75cd6b3e5f04cf794 100644
--- a/build.gradle.kts --- a/build.gradle.kts
+++ b/build.gradle.kts +++ b/build.gradle.kts
@@ -16,7 +16,17 @@ repositories { @@ -16,7 +16,17 @@ repositories {
@ -39,8 +39,8 @@ index 1f4c0f2156c588fcbb3b0329a416dc20a4b355a8..ba7f0c199c60c062d399586e5c9a0d3d
+ runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1") + runtimeOnly("org.apache.logging.log4j:log4j-core:2.14.1")
+ // Paper end + // Paper end
implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper implementation("org.apache.logging.log4j:log4j-iostreams:2.14.1") // Paper
implementation("org.apache.logging.log4j:log4j-api:2.14.1") // Paper
implementation("org.ow2.asm:asm:9.2") implementation("org.ow2.asm:asm:9.2")
implementation("org.ow2.asm:asm-commons:9.2") // Paper - ASM event executor generation
diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java diff --git a/src/main/java/com/destroystokyo/paper/console/PaperConsole.java b/src/main/java/com/destroystokyo/paper/console/PaperConsole.java
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..a4070b59e261f0f1ac4beec47b11492f4724bf27 index 0000000000000000000000000000000000000000..a4070b59e261f0f1ac4beec47b11492f4724bf27
@ -112,7 +112,7 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
+ +
+} +}
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938cf71d61b 100644 index 450e7165bd4806a4ed39a1b25486b408cc760460..543acb52698deb890a2624112e63be275a52c008 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java --- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -9,6 +9,7 @@ import com.mojang.authlib.GameProfile; @@ -9,6 +9,7 @@ import com.mojang.authlib.GameProfile;
@ -121,18 +121,18 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
import com.mojang.datafixers.DataFixer; import com.mojang.datafixers.DataFixer;
+import io.papermc.paper.adventure.PaperAdventure; // Paper +import io.papermc.paper.adventure.PaperAdventure; // Paper
import it.unimi.dsi.fastutil.longs.LongIterator; import it.unimi.dsi.fastutil.longs.LongIterator;
import java.awt.GraphicsEnvironment;
import java.awt.image.BufferedImage; import java.awt.image.BufferedImage;
@@ -170,7 +171,7 @@ import org.apache.logging.log4j.Logger; import java.io.BufferedWriter;
@@ -167,7 +168,7 @@ import org.apache.logging.log4j.Logger;
// CraftBukkit start
import com.mojang.serialization.DynamicOps; import com.mojang.serialization.DynamicOps;
import com.mojang.serialization.Lifecycle; import com.mojang.serialization.Lifecycle;
import com.google.common.collect.ImmutableSet;
-import jline.console.ConsoleReader; -import jline.console.ConsoleReader;
+// import jline.console.ConsoleReader; // Paper +// import jline.console.ConsoleReader; // Paper
import joptsimple.OptionSet; import joptsimple.OptionSet;
import net.minecraft.resources.RegistryReadOps; import net.minecraft.resources.RegistryReadOps;
import net.minecraft.server.bossevents.CustomBossEvents; import net.minecraft.server.bossevents.CustomBossEvents;
@@ -285,7 +286,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -283,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
public OptionSet options; public OptionSet options;
public org.bukkit.command.ConsoleCommandSender console; public org.bukkit.command.ConsoleCommandSender console;
public org.bukkit.command.RemoteConsoleCommandSender remoteConsole; public org.bukkit.command.RemoteConsoleCommandSender remoteConsole;
@ -141,7 +141,7 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
public static int currentTick = 0; // Paper - Further improve tick loop public static int currentTick = 0; // Paper - Further improve tick loop
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>(); public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
public int autosavePeriod; public int autosavePeriod;
@@ -364,7 +365,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -366,7 +367,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
this.options = options; this.options = options;
this.datapackconfiguration = datapackconfiguration; this.datapackconfiguration = datapackconfiguration;
this.vanillaCommandDispatcher = datapackresources.commands; // CraftBukkit this.vanillaCommandDispatcher = datapackresources.commands; // CraftBukkit
@ -151,7 +151,7 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
if (System.console() == null && System.getProperty("jline.terminal") == null) { if (System.console() == null && System.getProperty("jline.terminal") == null) {
System.setProperty("jline.terminal", "jline.UnsupportedTerminal"); System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
Main.useJline = false; Main.useJline = false;
@@ -385,6 +388,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -387,6 +390,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
MinecraftServer.LOGGER.warn((String) null, ex); MinecraftServer.LOGGER.warn((String) null, ex);
} }
} }
@ -160,7 +160,7 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this)); Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
} }
// CraftBukkit end // CraftBukkit end
@@ -1186,7 +1191,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1174,7 +1179,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
org.spigotmc.WatchdogThread.doStop(); // Spigot org.spigotmc.WatchdogThread.doStop(); // Spigot
// CraftBukkit start - Restore terminal to original settings // CraftBukkit start - Restore terminal to original settings
try { try {
@ -169,7 +169,7 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
} catch (Exception ignored) { } catch (Exception ignored) {
} }
// CraftBukkit end // CraftBukkit end
@@ -1575,7 +1580,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -1559,7 +1564,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@Override @Override
public void sendMessage(Component message, UUID sender) { public void sendMessage(Component message, UUID sender) {
@ -179,10 +179,10 @@ index 0b70123deec6470c8bcf46df7418086f31e893fe..031bd2ed5c6fd2a859e8a69c48db3938
public KeyPair getKeyPair() { public KeyPair getKeyPair() {
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51bbf49dc28 100644 index 2201aeecd9936402825200dd696dc5607fe0f880..eed1d77a91f19722c2d2a3a43184565cd29732f7 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -109,6 +109,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -107,6 +107,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
if (!org.bukkit.craftbukkit.Main.useConsole) { if (!org.bukkit.craftbukkit.Main.useConsole) {
return; return;
} }
@ -192,7 +192,7 @@ index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51b
jline.console.ConsoleReader bufferedreader = reader; jline.console.ConsoleReader bufferedreader = reader;
// MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return // MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
@@ -140,7 +143,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -138,7 +141,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
continue; continue;
} }
if (s.trim().length() > 0) { // Trim to filter lines which are just spaces if (s.trim().length() > 0) { // Trim to filter lines which are just spaces
@ -201,7 +201,7 @@ index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51b
} }
// CraftBukkit end // CraftBukkit end
} }
@@ -148,6 +151,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -146,6 +149,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
DedicatedServer.LOGGER.error("Exception handling console input", ioexception); DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
} }
@ -210,7 +210,7 @@ index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51b
} }
}; };
@@ -159,6 +164,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -157,6 +162,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
} }
global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler()); global.addHandler(new org.bukkit.craftbukkit.util.ForwardLogHandler());
@ -220,7 +220,7 @@ index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51b
final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger()); final org.apache.logging.log4j.core.Logger logger = ((org.apache.logging.log4j.core.Logger) LogManager.getRootLogger());
for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) { for (org.apache.logging.log4j.core.Appender appender : logger.getAppenders().values()) {
if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) { if (appender instanceof org.apache.logging.log4j.core.appender.ConsoleAppender) {
@@ -167,6 +175,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -165,6 +173,8 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
} }
new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start(); new org.bukkit.craftbukkit.util.TerminalConsoleWriterThread(System.out, this.reader).start();
@ -230,10 +230,10 @@ index 7d834c1b1588851188372eebd9efad9313c610f7..967552df9d5ae7e58bb39127e1adb51b
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream()); System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).buildPrintStream());
System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream()); System.setErr(IoBuilder.forLogger(logger).setLevel(Level.WARN).buildPrintStream());
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
index 71991aee0d60299f744c896075502d1b436b3e44..0eea43c994e76b466fdda8ecd145d0b1c9273cea 100644 index b5ee56706c04fd9c0c294856860eebff9f62531a..61086dbcd852bdb2e5b6083ae8781a5265db7829 100644
--- a/src/main/java/net/minecraft/server/players/PlayerList.java --- a/src/main/java/net/minecraft/server/players/PlayerList.java
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java
@@ -154,8 +154,7 @@ public abstract class PlayerList { @@ -155,8 +155,7 @@ public abstract class PlayerList {
public PlayerList(MinecraftServer server, RegistryAccess.RegistryHolder registryManager, PlayerDataStorage saveHandler, int maxPlayers) { public PlayerList(MinecraftServer server, RegistryAccess.RegistryHolder registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
this.cserver = server.server = new CraftServer((DedicatedServer) server, this); this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
@ -244,18 +244,18 @@ index 71991aee0d60299f744c896075502d1b436b3e44..0eea43c994e76b466fdda8ecd145d0b1
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE); this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 50427b48a0f823cff8826ca205a9af16b2e2fe93..696e2495ee8046c78ed53126db0e6c696c77c00d 100644 index 5a2bd4c382b72157d1d11381665ce1398c63cb2d..de85382893132efa9c60e0c9bb0f07faaf6f442c 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -47,7 +47,6 @@ import java.util.function.Consumer; @@ -48,7 +48,6 @@ import java.util.logging.Level;
import java.util.logging.Level;
import java.util.logging.Logger; import java.util.logging.Logger;
import java.util.stream.Collectors;
import javax.imageio.ImageIO; import javax.imageio.ImageIO;
-import jline.console.ConsoleReader; -import jline.console.ConsoleReader;
import net.minecraft.advancements.Advancement; import net.minecraft.advancements.Advancement;
import net.minecraft.commands.CommandSourceStack; import net.minecraft.commands.CommandSourceStack;
import net.minecraft.commands.Commands; import net.minecraft.commands.Commands;
@@ -61,6 +60,7 @@ import net.minecraft.resources.RegistryReadOps; @@ -62,6 +61,7 @@ import net.minecraft.resources.RegistryReadOps;
import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation; import net.minecraft.resources.ResourceLocation;
import net.minecraft.server.ConsoleInput; import net.minecraft.server.ConsoleInput;
@ -263,7 +263,7 @@ index 50427b48a0f823cff8826ca205a9af16b2e2fe93..696e2495ee8046c78ed53126db0e6c69
import net.minecraft.server.MinecraftServer; import net.minecraft.server.MinecraftServer;
import net.minecraft.server.bossevents.CustomBossEvent; import net.minecraft.server.bossevents.CustomBossEvent;
import net.minecraft.server.commands.ReloadCommand; import net.minecraft.server.commands.ReloadCommand;
@@ -1250,9 +1250,13 @@ public final class CraftServer implements Server { @@ -1256,9 +1256,13 @@ public final class CraftServer implements Server {
return this.logger; return this.logger;
} }
@ -278,7 +278,7 @@ index 50427b48a0f823cff8826ca205a9af16b2e2fe93..696e2495ee8046c78ed53126db0e6c69
@Override @Override
public PluginCommand getPluginCommand(String name) { public PluginCommand getPluginCommand(String name) {
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index f09520b7723dee6ab04215276d037012d643999f..bbf552bf586de94d8dfc5fb1c18e0af6f75aebe1 100644 index c6312e189751a637341c9cf4fd24dc05766b09d6..29e4b0282bd85c55700c07480b6c8911a1708dad 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java --- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java +++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -12,7 +12,7 @@ import java.util.logging.Level; @@ -12,7 +12,7 @@ import java.util.logging.Level;

View File

@ -21,7 +21,7 @@ index c93346af613c50c7797c991c0b3bb6565729129f..e2894138d3efb32161087ad2a1093b8c
+ } + }
} }
diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java diff --git a/src/main/java/net/minecraft/world/entity/monster/Creeper.java b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
index 1c934f77b5040eb317b5b489f5c4ba55e76743c8..aa16a81ee447e8bae274668f2240627d060398ba 100644 index 4a7e25481a382bc06ff022a17a590e08eac398d6..638b80006138ca7be44abfa69f31eccb2035ffac 100644
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java --- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java +++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
@@ -281,7 +281,7 @@ public class Creeper extends Monster implements PowerableMob { @@ -281,7 +281,7 @@ public class Creeper extends Monster implements PowerableMob {

View File

@ -5,10 +5,10 @@ Subject: [PATCH] Item#canEntityPickup
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
index 5dbc90cf67ee88d2f7043c38eaad4fc5874606b5..4f3613e8232df3b4d9e10970b9faf9fbdd3b34a2 100644 index a2310dc7b045d4e4c3924d656a4dcf0a1d66c095..3eda6821d12bf616037f6c00815602428afbcdaf 100644
--- a/src/main/java/net/minecraft/world/entity/Mob.java --- a/src/main/java/net/minecraft/world/entity/Mob.java
+++ b/src/main/java/net/minecraft/world/entity/Mob.java +++ b/src/main/java/net/minecraft/world/entity/Mob.java
@@ -619,6 +619,11 @@ public abstract class Mob extends LivingEntity { @@ -622,6 +622,11 @@ public abstract class Mob extends LivingEntity {
ItemEntity entityitem = (ItemEntity) iterator.next(); ItemEntity entityitem = (ItemEntity) iterator.next();
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) { if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
@ -21,10 +21,10 @@ index 5dbc90cf67ee88d2f7043c38eaad4fc5874606b5..4f3613e8232df3b4d9e10970b9faf9fb
} }
} }
diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
index bf6daeefef5a60ebc612c0347eb34d581fb8851a..9611388a6aeebb86b19d89c526f53dfed4d3ed27 100644 index 8d3242a1436b0622d0aebb0a61a447ddf5819273..6df6204c9d4099afeb8ff07dd747f756d8e380d6 100644
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
@@ -51,6 +51,7 @@ public class ItemEntity extends Entity { @@ -52,6 +52,7 @@ public class ItemEntity extends Entity {
private UUID owner; private UUID owner;
public final float bobOffs; public final float bobOffs;
private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit