mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
More more more work
This commit is contained in:
parent
01f5831171
commit
474a02835d
@ -490,7 +490,7 @@ index 0000000000000000000000000000000000000000..9cfa5d36a6991067a3866e0d437749fa
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 4d2491c04b587c8315173ccbcac9686f42937358..d40c4706918aa2cebc1422fba1a09c83e75e6bf7 100644
|
||||
index 09cf1125221bdbebddabfc46095c3dbd153714c1..49f465d0009b084be2a8e809c53126af1ad72cd2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -235,6 +235,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -502,7 +502,7 @@ index 4d2491c04b587c8315173ccbcac9686f42937358..d40c4706918aa2cebc1422fba1a09c83
|
||||
|
||||
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
|
||||
index a73a4dc52467fbb5980c2d819083b9461fcb8018..08f027cdcaeeca7b545483cb8c5eb8d13e4933b9 100644
|
||||
index 0ec2db500e4a0230a91286a709b8d444d1b529f4..272095d7a09ab41227d741172735f66fd2798ce1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
|
||||
@@ -32,6 +32,20 @@ public abstract class AbstractMinecartContainer extends AbstractMinecart impleme
|
||||
@ -542,7 +542,7 @@ index a73a4dc52467fbb5980c2d819083b9461fcb8018..08f027cdcaeeca7b545483cb8c5eb8d1
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
index 229e9923584e96b9094dfd9d10818d4ced7cdccb..3a720375c3daa961a34363f78c2c51d301c3fa06 100644
|
||||
index d88a6501917306eab57f46cb0d10dc03164a94da..e88c39d405fc7068db64ad34a03dec8d559e749e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ChestBoat.java
|
||||
@@ -65,12 +65,14 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
@ -561,7 +561,7 @@ index 229e9923584e96b9094dfd9d10818d4ced7cdccb..3a720375c3daa961a34363f78c2c51d3
|
||||
}
|
||||
|
||||
@@ -245,6 +247,20 @@ public class ChestBoat extends Boat implements HasCustomInventoryScreen, Contain
|
||||
this.level.gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
||||
this.level().gameEvent(GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -582,7 +582,7 @@ index 229e9923584e96b9094dfd9d10818d4ced7cdccb..3a720375c3daa961a34363f78c2c51d3
|
||||
public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
|
||||
private int maxStack = MAX_STACK;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
index d5cb231495bae089b3ad21e3259ab08afbbcd46b..e30938ed1782d59177e24bb3989d87d3945af0e4 100644
|
||||
index e0fbacd574e0c83c2e1d164ded8e9ccf4af30480..94252d346c4f8dfbd1501b142ea0b6985dc8e19a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/ContainerEntity.java
|
||||
@@ -59,7 +59,7 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
@ -603,25 +603,23 @@ index d5cb231495bae089b3ad21e3259ab08afbbcd46b..e30938ed1782d59177e24bb3989d87d3
|
||||
ContainerHelper.loadAllItems(nbt, this.getItemStacks());
|
||||
}
|
||||
|
||||
@@ -96,13 +96,15 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
@@ -96,13 +96,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
|
||||
default void unpackChestVehicleLootTable(@Nullable Player player) {
|
||||
MinecraftServer minecraftServer = this.getLevel().getServer();
|
||||
MinecraftServer minecraftServer = this.level().getServer();
|
||||
- if (this.getLootTable() != null && minecraftServer != null) {
|
||||
+ if (this.getLootableData().shouldReplenish(player) && minecraftServer != null) { // Paper
|
||||
LootTable lootTable = minecraftServer.getLootTables().get(this.getLootTable());
|
||||
LootTable lootTable = minecraftServer.getLootData().getLootTable(this.getLootTable());
|
||||
if (player != null) {
|
||||
CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.getLootTable());
|
||||
}
|
||||
|
||||
- this.setLootTable((ResourceLocation)null);
|
||||
+ // this.setLootTable((ResourceLocation)null); // Paper
|
||||
+ this.getLootableData().processRefill(player); // Paper
|
||||
+
|
||||
LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.getLevel())).withParameter(LootContextParams.ORIGIN, this.position()).withOptionalRandomSeed(this.getLootTableSeed());
|
||||
LootParams.Builder builder = (new LootParams.Builder((ServerLevel)this.level())).withParameter(LootContextParams.ORIGIN, this.position());
|
||||
if (player != null) {
|
||||
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
|
||||
@@ -176,4 +178,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
@@ -176,4 +176,13 @@ public interface ContainerEntity extends Container, MenuProvider {
|
||||
default boolean isChestVehicleStillValid(Player player) {
|
||||
return !this.isRemoved() && this.position().closerThan(player.position(), 8.0D);
|
||||
}
|
||||
@ -636,7 +634,7 @@ index d5cb231495bae089b3ad21e3259ab08afbbcd46b..e30938ed1782d59177e24bb3989d87d3
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
index ce0f766fd5f4bb30102f25ed4c68efa6f3c73835..b9f0dae1ec96194fe78c086b63d8a18b1d0cfcf7 100644
|
||||
index 111494c30a2b7d8464237a92cf5c98f7f4cca19d..e11618247ad889fa8fadbb2c7addd0de94caf249 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java
|
||||
@@ -29,6 +29,7 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
@ -668,7 +666,7 @@ index ce0f766fd5f4bb30102f25ed4c68efa6f3c73835..b9f0dae1ec96194fe78c086b63d8a18b
|
||||
if (this.lootTable == null) {
|
||||
return false;
|
||||
} else {
|
||||
@@ -61,18 +65,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
@@ -61,18 +65,18 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc
|
||||
nbt.putLong("LootTableSeed", this.lootTableSeed);
|
||||
}
|
||||
|
||||
@ -680,17 +678,29 @@ index ce0f766fd5f4bb30102f25ed4c68efa6f3c73835..b9f0dae1ec96194fe78c086b63d8a18b
|
||||
public void unpackLootTable(@Nullable Player player) {
|
||||
- if (this.lootTable != null && this.level.getServer() != null) {
|
||||
+ if (this.lootableData.shouldReplenish(player) && this.level.getServer() != null) { // Paper
|
||||
LootTable lootTable = this.level.getServer().getLootTables().get(this.lootTable);
|
||||
LootTable lootTable = this.level.getServer().getLootData().getLootTable(this.lootTable);
|
||||
if (player instanceof ServerPlayer) {
|
||||
CriteriaTriggers.GENERATE_LOOT.trigger((ServerPlayer)player, this.lootTable);
|
||||
}
|
||||
|
||||
- this.lootTable = null;
|
||||
+ //this.lootTable = null; // Paper
|
||||
+ this.lootableData.processRefill(player); // Paper
|
||||
LootContext.Builder builder = (new LootContext.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition)).withOptionalRandomSeed(this.lootTableSeed);
|
||||
LootParams.Builder builder = (new LootParams.Builder((ServerLevel)this.level)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(this.worldPosition));
|
||||
if (player != null) {
|
||||
builder.withLuck(player.getLuck()).withParameter(LootContextParams.THIS_ENTITY, player);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||
index d5bfa06a90158fb6d9cc54f7a9b44a277f2c480f..dbdf9b009a488767bb63b0867943fd932fac16e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
|
||||
@@ -60,7 +60,7 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
|
||||
this.setLootTable(this.getLootTable(), seed);
|
||||
}
|
||||
|
||||
- private void setLootTable(LootTable table, long seed) {
|
||||
+ public void setLootTable(LootTable table, long seed) { // Paper - make public since it overrides a public method
|
||||
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
||||
getSnapshot().setLootTable(key, seed);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||
index b31fa63019822bc172d85427b3f3f2c154d7e179..82b3f3b3aced73ce136b6b94fe212972ac6090ef 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
|
||||
@ -719,19 +729,6 @@ index 982adacb361b0590799dc68f9b7c13c7195627fd..e49eece9bff3a53469673d03a7bbf8f9
|
||||
|
||||
public CraftLootable(World world, T tileEntity) {
|
||||
super(world, tileEntity);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftSuspiciousSand.java b/src/main/java/org/bukkit/craftbukkit/block/CraftSuspiciousSand.java
|
||||
index 15fba6668d340a28f07dd9c02aeb28fe53db1530..855d452dcbcaee092965732f14a17a74572290bb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftSuspiciousSand.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftSuspiciousSand.java
|
||||
@@ -60,7 +60,7 @@ public class CraftSuspiciousSand extends CraftBlockEntityState<SuspiciousSandBlo
|
||||
this.setLootTable(this.getLootTable(), seed);
|
||||
}
|
||||
|
||||
- private void setLootTable(LootTable table, long seed) {
|
||||
+ public void setLootTable(LootTable table, long seed) { // Paper - change visibility since it overrides a public method
|
||||
ResourceLocation key = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey());
|
||||
getSnapshot().setLootTable(key, seed);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
||||
index ae07db69b11b993b50782c94aa5c45b97d949612..06a96f027f90fd5bf05de72c8722ff5a81608b66 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
|
@ -5,10 +5,10 @@ Subject: [PATCH] System property for disabling watchdoge
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/spigotmc/WatchdogThread.java b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
index 3ad14bf0697e682a2e777baa8faeb323d127fb13..a9897c494b3dc56d900356d74030359832febbaa 100644
|
||||
index 2693cc933d746e40d8a47d96c6cb6799f0a2472f..6e1fa4f0616ccfd258acd1b4f5b08fc0ad4c9529 100644
|
||||
--- a/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
+++ b/src/main/java/org/spigotmc/WatchdogThread.java
|
||||
@@ -61,7 +61,7 @@ public final class WatchdogThread extends io.papermc.paper.util.TickThread // Pa
|
||||
@@ -61,7 +61,7 @@ public class WatchdogThread extends Thread
|
||||
while ( !this.stopping )
|
||||
{
|
||||
//
|
@ -5,10 +5,10 @@ Subject: [PATCH] Async GameProfileCache saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e2744847c5decc65be2f8d268457ba80633b8e29..e845baf287da216bc5c1d2588b8e720212318266 100644
|
||||
index ac0a6cfb6fb7d9fa696b1e35ebdfb37935b74048..857cc4fcc586f7a8ea5baeeae69da62ebfdac77a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -937,7 +937,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -954,7 +954,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
} catch (java.lang.InterruptedException ignored) {} // Paper
|
||||
if (org.spigotmc.SpigotConfig.saveUserCacheOnStopOnly) {
|
||||
MinecraftServer.LOGGER.info("Saving usercache.json");
|
||||
@ -16,9 +16,9 @@ index e2744847c5decc65be2f8d268457ba80633b8e29..e845baf287da216bc5c1d2588b8e7202
|
||||
+ this.getProfileCache().save(false); // Paper
|
||||
}
|
||||
// Spigot end
|
||||
io.papermc.paper.chunk.system.io.RegionFileIOThread.close(true); // Paper // Paper - rewrite chunk system
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 18f7d73fd8a780753e2249a9fec6bb335ebfdeed..35904c69e14c4c0addda204d5e3788518c2e16c4 100644
|
||||
index 6f64d98021e842905cdd6410ec355a6f136ec18f..a9cf8960d487ee71385341285a4b1618007d06dc 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -242,7 +242,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optional TNT doesn't move in water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 813994c9f4efc7611cad1633b1a1ea0c99e244d3..b3bc4af0b0be7223318e945c6eee4fe042523934 100644
|
||||
index 04ff01ba9f1f869f90d39645edb7aba42885725e..5ec480397fb043717c63961651f7c62440e57201 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -72,7 +72,7 @@ public class ServerEntity {
|
||||
@@ -70,7 +70,7 @@ public class ServerEntity {
|
||||
@Nullable
|
||||
private List<SynchedEntityData.DataValue<?>> trackedDataValues;
|
||||
// CraftBukkit start
|
||||
@ -18,7 +18,7 @@ index 813994c9f4efc7611cad1633b1a1ea0c99e244d3..b3bc4af0b0be7223318e945c6eee4fe0
|
||||
public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> 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
|
||||
index ab5817df2c98d24ee627fd5cf1f71e40b044e43e..94e3ce40da0401a94a24a6c0f9e7ffa3d0ef850d 100644
|
||||
index 223cd451a952addec522711b6d3a0d6c0ab0f797..31473200264e6365fb149b11d0965f509f78218c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -95,6 +95,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
@ -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
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index ebad2e1bac84bade6dd2b893de832b77705a6f57..7ea68dc8e8bf3795013acbbde0c55a9ff833dfbd 100644
|
||||
index dc84da6d6036802792cf9a31bb219cc24bb9e57b..9ac9a40e442a30b785ba79e015389f3308ae37c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -174,6 +174,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -173,6 +173,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
private org.spigotmc.TickLimiter tileLimiter;
|
||||
private int tileTickPosition;
|
||||
public final Map<Explosion.CacheKey, Float> explosionDensityCache = new HashMap<>(); // Paper - Optimize explosions
|
@ -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
|
||||
index 2d1df61cc7ec645add8f729cc6cfdea0c56755aa..34dc3555dbff9942a3ee39b27da44831f280b5a8 100644
|
||||
index a20eaa9b1d030ccd7e1fc49df47acee46f4e7e20..b96652b7bcad07c39a81858c1a2c285efbf67905 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -166,6 +166,14 @@ public class Main {
|
@ -7,33 +7,33 @@ Co-authored-by: Evan McCarthy <evanmccarthy@outlook.com>
|
||||
Co-authored-by: lexikiq <noellekiq@gmail.com>
|
||||
|
||||
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 6c951d25de5fb9301daf46fb412dd766e90c6379..039a5246a2e9a5e84f3b712f1d138053605b33ec 100644
|
||||
index 29798faa9cc9aead40e3329307dc63cb7bf838b6..27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -656,7 +656,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -689,7 +689,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.b(1028, this.getChunkCoordinates(), 0);
|
||||
int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16;
|
||||
- for (net.minecraft.server.level.ServerPlayer player : this.level.getServer().getPlayerList().players) {
|
||||
+ for (net.minecraft.server.level.ServerPlayer player : level.spigotConfig.dragonDeathSoundRadius > 0 ? ((ServerLevel) level).players() : level.getServer().getPlayerList().players) { // Paper
|
||||
// this.level().globalLevelEvent(1028, this.blockPosition(), 0);
|
||||
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
||||
- for (net.minecraft.server.level.ServerPlayer player : this.level().getServer().getPlayerList().players) {
|
||||
+ for (net.minecraft.server.level.ServerPlayer player : this.level().spigotConfig.dragonDeathSoundRadius > 0 ? ((ServerLevel) this.level()).players() : this.level().getServer().getPlayerList().players) { // Paper
|
||||
double deltaX = this.getX() - player.getX();
|
||||
double deltaZ = this.getZ() - player.getZ();
|
||||
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
|
||||
index e6f51c5cc960de30be32df45c1f01d7b4cf314ed..2cbcd304b1117d4791d7e32d7738c12cfd4d1c9e 100644
|
||||
index e23347faf763f22301136a013034367ac847c35b..4576c96f85fe5a614a78e53926dfbc2705618423 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/wither/WitherBoss.java
|
||||
@@ -271,7 +271,7 @@ public class WitherBoss extends Monster implements PowerableMob, RangedAttackMob
|
||||
// CraftBukkit start - Use relative location for far away sounds
|
||||
// this.world.globalLevelEvent(1023, new BlockPosition(this), 0);
|
||||
int viewDistance = ((ServerLevel) this.level).getCraftServer().getViewDistance() * 16;
|
||||
// this.level().globalLevelEvent(1023, new BlockPosition(this), 0);
|
||||
int viewDistance = ((ServerLevel) this.level()).getCraftServer().getViewDistance() * 16;
|
||||
- for (ServerPlayer player : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players) {
|
||||
+ for (ServerPlayer player : level.spigotConfig.witherSpawnSoundRadius > 0 ? ((ServerLevel) level).players() : level.getServer().getPlayerList().players) { // Paper
|
||||
+ for (ServerPlayer player : this.level().spigotConfig.witherSpawnSoundRadius > 0 ? ((ServerLevel) this.level()).players() : this.level().getServer().getPlayerList().players) { // Paper
|
||||
double deltaX = this.getX() - player.getX();
|
||||
double deltaZ = this.getZ() - player.getZ();
|
||||
double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
|
||||
diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
index a88ffff41481d346a99762352094cdb4e8dd6cc2..e0c3aa1285709a40ff0ea8c1d74d43d2b341aecc 100644
|
||||
index 5bc68514a1e8a212e2681f06b918548c0ec565b6..1fddc9025a9e5079f05dd6c86f6ca43c5d51d9c3 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java
|
||||
@@ -64,7 +64,7 @@ public class EnderEyeItem extends Item {
|
@ -43,10 +43,10 @@ index da98f074ccd5a40c635824112c97fd174c393cb1..6599f874d9f97e9ef4862039ecad7277
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cf9db3ed2c9caba0bd40d310aaf1cc10603926c4..f526b2701756062ef17ed0496685c4ac2d6288a6 100644
|
||||
index bc0bff6f06a74e2bb3f00fac2fdcc543bc970c2f..0b9eccd6bfb90fe282a9ce48dbf6379c717ec83a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1737,7 +1737,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1735,7 +1735,7 @@ public final class CraftServer implements Server {
|
||||
// Spigot Start
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable packet in spam threshold
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 20b9fa814d85b83d46714f4d3743647af473acb6..97996eb06efdf275f34f4aba14b0e377d4515ccf 100644
|
||||
index c65282a85e2822b86f56c528ab838e628ea27411..96e38a914db34ed165bd5071585bc7e5ec7fb41d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1596,13 +1596,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1588,13 +1588,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
// Spigot start - limit place/interactions
|
||||
private int limitedPackets;
|
||||
private long lastLimitedPacket = -1;
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable flying kick messages
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 97996eb06efdf275f34f4aba14b0e377d4515ccf..fcb56b5c3eb2aa7de373fc3f1f410e5e5e287765 100644
|
||||
index 96e38a914db34ed165bd5071585bc7e5ec7fb41d..590880b71c3c1930eb84538af5f6c3b690bb690f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -355,7 +355,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
@ -5,10 +5,10 @@ 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
|
||||
index efbf6b316a70b94e4bd490df8ebe77cd9f638ba4..cad8854cc7523d60c06ca1f03bfd4fbff984087c 100644
|
||||
index f9704b20e71564ac721a24655b2792c689edf6ba..e04f3f1159c5d5fa2e3956a36e95f8afb5a1d4aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -849,10 +849,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -850,10 +850,17 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
public void thunderHit(ServerLevel world, LightningBolt lightning) {
|
||||
if (world.getDifficulty() != Difficulty.PEACEFUL) {
|
||||
@ -28,7 +28,7 @@ index efbf6b316a70b94e4bd490df8ebe77cd9f638ba4..cad8854cc7523d60c06ca1f03bfd4fbf
|
||||
entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch.blockPosition()), MobSpawnType.CONVERSION, (SpawnGroupData) null, (CompoundTag) null);
|
||||
entitywitch.setNoAi(this.isNoAi());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index f1dc8eaa571f54e5885ceada9929d965992d7760..04b5b28e9127a0e94515d261f6d7d34230cbf447 100644
|
||||
index 1b9a08098199f305606289724ee047e8075ffcea..8d9b25f3c8c840baf9c203f80d46201434920aa5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1189,6 +1189,14 @@ public class CraftEventFactory {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Filter bad tile entity nbt data from falling blocks
|
||||
|
||||
|
||||
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 5e93e55df24941a21721295ef8a3381ae19e1f26..d5c30c48a6b59b01041dffc8b4b7b70ea27f0c7d 100644
|
||||
index 4488d112b280a2020712708940adf65b69ca0a3c..d859e01a6cc4225c514c4023b8adc066e73d3bb7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -332,7 +332,7 @@ public class FallingBlockEntity extends Entity {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
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
|
||||
index f526b2701756062ef17ed0496685c4ac2d6288a6..ded2e2df6bed222779a39e6f3cfd9170fdc0b494 100644
|
||||
index 0b9eccd6bfb90fe282a9ce48dbf6379c717ec83a..3d6c25424c859f63c8f4661b39c82c269c3837fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2631,5 +2631,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2629,5 +2629,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
@ -5,10 +5,10 @@ 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
|
||||
index 588deb938ca710de33bb42bb02c7015b8cbd8eef..f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836 100644
|
||||
index 93c83cfedc7d3a169ad0504aa6e63f600873501b..9dffdfe5bbd0517e9a2c6a6770eea07b43ef9b33 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -249,7 +249,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -254,7 +254,7 @@ public class ExperienceOrb extends Entity {
|
||||
int i = this.repairPlayerItems(player, this.value);
|
||||
|
||||
if (i > 0) {
|
||||
@ -18,7 +18,7 @@ index 588deb938ca710de33bb42bb02c7015b8cbd8eef..f9ccde41eb20c1d53c438ddb40ca7cc5
|
||||
|
||||
--this.count;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 04b5b28e9127a0e94515d261f6d7d34230cbf447..87da5cfb3be65c57ada7dbfc1f345f27533df064 100644
|
||||
index 8d9b25f3c8c840baf9c203f80d46201434920aa5..09d11ea7905a5760ab5ee63e5976d67fb6392bed 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1148,6 +1148,17 @@ public class CraftEventFactory {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add ProjectileCollideEvent
|
||||
Deprecated now and replaced with ProjectileHitEvent
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 87da5cfb3be65c57ada7dbfc1f345f27533df064..64ddab11cc8bd9e8063450f2bec22a4277e49414 100644
|
||||
index 09d11ea7905a5760ab5ee63e5976d67fb6392bed..beacc9af36eface8cf855ee15fb7bcf7e08f9439 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -1292,6 +1292,17 @@ public class CraftEventFactory {
|
||||
@ -40,6 +40,6 @@ index 87da5cfb3be65c57ada7dbfc1f345f27533df064..64ddab11cc8bd9e8063450f2bec22a42
|
||||
|
||||
ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), hitEntity, hitBlock, hitFace);
|
||||
+ event.setCancelled(cancelled); // Paper - propagate legacy event cancellation to modern event
|
||||
entity.level.getCraftServer().getPluginManager().callEvent(event);
|
||||
entity.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
return event;
|
||||
}
|
@ -13,7 +13,7 @@ by adding code to all overrides in:
|
||||
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
|
||||
index 64b64fb0b72eccade63fac99b7b363aafe59169b..46c2885097ab768bb9d62187fe0ad2d61007d353 100644
|
||||
index de87f2e7b8a1662767bab4b0c86ee7cf014ed5cf..eb10ecb4dde7a3df869307fd96c652eb62a8f83e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/PathNavigation.java
|
||||
@@ -158,7 +158,7 @@ public abstract class PathNavigation {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Optimize 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
|
||||
index 7ea68dc8e8bf3795013acbbde0c55a9ff833dfbd..1a0accca970ca5eb895c63c5a45a5261440d0e12 100644
|
||||
index 9ac9a40e442a30b785ba79e015389f3308ae37c3..2bf5dffc7f392278bff9f07e97bef95ba786a916 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -344,6 +344,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -343,6 +343,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ index 52325a99ea38530ad69a39ac0215233139f35268..dd74e8a034022fe72a1652f92712182b
|
||||
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/chunk/ChunkGenerator.java b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
index 5ca3987683f7cecbce24bac434dc387bb5e9bf08..56033c41c2be567d6787420d319d4603fc0a1d10 100644
|
||||
index 8bb14230beb4b012f38997eec70934b96bae4db5..d19585f0833d13867f242768dc7ed952add87e05 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -217,6 +217,7 @@ public abstract class ChunkGenerator {
|
@ -9,13 +9,13 @@ Also allow turning off treasure maps all together as they can eat up Map ID's
|
||||
which are limited in quantity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
index baaaac692df14a7ef66c3fa3bacaf7108d0712da..abb39a5b9d9ce50dbba80661f5c63dc9f31b784a 100644
|
||||
index c29d488d223d817f46bf777656a0c737916c4416..518ef9867421ed9c489fbf5f15e9cbdcaceef6a5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerTrades.java
|
||||
@@ -387,7 +387,8 @@ public class VillagerTrades {
|
||||
@@ -386,7 +386,8 @@ public class VillagerTrades {
|
||||
return null;
|
||||
} else {
|
||||
ServerLevel serverLevel = (ServerLevel)entity.level;
|
||||
ServerLevel serverLevel = (ServerLevel)entity.level();
|
||||
- BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, true);
|
||||
+ if (!serverLevel.paperConfig().environment.treasureMaps.enabled) return null; // Paper
|
||||
+ BlockPos blockPos = serverLevel.findNearestMapStructure(this.destination, entity.blockPosition(), 100, !serverLevel.paperConfig().environment.treasureMaps.findAlreadyDiscoveredVillager); // Paper
|
@ -5,7 +5,7 @@ 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
|
||||
index 426364e0d47c022000813d2945a98d9edb6f6028..970beff5d2c5b3ba3e3b733183d6876d8bc37da9 100644
|
||||
index af6a2e8c4ce41aaf55b645c37f809c2de7ea780a..be7ed906b4a5a8ffda87ecf66f967061b58f8034 100644
|
||||
--- a/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 {
|
||||
@ -16,7 +16,7 @@ index 426364e0d47c022000813d2945a98d9edb6f6028..970beff5d2c5b3ba3e3b733183d6876d
|
||||
|
||||
public ArmorStand(EntityType<? extends ArmorStand> type, Level world) {
|
||||
super(type, world);
|
||||
@@ -943,4 +944,13 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -942,4 +943,13 @@ public class ArmorStand extends LivingEntity {
|
||||
public boolean canBeSeenByAnyone() {
|
||||
return !this.isInvisible() && !this.isMarker();
|
||||
}
|
@ -26,10 +26,10 @@ index 32ef3edebe94a2014168b7e438752a80b2687e5f..ab6c58eed6707ab7b0aa3e7549a871ad
|
||||
// Paper end
|
||||
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
|
||||
index 16dc9546303d692c62b6a1538106019f6bbe149b..d9205d45b72c5d36feeb4da8a70532eaf0ff215f 100644
|
||||
index 55715c017e4e08a0e3db95dea5b8ec4fd4acf00d..2dc0233821172a91f471bf7099f2c051c11331e6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -364,6 +364,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -289,6 +289,29 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
// Paper start
|
@ -6,10 +6,10 @@ Subject: [PATCH] Properly fix item duplication bug
|
||||
Credit to prplz for figuring out the real issue
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index fef0ce65c01fd56a0ed62de27e8d8457324bb295..7395cdcf618033f10482001cb9e2a7727e1e8bb2 100644
|
||||
index d834b6570c9a45fb415afc19262c8735463c27d9..8b35e6804aba52865bda5d9f17ca5cb8576fba6f 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2307,7 +2307,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -2350,7 +2350,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
@Override
|
||||
public boolean isImmobile() {
|
||||
@ -19,10 +19,10 @@ index fef0ce65c01fd56a0ed62de27e8d8457324bb295..7395cdcf618033f10482001cb9e2a772
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7e24a354a513a452aa1f7babb3ee402de8f6e72d..ba493c748c810e4ba452d59bcf8f1b7599f09b04 100644
|
||||
index 590880b71c3c1930eb84538af5f6c3b690bb690f..ec78328916a7cc544fea868afc904208d446739f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -3186,7 +3186,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -3142,7 +3142,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
}
|
||||
|
||||
public final boolean isDisconnected() {
|
@ -7,7 +7,7 @@ Subject: [PATCH] Firework API's
|
||||
public net.minecraft.world.entity.projectile.FireworkRocketEntity attachedToEntity
|
||||
|
||||
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 26a7e2fb8d403c748925bc34a0a9b0e63a6c3452..fca27f98989bf106060ba08196255fe32f850df5 100644
|
||||
index b16add0be6ac782a7e40be0cdeea4c1829a19d4e..288910fb168ddc5d3a61971778b8038a56772fa8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
|
||||
@@ -38,6 +38,7 @@ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
|
||||
@ -44,7 +44,7 @@ index 26a7e2fb8d403c748925bc34a0a9b0e63a6c3452..fca27f98989bf106060ba08196255fe3
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/item/CrossbowItem.java b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
index 98b353d059aa0a08d41973344ee0b56cde90b8be..e6249409d01aee2bdc84821d40ce4551c102d307 100644
|
||||
index da12a95c230129a3a57dc3d2d7d64012dd8bbae6..9bea5e94c246d843f3d67680ffb57075bd9d3467 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/CrossbowItem.java
|
||||
@@ -221,6 +221,7 @@ public class CrossbowItem extends ProjectileWeaponItem implements Vanishable {
|
@ -6,7 +6,7 @@ Subject: [PATCH] PlayerTeleportEndGatewayEvent
|
||||
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
|
||||
index 904e23ad2f148f991ab8d94e5d8d989cdc98268a..7d2b15edbd1a6bf663c29b7bc63c73d34fefd999 100644
|
||||
index 97c57619ebcf31f17f8430ffb68043771d1377f9..9f685b4fe6d57d921e9e7a4d817e0913b863c0ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.data.worldgen.features.EndFeatures;
|
@ -7,10 +7,10 @@ Provides counts without the ineffeciency of using .getEntities().size()
|
||||
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
|
||||
index 1a0accca970ca5eb895c63c5a45a5261440d0e12..35eecb719a813fda6113da24a858188aef31466b 100644
|
||||
index 2bf5dffc7f392278bff9f07e97bef95ba786a916..3d04a9f0e9dd14e34c82c0b6225a6ee6d464ee5c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -117,7 +117,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -116,7 +116,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public static final int TICKS_PER_DAY = 24000;
|
||||
public static final int MAX_ENTITY_SPAWN_Y = 20000000;
|
||||
public static final int MIN_ENTITY_SPAWN_Y = -20000000;
|
||||
@ -20,7 +20,7 @@ index 1a0accca970ca5eb895c63c5a45a5261440d0e12..35eecb719a813fda6113da24a858188a
|
||||
private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList();
|
||||
private boolean tickingBlockEntities;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 61189dc031be93f2cd0a819598049fcb5e2ed6bc..632cc1e185b61677d42405d212f41833ee1bc9d4 100644
|
||||
index 1440b6b8b71ece71b076601752b06bdcff45542f..1278b114db828606dcd2f70c8f0ab53da490c19f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -155,6 +155,56 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -7,10 +7,10 @@ Saving players async is extremely dangerous. This will force it to main
|
||||
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
|
||||
index 1cd7a99a6280975dac96a33b077b372d358f967c..4066a3c6b032d13e4c303b10b012f1224925710f 100644
|
||||
index 1fa3e06326a871d2d9562433c31e3b17a80fd08c..985b23356a7b5a18b358b5bedd21c5fdd57d6504 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1062,11 +1062,13 @@ public abstract class PlayerList {
|
||||
@@ -1069,11 +1069,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void saveAll() {
|
@ -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
|
||||
index d40c4706918aa2cebc1422fba1a09c83e75e6bf7..368a6d73c94addcf948e7cf8f3a026ab2017731e 100644
|
||||
index 49f465d0009b084be2a8e809c53126af1ad72cd2..20d5a46c4022dfea24f275fe143c32b8ddf629cb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2418,6 +2418,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2485,6 +2485,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
protected boolean addPassenger(Entity entity) { // CraftBukkit
|
@ -8,7 +8,7 @@ Adds lots of information about why this orb exists.
|
||||
Replaces isFromBottle() with logic that persists entity reloads too.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 2f21c7920148b812c48da95168fbc63b86b86c9c..fc42bc68ae31f4fad1c382ef3d3c482c1f335f52 100644
|
||||
index b1fcdd896fe76fc96f94b626c5a8ffbcce8008ef..2e3b1eb4c4303d40f12c2e80f0608f2308225e97 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -427,7 +427,7 @@ public class ServerPlayerGameMode {
|
||||
@ -21,7 +21,7 @@ index 2f21c7920148b812c48da95168fbc63b86b86c9c..fc42bc68ae31f4fad1c382ef3d3c482c
|
||||
|
||||
return true;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
index f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836..e952aae85a80a020087c3697624c8c13eab3f914 100644
|
||||
index 9dffdfe5bbd0517e9a2c6a6770eea07b43ef9b33..558b09a482da3035e37c108e60e9d08849017a8d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java
|
||||
@@ -39,13 +39,65 @@ public class ExperienceOrb extends Entity {
|
||||
@ -92,7 +92,7 @@ index f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836..e952aae85a80a020087c3697624c8c13
|
||||
}
|
||||
|
||||
public ExperienceOrb(EntityType<? extends ExperienceOrb> type, Level world) {
|
||||
@@ -155,12 +207,20 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -160,12 +212,20 @@ public class ExperienceOrb extends Entity {
|
||||
}
|
||||
|
||||
public static void award(ServerLevel world, Vec3 pos, int amount) {
|
||||
@ -114,7 +114,7 @@ index f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836..e952aae85a80a020087c3697624c8c13
|
||||
}
|
||||
}
|
||||
|
||||
@@ -230,6 +290,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -235,6 +295,7 @@ public class ExperienceOrb extends Entity {
|
||||
nbt.putShort("Age", (short) this.age);
|
||||
nbt.putShort("Value", (short) this.value);
|
||||
nbt.putInt("Count", this.count);
|
||||
@ -122,7 +122,7 @@ index f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836..e952aae85a80a020087c3697624c8c13
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -238,6 +299,7 @@ public class ExperienceOrb extends Entity {
|
||||
@@ -243,6 +304,7 @@ public class ExperienceOrb extends Entity {
|
||||
this.age = nbt.getShort("Age");
|
||||
this.value = nbt.getShort("Value");
|
||||
this.count = Math.max(nbt.getInt("Count"), 1);
|
||||
@ -131,34 +131,34 @@ index f9ccde41eb20c1d53c438ddb40ca7cc5d2b89836..e952aae85a80a020087c3697624c8c13
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 46701f9c30c5b85b49311ad15da7e1fe2993c789..08087527293c5137af078fa17b6c0f219eab15d0 100644
|
||||
index ad9f1b9b7adc799af751bfbd0ee6fe6d27a58851..61ee6996b412d74c0d4e632ef05992c6e93187d0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1716,7 +1716,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1769,7 +1769,8 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
protected void dropExperience() {
|
||||
// CraftBukkit start - Update getExpReward() above if the removed if() changes!
|
||||
if (true && !(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
|
||||
- ExperienceOrb.award((ServerLevel) this.level, this.position(), this.expToDrop);
|
||||
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop);
|
||||
+ LivingEntity attacker = this.lastHurtByPlayer != null ? this.lastHurtByPlayer : this.lastHurtByMob; // Paper
|
||||
+ ExperienceOrb.award((ServerLevel) this.level, this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper
|
||||
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), this.expToDrop, this instanceof ServerPlayer ? org.bukkit.entity.ExperienceOrb.SpawnReason.PLAYER_DEATH : org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, attacker, this); // Paper
|
||||
this.expToDrop = 0;
|
||||
}
|
||||
// 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
|
||||
index 3cdd7180a41b87caa942d2b3436ba90726686ecb..6216513805add7c8f52e1ed6c77e2d26786b3ab5 100644
|
||||
index fb207550efc5a387ea3346664998882b89e5cdae..8b5e0b9624bdecc3e158d9fc4b2c78f526c6bdeb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java
|
||||
@@ -262,7 +262,7 @@ public abstract class Animal extends AgeableMob {
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience));
|
||||
+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, entityplayer, entityageable)); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -264,7 +264,7 @@ public abstract class Animal extends AgeableMob {
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
// CraftBukkit start - use event experience
|
||||
if (experience > 0) {
|
||||
- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience));
|
||||
+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, null)); // Paper //TODO trigger
|
||||
}
|
||||
// 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
|
||||
index 18344ba254756bcf81061f46bc44c0cc37358433..13061aed29649acfc52d13207aaebcd8ba339ebe 100644
|
||||
index 79b99311bcf318aa1aff78c0c905378d99147716..c2a87255178917a9555ec48ff7e705efef2da7ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java
|
||||
@@ -898,7 +898,7 @@ public class Fox extends Animal implements VariantHolder<Fox.Type> {
|
||||
@ -171,7 +171,7 @@ index 18344ba254756bcf81061f46bc44c0cc37358433..13061aed29649acfc52d13207aaebcd8
|
||||
// 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
|
||||
index a42f419524ddb5263467b59075850ff24920d21d..fb5af59559bc18ce2850d95ef73e5545dcab5ebc 100644
|
||||
index 6ab7ffe2b0da45c38edd46e9d29df603d3a0b0bc..fcd760cb88f84ff79811631612956fde79905132 100644
|
||||
--- a/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 {
|
||||
@ -183,95 +183,82 @@ index a42f419524ddb5263467b59075850ff24920d21d..fb5af59559bc18ce2850d95ef73e5545
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
index c12b8831deb54deb191908ba8a769d4c78825d5b..1b3d462e1e229970c53f763b5cdce7d21f1b1703 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java
|
||||
@@ -264,7 +264,7 @@ public class Frog extends Animal implements VariantHolder<FrogVariant> {
|
||||
this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE);
|
||||
world.broadcastEntityEvent(this, (byte)18);
|
||||
if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
|
||||
- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1));
|
||||
+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper
|
||||
}
|
||||
|
||||
}
|
||||
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 039a5246a2e9a5e84f3b712f1d138053605b33ec..18a9050158f71245d5d88f9c0833fd5d4e5fdca6 100644
|
||||
index 27f99f9ce39aac0bae5e9a7b34fd63833aa4ad26..0f39550f82aa1646dd5e4a887e33c414160ee7d9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -649,7 +649,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -682,7 +682,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
|
||||
if (this.level instanceof ServerLevel) {
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||
- ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.08F));
|
||||
+ ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.08F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper
|
||||
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.08F));
|
||||
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.08F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper
|
||||
}
|
||||
|
||||
if (this.dragonDeathTime == 1 && !this.isSilent()) {
|
||||
@@ -677,7 +677,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
@@ -710,7 +710,7 @@ public class EnderDragon extends Mob implements Enemy {
|
||||
this.move(MoverType.SELF, new Vec3(0.0D, 0.10000000149011612D, 0.0D));
|
||||
if (this.dragonDeathTime == 200 && this.level instanceof ServerLevel) {
|
||||
if (this.dragonDeathTime == 200 && this.level() instanceof ServerLevel) {
|
||||
if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
|
||||
- ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.2F));
|
||||
+ ExperienceOrb.award((ServerLevel) this.level, this.position(), Mth.floor((float) short0 * 0.2F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper
|
||||
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.2F));
|
||||
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), Mth.floor((float) short0 * 0.2F), org.bukkit.entity.ExperienceOrb.SpawnReason.ENTITY_DEATH, this.lastHurtByPlayer, this); // Paper
|
||||
}
|
||||
|
||||
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
|
||||
index cad8854cc7523d60c06ca1f03bfd4fbff984087c..806c49c127578a8f0a0bde11a4ad213e18d629af 100644
|
||||
index e04f3f1159c5d5fa2e3956a36e95f8afb5a1d4aa..68594d2621267f4b112b4d14d2bec3a0dd6a044a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -636,7 +636,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -637,7 +637,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
}
|
||||
|
||||
if (offer.shouldRewardExp()) {
|
||||
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i));
|
||||
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper
|
||||
- this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i));
|
||||
+ this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper
|
||||
}
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
index 6a56b3c12a733662b23c984975f8dfdb43cf6f9b..69ab58f2d8d9287a64f330a02e7cd3be3fe02402 100644
|
||||
index fb80311e90ec83ca39b213d9348c821c402a1933..65592c41b1519eff77ccd7ddd3c885058f3ed138 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTrader.java
|
||||
@@ -197,7 +197,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
@@ -186,7 +186,7 @@ public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVill
|
||||
if (offer.shouldRewardExp()) {
|
||||
int i = 3 + this.random.nextInt(4);
|
||||
|
||||
- this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i));
|
||||
+ this.level.addFreshEntity(new ExperienceOrb(this.level, this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper
|
||||
- this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i));
|
||||
+ this.level().addFreshEntity(new ExperienceOrb(this.level(), this.getX(), this.getY() + 0.5D, this.getZ(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.VILLAGER_TRADE, this.getTradingPlayer(), this)); // Paper
|
||||
}
|
||||
|
||||
}
|
||||
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 9a753ffd35403358df07408ffe85197ee3318f39..082fa4318dc03defbdb76e99250b7d71aa6710f5 100644
|
||||
index 4377a0f7387a09983a5580d408775f386ea5f487..dbff697927e6a6c745377aafd3b476b58f005882 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -522,7 +522,7 @@ public class FishingHook extends Projectile {
|
||||
this.level.addFreshEntity(entityitem);
|
||||
this.level().addFreshEntity(entityitem);
|
||||
// CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
|
||||
if (playerFishEvent.getExpToDrop() > 0) {
|
||||
- entityhuman.level.addFreshEntity(new ExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||
+ entityhuman.level.addFreshEntity(new ExperienceOrb(entityhuman.level, entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getPlayerOwner(), this)); // Paper
|
||||
- entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
|
||||
+ entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop(), org.bukkit.entity.ExperienceOrb.SpawnReason.FISHING, this.getPlayerOwner(), this)); // Paper
|
||||
}
|
||||
// CraftBukkit end
|
||||
if (itemstack1.is(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
|
||||
index db6b1a9804a6d75dce22b780044beb04ca69cc94..dcbbff3a8dfcac869f07025e0e8e3d9c47956093 100644
|
||||
index 2191af62f4202413738542d738456ca71febdbf4..5b3059460d4b18d984483d655526d83204fb1c73 100644
|
||||
--- a/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 {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
- ExperienceOrb.award((ServerLevel) this.level, this.position(), i);
|
||||
+ ExperienceOrb.award((ServerLevel) this.level, this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper
|
||||
- ExperienceOrb.award((ServerLevel) this.level(), this.position(), i);
|
||||
+ ExperienceOrb.award((ServerLevel) this.level(), this.position(), i, org.bukkit.entity.ExperienceOrb.SpawnReason.EXP_BOTTLE, this.getOwner(), this); // Paper
|
||||
this.discard();
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
index 2ad1bffec6242af06b33cc777f27034ed6d6c437..5bcd3857fd30ec43e0191a862fc9c7712149e3dd 100644
|
||||
index c858b987cb6f92cc6fa705bbe1ae11a720eb242c..2c263447aa8853f18d1c1d476b49a47f6e9ca2ad 100644
|
||||
--- a/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
+++ b/src/main/java/net/minecraft/world/inventory/GrindstoneMenu.java
|
||||
@@ -97,7 +97,7 @@ public class GrindstoneMenu extends AbstractContainerMenu {
|
||||
@ -284,10 +271,10 @@ index 2ad1bffec6242af06b33cc777f27034ed6d6c437..5bcd3857fd30ec43e0191a862fc9c771
|
||||
|
||||
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
|
||||
index 6603be2c0906c8d78e7de5c3dbed56f9552ff9c1..f475926cfa6fc98f9f8f4fe8be6fd200cce39c7e 100644
|
||||
index 7ed82beb538a25a5246f6288c1dddb4f5f85e997..7646b66bc5ba0288608de0d836c7307e02eebe67 100644
|
||||
--- a/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 {
|
||||
@@ -362,8 +362,13 @@ public class Block extends BlockBehaviour implements ItemLike {
|
||||
}
|
||||
|
||||
public void popExperience(ServerLevel world, BlockPos pos, int size) {
|
||||
@ -303,10 +290,10 @@ index 6603be2c0906c8d78e7de5c3dbed56f9552ff9c1..f475926cfa6fc98f9f8f4fe8be6fd200
|
||||
|
||||
}
|
||||
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 9b54fd08fae889ac9db09ba67deb5eaae0f3d010..4ed87cc5a46d9e10c755631a16f0e0cb388fb7f2 100644
|
||||
index 9113fd7070596ecf504837f335022d5eb4ef9a77..d56a64b058d8848e405e33d9884a61ea952a8f71 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
|
||||
@@ -637,7 +637,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
@@ -647,7 +647,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit
|
||||
j = event.getExpToDrop();
|
||||
// CraftBukkit end
|
||||
|
||||
@ -316,7 +303,7 @@ index 9b54fd08fae889ac9db09ba67deb5eaae0f3d010..4ed87cc5a46d9e10c755631a16f0e0cb
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
index 0b4f7953d88971fd86f85d29beefbb84cd2121b1..7c5d5355237bc00f1c8c8433351ca7a9938f2e8b 100644
|
||||
index e6eb4a903a43572cfda72db52a1d9c6a6fd46dee..101dac0fcabc5fd696f58ec52ad1fc93a2d0afeb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
|
||||
@@ -946,7 +946,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
|
@ -12,10 +12,10 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 368a6d73c94addcf948e7cf8f3a026ab2017731e..1658a5263f0905c2938dae10b8d3d603fcd4bdca 100644
|
||||
index 20d5a46c4022dfea24f275fe143c32b8ddf629cb..568631c8711788053af407574ab928cb57c11560 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -383,6 +383,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -387,6 +387,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
@ -24,10 +24,10 @@ index 368a6d73c94addcf948e7cf8f3a026ab2017731e..1658a5263f0905c2938dae10b8d3d603
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 08087527293c5137af078fa17b6c0f219eab15d0..4505bd3a2b3854b6d2c7e87ee67df338397a1fa8 100644
|
||||
index 61ee6996b412d74c0d4e632ef05992c6e93187d0..a266f06422ddf52666eb11663cbf287279245596 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3277,8 +3277,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3327,8 +3327,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
index 970beff5d2c5b3ba3e3b733183d6876d8bc37da9..8de5a556d364f29706e3391825288c8a3a75c9c8 100644
|
||||
index be7ed906b4a5a8ffda87ecf66f967061b58f8034..68ac3ffae5d800bde3c5b5163a52768a43bb5963 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -952,5 +952,12 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -951,5 +951,12 @@ public class ArmorStand extends LivingEntity {
|
||||
super.move(type, movement);
|
||||
}
|
||||
}
|
@ -30,7 +30,7 @@ will have plugins and worlds saving to the disk has a high potential to result
|
||||
in corruption/dataloss.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e845baf287da216bc5c1d2588b8e720212318266..d9ceef3d9694ab85f807a732789b2871bb734e50 100644
|
||||
index 857cc4fcc586f7a8ea5baeeae69da62ebfdac77a..e292035cf361c8efa8845450b72a6986694a8ca9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -237,6 +237,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -41,7 +41,7 @@ index e845baf287da216bc5c1d2588b8e720212318266..d9ceef3d9694ab85f807a732789b2871
|
||||
private boolean stopped;
|
||||
private int tickCount;
|
||||
protected final Proxy proxy;
|
||||
@@ -905,7 +906,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -893,7 +894,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.playerList != null) {
|
||||
MinecraftServer.LOGGER.info("Saving players");
|
||||
this.playerList.saveAll();
|
||||
@ -50,7 +50,7 @@ index e845baf287da216bc5c1d2588b8e720212318266..d9ceef3d9694ab85f807a732789b2871
|
||||
try { Thread.sleep(100); } catch (InterruptedException ex) {} // CraftBukkit - SPIGOT-625 - give server at least a chance to send packets
|
||||
}
|
||||
|
||||
@@ -956,6 +957,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -973,6 +974,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
public void halt(boolean waitForShutdown) {
|
||||
@ -64,10 +64,10 @@ index e845baf287da216bc5c1d2588b8e720212318266..d9ceef3d9694ab85f807a732789b2871
|
||||
if (waitForShutdown) {
|
||||
try {
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4066a3c6b032d13e4c303b10b012f1224925710f..a34c9da6dbd37ab01385b768c06fef418de9c7c8 100644
|
||||
index 985b23356a7b5a18b358b5bedd21c5fdd57d6504..d28f662d4a935994525118a403f3dc39cfa81a49 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -1174,8 +1174,15 @@ public abstract class PlayerList {
|
||||
@@ -1181,8 +1181,15 @@ public abstract class PlayerList {
|
||||
}
|
||||
|
||||
public void removeAll() {
|
@ -14,10 +14,10 @@ To be converted into a Paper-API event at some point in the future?
|
||||
public net.minecraft.world.entity.player.Player removeEntitiesOnShoulder()V
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index ba493c748c810e4ba452d59bcf8f1b7599f09b04..8da1aa70d2cdbe722ebb9f0f4e30fb73bdbeab92 100644
|
||||
index ec78328916a7cc544fea868afc904208d446739f..5f79819a8168592138e0b2297825402502c6b54d 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2330,6 +2330,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2322,6 +2322,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
switch (packet.getAction()) {
|
||||
case PRESS_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(true);
|
||||
@ -32,15 +32,14 @@ index ba493c748c810e4ba452d59bcf8f1b7599f09b04..8da1aa70d2cdbe722ebb9f0f4e30fb73
|
||||
case RELEASE_SHIFT_KEY:
|
||||
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
|
||||
index aafc1b05b86d9b715cfe5ddbf4abd76a4ad772c3..11f1d8cc6f31b5a38db76ce411209a494c9e7e8a 100644
|
||||
index 5ef9abc0903fc06468c35f5a8cc450a8f6c03165..90aba22c91bf9950c4df2204afc3fc97e411ea9a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -587,7 +587,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -588,6 +588,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||
if (!this.level.isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||
- this.removeEntitiesOnShoulder();
|
||||
+ if (!this.level.paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) this.removeEntitiesOnShoulder(); // Paper - Hang on!
|
||||
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||
+ if (!this.level().paperConfig().entities.behavior.parrotsAreUnaffectedByPlayerMovement) // Paper - Hang on!
|
||||
this.removeEntitiesOnShoulder();
|
||||
}
|
||||
|
||||
}
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ded2e2df6bed222779a39e6f3cfd9170fdc0b494..a4b3d4c72295d46cbd5901c0f5c59cb897c05b0e 100644
|
||||
index 3d6c25424c859f63c8f4661b39c82c269c3837fb..12c36e02e271cc8e13b20059fbfb30f4e8172023 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2650,5 +2650,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2648,5 +2648,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
@ -19,7 +19,7 @@ Other changes:
|
||||
configuration
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index b0facb2b0b86fafbfd5776eba2e5bdb69cc1cbed..4a222d6769fe8dd33bcffa2e312e9bdf106e3eee 100644
|
||||
index bdd78d14723211bfec493126d603b99611cdf748..9fb608d9cfb0dcd8d937244ecbe97487757af479 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -8,7 +8,17 @@ plugins {
|
||||
@ -112,10 +112,10 @@ index 0000000000000000000000000000000000000000..685deaa0e5d1ddc13e3a7c0471b1cfcf
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index d9ceef3d9694ab85f807a732789b2871bb734e50..4e263a0ca438ffd1253cda577689a1b6d2d55992 100644
|
||||
index e292035cf361c8efa8845450b72a6986694a8ca9..9fad7c117033694bc5850b9f9585e439c44ef0dd 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -168,7 +168,7 @@ import com.mojang.datafixers.util.Pair;
|
||||
@@ -165,7 +165,7 @@ import com.mojang.datafixers.util.Pair;
|
||||
import com.mojang.serialization.DynamicOps;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import java.util.Random;
|
||||
@ -152,7 +152,7 @@ index d9ceef3d9694ab85f807a732789b2871bb734e50..4e263a0ca438ffd1253cda577689a1b6
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper
|
||||
}
|
||||
@@ -1137,7 +1141,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1146,7 +1150,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -161,7 +161,7 @@ index d9ceef3d9694ab85f807a732789b2871bb734e50..4e263a0ca438ffd1253cda577689a1b6
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1591,7 +1595,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1595,7 +1599,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -171,7 +171,7 @@ index d9ceef3d9694ab85f807a732789b2871bb734e50..4e263a0ca438ffd1253cda577689a1b6
|
||||
|
||||
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
|
||||
index 35904c69e14c4c0addda204d5e3788518c2e16c4..e6826cd0a596f063e8737dcde3c8c6c5b3f71970 100644
|
||||
index a9cf8960d487ee71385341285a4b1618007d06dc..95f39630c9b4d2a41d8469d0d53da92e5578c347 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -98,6 +98,9 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
||||
@ -222,7 +222,7 @@ index 35904c69e14c4c0addda204d5e3788518c2e16c4..e6826cd0a596f063e8737dcde3c8c6c5
|
||||
System.setOut(IoBuilder.forLogger(logger).setLevel(Level.INFO).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
|
||||
index a34c9da6dbd37ab01385b768c06fef418de9c7c8..ce2291fb34df531b783d34f8453128a7a01049e5 100644
|
||||
index d28f662d4a935994525118a403f3dc39cfa81a49..9089a25ce49e7e192f7e1c3de46ffe1f93c69bc5 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -169,8 +169,7 @@ public abstract class PlayerList {
|
||||
@ -236,7 +236,7 @@ index a34c9da6dbd37ab01385b768c06fef418de9c7c8..ce2291fb34df531b783d34f8453128a7
|
||||
|
||||
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
|
||||
index a4b3d4c72295d46cbd5901c0f5c59cb897c05b0e..544ab33166e6410339dbd0ef70b692dfe33cd4fe 100644
|
||||
index 12c36e02e271cc8e13b20059fbfb30f4e8172023..adc35bbaa95f852a7ff28eeaa974c30ad4d22baa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -42,7 +42,6 @@ import java.util.logging.Level;
|
||||
@ -262,7 +262,7 @@ index a4b3d4c72295d46cbd5901c0f5c59cb897c05b0e..544ab33166e6410339dbd0ef70b692df
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 4646911b65129d49b2398c7d86f2d6aa9213fe97..c5a403bc04fcb7a0fbc1dd1fe9ebf374e6a62af3 100644
|
||||
index b96652b7bcad07c39a81858c1a2c285efbf67905..cb1f050efb85e3b31dba2063fb3a316db1e0430d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
@ -6,7 +6,7 @@ Subject: [PATCH] provide a configurable option to disable creeper lingering
|
||||
|
||||
|
||||
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 6bde61ffd2b46755a5e90c116f0ee5ff30bc3d9b..baa30d4bdc8c31d04c84e4992062575709c4f2a4 100644
|
||||
index 6bd17e28b2f081aa84e4aca138eb56a4c00d57f6..b1e583ff4c1a9019be2f5d037bb04e7ebcbe9ae5 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Creeper.java
|
||||
@@ -285,7 +285,7 @@ public class Creeper extends Monster implements PowerableMob {
|
||||
@ -14,7 +14,7 @@ index 6bde61ffd2b46755a5e90c116f0ee5ff30bc3d9b..baa30d4bdc8c31d04c84e49920625757
|
||||
Collection<MobEffectInstance> collection = this.getActiveEffects();
|
||||
|
||||
- if (!collection.isEmpty()) {
|
||||
+ if (!collection.isEmpty() && !level.paperConfig().entities.behavior.disableCreeperLingeringEffect) { // Paper
|
||||
AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level, this.getX(), this.getY(), this.getZ());
|
||||
+ if (!collection.isEmpty() && !this.level().paperConfig().entities.behavior.disableCreeperLingeringEffect) { // Paper
|
||||
AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
|
||||
|
||||
entityareaeffectcloud.setOwner(this); // CraftBukkit
|
@ -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
|
||||
index eee466e718f52329f8200ff830f5f1e44cda3e7e..dad26405e90c7a784266a336ff1b0aa58b961261 100644
|
||||
index 2dc21048b968e7aa63b5b28cacdd1ae407c06958..fec33a79fc9681ef51899a92ebb43c27126bd7ac 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -665,6 +665,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@@ -668,6 +668,11 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
ItemEntity entityitem = (ItemEntity) iterator.next();
|
||||
|
||||
if (!entityitem.isRemoved() && !entityitem.getItem().isEmpty() && !entityitem.hasPickUpDelay() && this.wantsToPickUp(entityitem.getItem())) {
|
||||
@ -21,7 +21,7 @@ index eee466e718f52329f8200ff830f5f1e44cda3e7e..dad26405e90c7a784266a336ff1b0aa5
|
||||
}
|
||||
}
|
||||
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 9ffcccef6266e1a61cfae36cbc205b8178a732de..62288f9152a6fb2c272c7e84649af06b24032542 100644
|
||||
index dbe07ffbc6310828370be69081ac6d6f3085e4ac..1503d143429f0b73935004a7061d0409dcb24c2c 100644
|
||||
--- a/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 implements TraceableEntity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] PlayerPickupItemEvent#setFlyAtPlayer
|
||||
|
||||
|
||||
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 62288f9152a6fb2c272c7e84649af06b24032542..a6d2bacfa186a0b1c72d3761a134ce623fa6ccec 100644
|
||||
index 1503d143429f0b73935004a7061d0409dcb24c2c..8357ef35c374c6a6602eb96d4281da0210aea757 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -395,6 +395,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -399,6 +399,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// CraftBukkit start - fire PlayerPickupItemEvent
|
||||
int canHold = player.getInventory().canHold(itemstack);
|
||||
int remaining = i - canHold;
|
||||
@ -16,10 +16,10 @@ index 62288f9152a6fb2c272c7e84649af06b24032542..a6d2bacfa186a0b1c72d3761a134ce62
|
||||
|
||||
if (this.pickupDelay <= 0 && canHold > 0) {
|
||||
itemstack.setCount(canHold);
|
||||
@@ -402,8 +403,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -406,8 +407,14 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((org.bukkit.entity.Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
|
||||
playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
|
||||
this.level.getCraftServer().getPluginManager().callEvent(playerEvent);
|
||||
this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
|
||||
+ flyAtPlayer = playerEvent.getFlyAtPlayer(); // Paper
|
||||
if (playerEvent.isCancelled()) {
|
||||
itemstack.setCount(i); // SPIGOT-5294 - restore count
|
||||
@ -31,7 +31,7 @@ index 62288f9152a6fb2c272c7e84649af06b24032542..a6d2bacfa186a0b1c72d3761a134ce62
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -433,6 +440,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -437,6 +444,7 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
// CraftBukkit end
|
||||
|
||||
if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] PlayerAttemptPickupItemEvent
|
||||
|
||||
|
||||
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 a6d2bacfa186a0b1c72d3761a134ce623fa6ccec..298dff12c511e8b767d5a7ee14f94fe0745e5338 100644
|
||||
index 8357ef35c374c6a6602eb96d4281da0210aea757..04b4c7af20d6aa9924fb1d345f11cb51dcadc708 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java
|
||||
@@ -35,6 +35,7 @@ import net.minecraft.stats.Stats;
|
||||
@ -16,7 +16,7 @@ index a6d2bacfa186a0b1c72d3761a134ce623fa6ccec..298dff12c511e8b767d5a7ee14f94fe0
|
||||
|
||||
public class ItemEntity extends Entity implements TraceableEntity {
|
||||
|
||||
@@ -397,6 +398,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
@@ -401,6 +402,22 @@ public class ItemEntity extends Entity implements TraceableEntity {
|
||||
int remaining = i - canHold;
|
||||
boolean flyAtPlayer = false; // Paper
|
||||
|
@ -1,20 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Wed, 21 Dec 2016 03:48:29 -0500
|
||||
Subject: [PATCH] Optimize ItemStack.isEmpty()
|
||||
|
||||
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
|
||||
index 9b358c8e464c67c4953749cda6d2983db98e0c5f..a598b6522ce4d41575f04425d189319fa12a7b70 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -252,7 +252,7 @@ public final class ItemStack {
|
||||
}
|
||||
|
||||
public boolean isEmpty() {
|
||||
- return this == ItemStack.EMPTY ? true : (this.getItem() != null && !this.is(Items.AIR) ? this.count <= 0 : true);
|
||||
+ return this == ItemStack.EMPTY || this.item == null || this.item == Items.AIR || this.count <= 0; // Paper
|
||||
}
|
||||
|
||||
public boolean isItemEnabled(FeatureFlagSet enabledFeatures) {
|
Loading…
Reference in New Issue
Block a user