mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
More more work
This commit is contained in:
parent
197786ead0
commit
01f5831171
@ -5,10 +5,10 @@ Subject: [PATCH] Complete resource pack API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dae74cda3b9faa0c8aeecc6c7bc329950033f653..dac2665008b5ba49134c84373f916c5c6ed355e9 100644
|
||||
index 42a44820a3c13e2b0e29e02ed384c1918c9a0b17..94636c92758568051f829aed59aab8728e7e7252 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -1756,8 +1756,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1748,8 +1748,11 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName());
|
||||
this.disconnect(Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
|
||||
}
|
||||
@ -23,7 +23,7 @@ index dae74cda3b9faa0c8aeecc6c7bc329950033f653..dac2665008b5ba49134c84373f916c5c
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 470eac3191c09c7c7fe4b36165ed1c213bac421c..31785e1cee09977356ee2b65a7d41df2c959d1b2 100644
|
||||
index 2ab9fa95aecc9393a80b94a37915b4f22d83ce27..5fe88000bb29f5fd83ca8708b24a2c9ad2f5a562 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -178,6 +178,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@ -37,7 +37,7 @@ index 470eac3191c09c7c7fe4b36165ed1c213bac421c..31785e1cee09977356ee2b65a7d41df2
|
||||
|
||||
public CraftPlayer(CraftServer server, ServerPlayer entity) {
|
||||
super(server, entity);
|
||||
@@ -2361,6 +2365,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2292,6 +2296,45 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
public boolean getAffectsSpawning() {
|
||||
return this.getHandle().affectsSpawning;
|
||||
}
|
@ -16,7 +16,7 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
||||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 319caeca0737ab5b8f847a7e00784461839aad8c..ac33dc1b3ffe743276032fa5f73a92a2977b9c20 100644
|
||||
index f8bb3493faf56a2e214dab9efb1c8f05b0b53fbd..ead12a480569aaeccc6e27f70acdce8cd27a47e8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -457,6 +457,7 @@ public final class CraftServer implements Server {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ac33dc1b3ffe743276032fa5f73a92a2977b9c20..518306efc0e41a5bde0ad232cab8347969a5f364 100644
|
||||
index ead12a480569aaeccc6e27f70acdce8cd27a47e8..176746f19c07b059164f4b4b3bd2ec82ec79656b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2605,5 +2605,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2603,5 +2603,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
@ -7,7 +7,7 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 518306efc0e41a5bde0ad232cab8347969a5f364..cf9db3ed2c9caba0bd40d310aaf1cc10603926c4 100644
|
||||
index 176746f19c07b059164f4b4b3bd2ec82ec79656b..bc0bff6f06a74e2bb3f00fac2fdcc543bc970c2f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -962,8 +962,16 @@ public final class CraftServer implements Server {
|
@ -18,10 +18,10 @@ For consistency, the old API methods now forward to use the
|
||||
ItemMeta API equivalents, and should deprecate the old API's.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983db98e0c5f 100644
|
||||
index 70e663baefe90c06eca2033f07e7e85c6f27c97f..0db25566c47eb5b7e970dafea0ed186592fea38c 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -158,6 +158,23 @@ public final class ItemStack {
|
||||
@@ -156,6 +156,23 @@ public final class ItemStack {
|
||||
return this.getItem().getTooltipImage(this);
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d
|
||||
public ItemStack(ItemLike item) {
|
||||
this(item, 1);
|
||||
}
|
||||
@@ -209,6 +226,7 @@ public final class ItemStack {
|
||||
@@ -204,6 +221,7 @@ public final class ItemStack {
|
||||
// CraftBukkit start - make defensive copy as this data may be coming from the save thread
|
||||
this.tag = nbttagcompound.getCompound("tag").copy();
|
||||
// CraftBukkit end
|
||||
@ -53,7 +53,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d
|
||||
this.getItem().verifyTagAfterLoad(this.tag);
|
||||
}
|
||||
|
||||
@@ -807,6 +825,7 @@ public final class ItemStack {
|
||||
@@ -809,6 +827,7 @@ public final class ItemStack {
|
||||
|
||||
public void setTag(@Nullable CompoundTag nbt) {
|
||||
this.tag = nbt;
|
||||
@ -61,7 +61,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d
|
||||
if (this.getItem().canBeDepleted()) {
|
||||
this.setDamageValue(this.getDamageValue());
|
||||
}
|
||||
@@ -1104,6 +1123,7 @@ public final class ItemStack {
|
||||
@@ -1106,6 +1125,7 @@ public final class ItemStack {
|
||||
ListTag nbttaglist = this.tag.getList("Enchantments", 10);
|
||||
|
||||
nbttaglist.add(EnchantmentHelper.storeEnchantment(EnchantmentHelper.getEnchantmentId(enchantment), (byte) level));
|
||||
@ -70,7 +70,7 @@ index e19407edd4847e5a5175e113944d1331bd4d4ffc..9b358c8e464c67c4953749cda6d2983d
|
||||
|
||||
public boolean isEnchanted() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
index f4ca58b7e0f5e880f6c8ec71deac57aabf885c7c..a32369d2c15e24ec69cae90e228b8d48775f54e3 100644
|
||||
index ae55364f6c33687361c053d90ad47c6192a1e62b..bdfce4a49cc6fed46de5864d1c443038f44027fb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
|
||||
@@ -6,7 +6,6 @@ import java.util.Map;
|
@ -6,15 +6,15 @@ Subject: [PATCH] Configurable Non Player Arrow Despawn Rate
|
||||
Can set a much shorter despawn rate for arrows that players can not pick up.
|
||||
|
||||
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 1d5fea45453b2d17639e2c97a0cb18d4b02db339..aabb5ad09dd7b11a7dfbaa0849726541c0401951 100644
|
||||
index 37356efff435444b29d6d6682f365a329ebdd92e..7acd5d9fb7f7d3e067de779a9e3f0cedb587c68a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile {
|
||||
|
||||
protected void tickDespawn() {
|
||||
++this.life;
|
||||
- if (this.life >= ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)) { // Spigot
|
||||
+ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? level.paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? level.paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? level.spigotConfig.tridentDespawnRate : level.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init?
|
||||
- if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot
|
||||
+ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? this.level().paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? this.level().paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init?
|
||||
this.discard();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add World Util Methods
|
||||
Methods that can be used for other patches to help improve logic.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index a08c81030cf4974397205b200d27c559cdb75a12..9e593a50b36a13b45c6ab279a7f6656045ccdf35 100644
|
||||
index ef48e76ca18576e631d5d2f1652d3449d558a582..71be3d403dc0c345b447685fa339cb1c455dd2a8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -217,7 +217,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -221,7 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
|
||||
@ -19,10 +19,10 @@ index a08c81030cf4974397205b200d27c559cdb75a12..9e593a50b36a13b45c6ab279a7f66560
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index cff0be79e2dbb761ad2971bc3fcbd0d264505f1d..3b3da7340af0b97f900b5eb7fc2ba90f39c4c503 100644
|
||||
index 49ef7d349e0e4b1d45611ff0a225ba94c3db2600..47f2776db17089e4e889c0a126845e1d29f2d60f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -343,6 +343,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -342,6 +342,22 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
return chunk == null ? null : chunk.getFluidState(blockposition);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Custom replacement for eaten items
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 202eed643693363aa1c052f468d6bd15bb072ff8..92da7117f56c1a5087d589f241a8b9dbe55c9b67 100644
|
||||
index eb0280854b9c3bda9660a99ae7355f2874660d7a..571f170c7816d37ff1f082f00cab3725c660a10a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3599,10 +3599,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3649,10 +3649,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
this.triggerItemUseEffects(this.useItem, 16);
|
||||
// CraftBukkit start - fire PlayerItemConsumeEvent
|
||||
ItemStack itemstack;
|
||||
@ -18,32 +18,31 @@ index 202eed643693363aa1c052f468d6bd15bb072ff8..92da7117f56c1a5087d589f241a8b9db
|
||||
org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand);
|
||||
- PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand);
|
||||
+ event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand); // Paper
|
||||
level.getCraftServer().getPluginManager().callEvent(event);
|
||||
this.level().getCraftServer().getPluginManager().callEvent(event);
|
||||
|
||||
if (event.isCancelled()) {
|
||||
@@ -3616,6 +3617,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3666,6 +3667,12 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
} else {
|
||||
itemstack = this.useItem.finishUsingItem(this.level, this);
|
||||
itemstack = this.useItem.finishUsingItem(this.level(), this);
|
||||
}
|
||||
+
|
||||
+ // Paper start - save the default replacement item and change it if necessary
|
||||
+ final ItemStack defaultReplacement = itemstack;
|
||||
+ if (event != null && event.getReplacement() != null) {
|
||||
+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement());
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper start - save the default replacement item and change it if necessary
|
||||
+ final ItemStack defaultReplacement = itemstack;
|
||||
+ if (event != null && event.getReplacement() != null) {
|
||||
+ itemstack = CraftItemStack.asNMSCopy(event.getReplacement());
|
||||
+ }
|
||||
+ // Paper end
|
||||
// CraftBukkit end
|
||||
|
||||
if (itemstack != this.useItem) {
|
||||
@@ -3623,6 +3631,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3673,6 +3680,11 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
this.stopUsingItem();
|
||||
+ // Paper start - if the replacement is anything but the default, update the client inventory
|
||||
+ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
|
||||
+ ((ServerPlayer) this).getBukkitEntity().updateInventory();
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper start - if the replacement is anything but the default, update the client inventory
|
||||
+ if (this instanceof ServerPlayer && !com.google.common.base.Objects.equal(defaultReplacement, itemstack)) {
|
||||
+ ((ServerPlayer) this).getBukkitEntity().updateInventory();
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] handle NaN health/absorb values and repair bad data
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a53c61034 100644
|
||||
index 571f170c7816d37ff1f082f00cab3725c660a10a..7e3378861990034015a6796013b78d504dcb8b5e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -777,7 +777,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -795,7 +795,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
@Override
|
||||
public void readAdditionalSaveData(CompoundTag nbt) {
|
||||
@ -20,10 +20,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a
|
||||
+ }
|
||||
+ this.setAbsorptionAmount(absorptionAmount);
|
||||
+ // Paper end
|
||||
if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) {
|
||||
if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) {
|
||||
this.getAttributes().load(nbt.getList("Attributes", 10));
|
||||
}
|
||||
@@ -1264,6 +1270,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1313,6 +1319,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void setHealth(float health) {
|
||||
@ -34,7 +34,7 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a
|
||||
// CraftBukkit start - Handle scaled health
|
||||
if (this instanceof ServerPlayer) {
|
||||
org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
|
||||
@@ -3432,7 +3442,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3482,7 +3492,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void setAbsorptionAmount(float amount) {
|
||||
@ -44,10 +44,10 @@ index 9936fb67766dedba71b582316dd2bddd6567c342..2f161145789890fcd9bfd893b099f25a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 31785e1cee09977356ee2b65a7d41df2c959d1b2..16dc9546303d692c62b6a1538106019f6bbe149b 100644
|
||||
index 5fe88000bb29f5fd83ca8708b24a2c9ad2f5a562..55715c017e4e08a0e3db95dea5b8ec4fd4acf00d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2165,6 +2165,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2096,6 +2096,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
|
||||
public void setRealHealth(double health) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use a Shared Random for Entities
|
||||
Reduces memory usage and provides ensures more randomness, Especially since a lot of garbage entity objects get created.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f42937358 100644
|
||||
index bb8de860d826e4c92ffdbd7ef2675458d372bbdf..09cf1125221bdbebddabfc46095c3dbd153714c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -162,6 +162,79 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@ -89,7 +89,7 @@ index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f
|
||||
private CraftEntity bukkitEntity;
|
||||
|
||||
public CraftEntity getBukkitEntity() {
|
||||
@@ -402,7 +475,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -354,7 +427,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
this.bb = Entity.INITIAL_AABB;
|
||||
this.stuckSpeedMultiplier = Vec3.ZERO;
|
||||
this.nextStep = 1.0F;
|
||||
@ -99,7 +99,7 @@ index 606f3038f6c4a92cb0ae7debb97795abc70a8fb8..4d2491c04b587c8315173ccbcac9686f
|
||||
this.fluidHeight = new Object2DoubleArrayMap(2);
|
||||
this.fluidOnEyes = new HashSet();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Squid.java b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
index 24846bcbf0e3983a26ac1e8058a96c0e7ad28e40..72eea6e512060fc622ca79ca87437f19a64604cc 100644
|
||||
index 930df3e20f27e35054620018aaec08031e6d181a..b72006c4b2342ca9d9a81f54f89fa6d979c33c85 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Squid.java
|
||||
@@ -46,7 +46,7 @@ public class Squid extends WaterAnimal {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Configurable spawn chances for skeleton horses
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 9e593a50b36a13b45c6ab279a7f6656045ccdf35..faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef 100644
|
||||
index 71be3d403dc0c345b447685fa339cb1c455dd2a8..16e0887abe2643b13f7fefd986783e88d37fbdfb 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -696,7 +696,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -607,7 +607,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
DifficultyInstance difficultydamagescaler = this.getCurrentDifficultyAt(blockposition);
|
@ -29,10 +29,10 @@ index 1b29c6872ebe54351f28c1f1f38b22561ba785ee..40950db0c242c65dfd4de247c8624935
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 3b3da7340af0b97f900b5eb7fc2ba90f39c4c503..6d6145de1db2d57aa7f342e2467401231c3e38ae 100644
|
||||
index 47f2776db17089e4e889c0a126845e1d29f2d60f..22285078d79690c836eb34331d4d4c40f4b85932 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -285,7 +285,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -284,7 +284,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
}
|
||||
|
||||
public boolean isInWorldBounds(BlockPos pos) {
|
||||
@ -42,10 +42,10 @@ index 3b3da7340af0b97f900b5eb7fc2ba90f39c4c503..6d6145de1db2d57aa7f342e246740123
|
||||
|
||||
public static boolean isInSpawnableBounds(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
index 1b7496cec0ba5a95615a069e3168bd46308d0b40..508c2fff8d8e0c6f37b6c4e3b72ba772c2ab2ee5 100644
|
||||
index 2caac1a3d80e6c490aa16aa6bc1067065b665c69..525c89bc926f13af6f94fc46c897525e37477eca 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkAccess.java
|
||||
@@ -160,6 +160,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
@@ -166,6 +166,7 @@ public abstract class ChunkAccess implements BlockGetter, BiomeManager.NoiseBiom
|
||||
return GameEventListenerRegistry.NOOP;
|
||||
}
|
||||
|
||||
@ -54,7 +54,7 @@ index 1b7496cec0ba5a95615a069e3168bd46308d0b40..508c2fff8d8e0c6f37b6c4e3b72ba772
|
||||
public abstract BlockState setBlockState(BlockPos pos, BlockState state, boolean moved);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
index 2eb92dde607d7c8968cb07c6f3c24e1c45e9990f..908f71721daf4305692f424d7712cbfdddddae83 100644
|
||||
index f49cc61840c6588fca301b4c5c3aaeede03a323e..785fa679860413b736122f8e88a92e683cbdd99f 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/EmptyLevelChunk.java
|
||||
@@ -55,6 +55,12 @@ public class EmptyLevelChunk extends LevelChunk {
|
||||
@ -71,10 +71,10 @@ index 2eb92dde607d7c8968cb07c6f3c24e1c45e9990f..908f71721daf4305692f424d7712cbfd
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return Blocks.VOID_AIR.defaultBlockState();
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd6f5ed028 100644
|
||||
index 60e760b42dd6471a229dfd45490dcf8c51979d35..4a3ac7dedf5cb1e76f16ec4f18e82afc717d0ced 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ImposterProtoChunk.java
|
||||
@@ -89,6 +89,12 @@ public class ImposterProtoChunk extends ProtoChunk {
|
||||
@@ -91,6 +91,12 @@ public class ImposterProtoChunk extends ProtoChunk {
|
||||
public BlockState getBlockState(BlockPos pos) {
|
||||
return this.wrapped.getBlockState(pos);
|
||||
}
|
||||
@ -88,10 +88,10 @@ index 8033c8741a0f73919a357893652592b317bfb417..9a1cffd51aaf97f759a9057aefbf50bd
|
||||
@Override
|
||||
public FluidState getFluidState(BlockPos pos) {
|
||||
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 03f7394057c927f55fa962a65988d03553c6a642..a37377f1b8eba0a86cdeb31026c5e7fe790b898a 100644
|
||||
index 7edb17360bc0611c6a1412b868ed128c9dbcfb4f..24ded8c0900792e3f037972ae70857121ed3dde1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -335,12 +335,29 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -295,12 +295,29 @@ public class LevelChunk extends ChunkAccess {
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,23 +125,23 @@ index 03f7394057c927f55fa962a65988d03553c6a642..a37377f1b8eba0a86cdeb31026c5e7fe
|
||||
BlockState iblockdata = null;
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
index bc707432af738ad39de9f8df253913db941a4850..becc4c101e40d9b11e5e89a69e25dc0160bfaa32 100644
|
||||
index d59392c322936ce89b759ac9787c8f4f0b228af6..2c3ea88bac229df67bd742e16d2106d80bcc8889 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -21,7 +21,7 @@ public class LevelChunkSection {
|
||||
@@ -19,7 +19,7 @@ public class LevelChunkSection {
|
||||
public static final int SECTION_HEIGHT = 16;
|
||||
public static final int SECTION_SIZE = 4096;
|
||||
public static final int BIOME_CONTAINER_BITS = 2;
|
||||
private final int bottomBlockY;
|
||||
- private short nonEmptyBlockCount;
|
||||
+ short nonEmptyBlockCount; // Paper - package-private
|
||||
private short tickingBlockCount;
|
||||
private short tickingFluidCount;
|
||||
public final PalettedContainer<BlockState> states;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
index 0b67858f8d6689b34816f9556f3424af512a7401..c24b4c6a560aab2df07783b3481981deb8571a50 100644
|
||||
index b2c0c7fd06fcd720b4c0875f08a90b6b672c96b2..6c72eb36020bc05104b21e52cea89de09b85f2d7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ProtoChunk.java
|
||||
@@ -94,14 +94,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
@@ -92,14 +92,18 @@ public class ProtoChunk extends ChunkAccess {
|
||||
|
||||
@Override
|
||||
public BlockState getBlockState(BlockPos pos) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
||||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1554f8847e42cdd584b16c0648c21c4071aea6de..f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5 100644
|
||||
index d5ad3368a397e9fc02506187ccb1c386afd9ce2b..7fca70658ecdc89b79381ca2ab33b931ce6871ae 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1369,6 +1369,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1373,6 +1373,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@ -18,10 +18,10 @@ index 1554f8847e42cdd584b16c0648c21c4071aea6de..f48d3bbbfd5b4ebb9c22c6dc2a17a903
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef..0f7c0bf3e773485737aa4a116a712fc7b8ed221e 100644
|
||||
index 16e0887abe2643b13f7fefd986783e88d37fbdfb..5c2ca51139b0647a2c7ae1b268b6d151dc884eca 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -216,6 +216,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -220,6 +220,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// CraftBukkit start
|
||||
public final LevelStorageSource.LevelStorageAccess convertable;
|
||||
public final UUID uuid;
|
||||
@ -30,10 +30,10 @@ index faf2d6aaf6fba1c7a47ebd2cbc95783afaf5c8ef..0f7c0bf3e773485737aa4a116a712fc7
|
||||
@Override public LevelChunk getChunkIfLoaded(int x, int z) { // Paper - this was added in world too but keeping here for NMS ABI
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 6d6145de1db2d57aa7f342e2467401231c3e38ae..ebad2e1bac84bade6dd2b893de832b77705a6f57 100644
|
||||
index 22285078d79690c836eb34331d4d4c40f4b85932..dc84da6d6036802792cf9a31bb219cc24bb9e57b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -503,7 +503,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -491,7 +491,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// CraftBukkit start
|
||||
iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
|
||||
CraftWorld world = ((ServerLevel) this).getWorld();
|
@ -5,10 +5,10 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 0f7c0bf3e773485737aa4a116a712fc7b8ed221e..70d695b20bdb214129e67dd1e869ae0736f1cfeb 100644
|
||||
index 5c2ca51139b0647a2c7ae1b268b6d151dc884eca..79b572c8e3481ea4a6ac523c0a2f25204cf44e2d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2224,6 +2224,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2126,6 +2126,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end
|
||||
@ -16,7 +16,7 @@ index 0f7c0bf3e773485737aa4a116a712fc7b8ed221e..70d695b20bdb214129e67dd1e869ae07
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
@@ -2299,6 +2300,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2201,6 +2202,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
@ -11,10 +11,10 @@ For people who want all chunks to be treated equally, you can chose a fixed valu
|
||||
This allows to fine-tune vanilla gameplay.
|
||||
|
||||
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 a37377f1b8eba0a86cdeb31026c5e7fe790b898a..f5dcd970fc2828a4ba9ff2c0d495aa8d8cd4ed74 100644
|
||||
index 24ded8c0900792e3f037972ae70857121ed3dde1..69fbe3c3815dd59af667b57b34e1247c61498c48 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -320,6 +320,13 @@ public class LevelChunk extends ChunkAccess {
|
||||
@@ -280,6 +280,13 @@ public class LevelChunk extends ChunkAccess {
|
||||
return new ChunkAccess.TicksToSave(this.blockTicks, this.fluidTicks);
|
||||
}
|
||||
|
@ -19,7 +19,7 @@ index a8f69e48937b3ebd2f57a4da747e6762c4a77934..acd0b946cab86eb173e713535194d3a9
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb378891b5c0 100644
|
||||
index 518f47f52105e299e037fe2e7d5870d7555be4bc..71934af2dc4d209a9fbccfd36b5f2815ec196892 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/navigation/GroundPathNavigation.java
|
||||
@@ -39,14 +39,14 @@ public class GroundPathNavigation extends PathNavigation {
|
||||
@ -42,12 +42,12 @@ index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb37
|
||||
@@ -57,19 +57,19 @@ public class GroundPathNavigation extends PathNavigation {
|
||||
}
|
||||
|
||||
if (!this.level.getBlockState(target).getMaterial().isSolid()) {
|
||||
if (!this.level.getBlockState(target).isSolid()) {
|
||||
- return super.createPath(target, distance);
|
||||
+ return super.createPath(target, entity, distance); // Paper
|
||||
} else {
|
||||
BlockPos blockPos2;
|
||||
for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).getMaterial().isSolid(); blockPos2 = blockPos2.above()) {
|
||||
for(blockPos2 = target.above(); blockPos2.getY() < this.level.getMaxBuildHeight() && this.level.getBlockState(blockPos2).isSolid(); blockPos2 = blockPos2.above()) {
|
||||
}
|
||||
|
||||
- return super.createPath(blockPos2, distance);
|
||||
@ -63,7 +63,7 @@ index eabdcef883b6284c68a2bad15461a0c4e7106cbd..4f07e406288cc005e632d60c4586eb37
|
||||
|
||||
private int getSurfaceY() {
|
||||
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 a9bd5bbffaa1f281a799bf132f58cfb725c21c9c..64b64fb0b72eccade63fac99b7b363aafe59169b 100644
|
||||
index f16e9bcefedb582a4bfe7a0b7ec8a97799f5e5ad..de87f2e7b8a1662767bab4b0c86ee7cf014ed5cf 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
|
||||
@@ -110,7 +110,13 @@ public abstract class PathNavigation {
|
@ -11,11 +11,11 @@ The implementation uses a LinkedHashMap as an LRU cache (modified from HashMap).
|
||||
The maximum size of the RegionFileCache is also made configurable.
|
||||
|
||||
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 64e957650dafc9fc30fa997e7f7d3fd47cf60089..1a1ade7538263f4c1a91eb122086a150af3d86ba 100644
|
||||
index b9b50c56e79297bb824a92355f437a5d4d7e6760..e4c706d553a3d7058a32409ec7af8771c92d9777 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -57,7 +57,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
// Paper end
|
||||
@@ -36,7 +36,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
if (regionfile != null) {
|
||||
return regionfile;
|
||||
} else {
|
||||
- if (this.regionCache.size() >= 256) {
|
@ -5,10 +5,10 @@ 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
|
||||
index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804ac1620ab3 100644
|
||||
index b7995e6159c865f8e2e7865f7eb51936a9720311..10503d6d8b6daf645cf4360ee289d5e25144c976 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
@@ -457,7 +457,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -459,7 +459,12 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
for(int n = -1; n <= 1; ++n) {
|
||||
if (l != 0 || n != 0) {
|
||||
pos.set(i + l, j + m, k + n);
|
||||
@ -22,15 +22,15 @@ index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804a
|
||||
if (blockState.is(Blocks.CACTUS) || blockState.is(Blocks.SWEET_BERRY_BUSH)) {
|
||||
return BlockPathTypes.DANGER_OTHER;
|
||||
}
|
||||
@@ -469,6 +474,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
if (world.getFluidState(pos).is(FluidTags.WATER)) {
|
||||
return BlockPathTypes.WATER_BORDER;
|
||||
@@ -475,6 +480,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
if (blockState.is(Blocks.WITHER_ROSE) || blockState.is(Blocks.POINTED_DRIPSTONE)) {
|
||||
return BlockPathTypes.DAMAGE_CAUTIOUS;
|
||||
}
|
||||
+ } // Paper
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -478,7 +484,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
@@ -484,7 +490,8 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
||||
}
|
||||
|
||||
protected static BlockPathTypes getBlockPathTypeRaw(BlockGetter world, BlockPos pos) {
|
||||
@ -38,5 +38,5 @@ index 4aa04a2805c6b8e124112467e0ece3ac4cf80324..67ac0b3cec3b1a9bd6de7be50244804a
|
||||
+ BlockState blockState = world.getBlockStateIfLoaded(pos); // Paper
|
||||
+ if (blockState == null) return BlockPathTypes.BLOCKED; // Paper
|
||||
Block block = blockState.getBlock();
|
||||
Material material = blockState.getMaterial();
|
||||
if (blockState.isAir()) {
|
||||
return BlockPathTypes.OPEN;
|
@ -22,10 +22,10 @@ index a5d57cc862036012d83b090bb1b3ccf4115a88b3..21068f766b75c414d5818073b7dca083
|
||||
static final ServerboundInteractPacket.Action ATTACK_ACTION = new ServerboundInteractPacket.Action() {
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index dac2665008b5ba49134c84373f916c5c6ed355e9..8e602afa03f067ed1b62f3c855fa302c3fb3eeeb 100644
|
||||
index 94636c92758568051f829aed59aab8728e7e7252..c65282a85e2822b86f56c528ab838e628ea27411 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2542,8 +2542,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2534,8 +2534,37 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
});
|
||||
}
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable Grass Spread Tick Rate
|
||||
|
||||
|
||||
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 bd5a45765b53bf4f2f9aaea4769c71ffb008741d..61783f17b655cbb6430d22fb3a81931ab3ea130c 100644
|
||||
index 1df22561b2d39066b6b30f10ea43edd734e3b50a..1fe07f8f9b28faf076209f7ad235fd5dc948b294 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
|
||||
@@ -2,6 +2,7 @@ package net.minecraft.world.level.block;
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Cancelling BlockPlaceEvent triggering physics
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 70d695b20bdb214129e67dd1e869ae0736f1cfeb..c4bf60739b0f73729f331f2bb82d9d08f346f19c 100644
|
||||
index 79b572c8e3481ea4a6ac523c0a2f25204cf44e2d..6896ead71f87989c2fa90d0339eedfd08ac49dd1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1457,6 +1457,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -1366,6 +1366,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
@Override
|
||||
public void updateNeighborsAt(BlockPos pos, Block sourceBlock) {
|
@ -11,7 +11,7 @@ After: http://i.imgur.com/nJ46crB.png
|
||||
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/SimpleBitStorage.java b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
index c8ae9d25eedb7cb2d9f95b799a507727b655f11f..9b81ce9d85cba07e9752c29fb5a842c4b00aa873 100644
|
||||
index f677cc252d5510a2365e73dc42bd266e56115e83..2b3fd62dca2d1475075b5dcde56cea85b749cb44 100644
|
||||
--- a/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/SimpleBitStorage.java
|
||||
@@ -11,8 +11,8 @@ public class SimpleBitStorage implements BitStorage {
|
||||
@ -83,7 +83,7 @@ index c8ae9d25eedb7cb2d9f95b799a507727b655f11f..9b81ce9d85cba07e9752c29fb5a842c4
|
||||
long l = this.data[i];
|
||||
int j = (index - i * this.valuesPerLong) * this.bits;
|
||||
diff --git a/src/main/java/net/minecraft/util/ZeroBitStorage.java b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
index 172e7a0761724cc802387e613258830a0defb04a..9686ce7536c9924b1b2aced4f013f46759cbc72e 100644
|
||||
index 0710c72441c832a93275f3f9bd9dd7643dc0f229..f0f764f36fb92c64ab2dc8a0a50c3f48321c3c9a 100644
|
||||
--- a/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
+++ b/src/main/java/net/minecraft/util/ZeroBitStorage.java
|
||||
@@ -13,21 +13,21 @@ public class ZeroBitStorage implements BitStorage {
|
@ -18,7 +18,7 @@ index 1294b38262505b0d54089e428df9b363219de1f0..ee37ec0de1ca969144824427ae42b0c8
|
||||
buf.writeComponent(this.playerPrefix);
|
||||
buf.writeComponent(this.playerSuffix);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5..2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023 100644
|
||||
index 7fca70658ecdc89b79381ca2ab33b931ce6871ae..feee1da3091fdbcef0336ab0ab85fd9f52ccac4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -589,6 +589,20 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -43,7 +43,7 @@ index f48d3bbbfd5b4ebb9c22c6dc2a17a9030af2edf5..2ea0cb1f9bfc5ef7bd8c78cf259da13b
|
||||
this.server.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.STARTUP));
|
||||
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
|
||||
index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d358f967c 100644
|
||||
index 233056040541993dd2c13602970c3438ee2eeba6..1fa3e06326a871d2d9562433c31e3b17a80fd08c 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -99,6 +99,7 @@ import net.minecraft.world.level.storage.PlayerDataStorage;
|
||||
@ -62,7 +62,7 @@ index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d
|
||||
|
||||
public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
|
||||
this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
|
||||
@@ -409,6 +411,13 @@ public abstract class PlayerList {
|
||||
@@ -416,6 +418,13 @@ public abstract class PlayerList {
|
||||
|
||||
player.initInventoryMenu();
|
||||
// CraftBukkit - Moved from above, added world
|
||||
@ -76,7 +76,7 @@ index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d
|
||||
PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
|
||||
}
|
||||
|
||||
@@ -528,6 +537,16 @@ public abstract class PlayerList {
|
||||
@@ -535,6 +544,16 @@ public abstract class PlayerList {
|
||||
entityplayer.doTick(); // SPIGOT-924
|
||||
// CraftBukkit end
|
||||
|
||||
@ -93,7 +93,7 @@ index 57281d4a3c6b187d13ba5cadd46f494df411e7ba..1cd7a99a6280975dac96a33b077b372d
|
||||
this.save(entityplayer);
|
||||
if (entityplayer.isPassenger()) {
|
||||
Entity entity = entityplayer.getRootVehicle();
|
||||
@@ -1159,6 +1178,13 @@ public abstract class PlayerList {
|
||||
@@ -1166,6 +1185,13 @@ public abstract class PlayerList {
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add handshake event to allow plugins to handle client
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
index 994db7a175fdbd4688d9392d6b343348d1ada04e..2be1bd39ee1341128f02e38afe5698b837735827 100644
|
||||
index 3d08ad662b02812a2b194f95fba55798b9976955..77d7f070cce1a47e41b5d4f5a1cc8c778352a126 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
|
||||
@@ -89,9 +89,36 @@ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketL
|
@ -6,10 +6,10 @@ Subject: [PATCH] EntityRegainHealthEvent isFastRegen API
|
||||
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
|
||||
index b14723d093f8a7aa44750b6d0e7eb9db9e2ac34b..d0d38e39010ba3398a0b8960bc674c39d9a9ff51 100644
|
||||
index 7e3378861990034015a6796013b78d504dcb8b5e..ad9f1b9b7adc799af751bfbd0ee6fe6d27a58851 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -1243,10 +1243,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -1292,10 +1292,16 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
}
|
||||
|
||||
public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
|
||||
@ -26,9 +26,9 @@ index b14723d093f8a7aa44750b6d0e7eb9db9e2ac34b..d0d38e39010ba3398a0b8960bc674c39
|
||||
+ EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason, isFastRegen); // Paper
|
||||
// Suppress during worldgen
|
||||
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
|
||||
index 5fb5258a03d34c161110f3098bc06107a9714965..4a2dcf9bd83dd3fdff43483f887f4f58dc4715cd 100644
|
||||
index 5ff0eba33f848de5172944274e14062090ab7407..2038df72f8d7d33d4105de8129628daf21de6f0f 100644
|
||||
--- a/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
+++ b/src/main/java/net/minecraft/world/food/FoodData.java
|
||||
@@ -83,7 +83,7 @@ public class FoodData {
|
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
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
|
||||
index 2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023..e2744847c5decc65be2f8d268457ba80633b8e29 100644
|
||||
index feee1da3091fdbcef0336ab0ab85fd9f52ccac4b..ac0a6cfb6fb7d9fa696b1e35ebdfb37935b74048 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -193,6 +193,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -25,7 +25,7 @@ index 2ea0cb1f9bfc5ef7bd8c78cf259da13b11fe4023..e2744847c5decc65be2f8d268457ba80
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2334,9 +2336,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2332,9 +2334,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return false;
|
||||
}
|
||||
|
@ -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.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index c4bf60739b0f73729f331f2bb82d9d08f346f19c..343e6da38413ab8dad876884241ad31172466659 100644
|
||||
index 6896ead71f87989c2fa90d0339eedfd08ac49dd1..99a7fadf87b0b081a1f5ab15a8eeb1b0cb8572fe 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2245,6 +2245,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@@ -2147,6 +2147,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
{
|
||||
if ( iter.next().player == entity )
|
||||
{
|
||||
@ -25,10 +25,10 @@ index c4bf60739b0f73729f331f2bb82d9d08f346f19c..343e6da38413ab8dad876884241ad311
|
||||
}
|
||||
}
|
||||
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 b36a601ac792f2b1a51f0ae72ae12d992ac38d61..aafc1b05b86d9b715cfe5ddbf4abd76a4ad772c3 100644
|
||||
index c20753645585143421eb544a03884f0765eafb8b..5ef9abc0903fc06468c35f5a8cc450a8f6c03165 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -762,6 +762,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -763,6 +763,14 @@ public abstract class Player extends LivingEntity {
|
||||
return null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -44,7 +44,7 @@ index b36a601ac792f2b1a51f0ae72ae12d992ac38d61..aafc1b05b86d9b715cfe5ddbf4abd76a
|
||||
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
|
||||
index fe14c0d03a0bbd5cbf0608ea88d499984b54d2ed..2c5fb4eb5790f4dff0d03390ceae3afc32134006 100644
|
||||
index 60596c4ac2ebb8caf19d65591624275ba63b0199..d6ed799716f13cb3f72e66f9d57c6ec90c1eb272 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
|
||||
@@ -63,6 +63,7 @@ public class MapItemSavedData extends SavedData {
|
Loading…
Reference in New Issue
Block a user