mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
more more more more more more more work
can't let lynx inflate his commit count too much
This commit is contained in:
parent
2617c927a0
commit
772fb3e385
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable feature seeds
|
||||
Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
index 1080e1f67afe5574baca0df50cdb1d029a7a586a..a2f71a6d1a9e98133dff6cd0f625da9435a8af14 100644
|
||||
index 38f01952153348d937e326da0ec102cd9b0f80af..2d4090b95193de431f56eaafd4d4561ecccdf99c 100644
|
||||
--- a/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -288,7 +288,7 @@ public class TimingsExport extends Thread {
|
||||
@@ -284,7 +284,7 @@ public class TimingsExport extends Thread {
|
||||
JSONObject object = new JSONObject();
|
||||
for (String key : config.getKeys(false)) {
|
||||
String fullKey = (parentKey != null ? parentKey + "." + key : key);
|
||||
@ -19,7 +19,7 @@ index 1080e1f67afe5574baca0df50cdb1d029a7a586a..a2f71a6d1a9e98133dff6cd0f625da94
|
||||
}
|
||||
final Object val = config.get(key);
|
||||
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 3c7920721914588a3e7eaf1faff46f7305823416..eee2239cd715d01c5adbf1cd79282e115f42cd2e 100644
|
||||
index 511d0afbd7f3593c8a41e64ef716eaa6f32f3bf8..a94ddf0d9a72ce9507a146fa935197b5685a7dd1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/ChunkGenerator.java
|
||||
@@ -431,7 +431,14 @@ public abstract class ChunkGenerator {
|
@ -57,7 +57,7 @@ index 0000000000000000000000000000000000000000..6bd0afddbcc461149dfe9a5c7a86fff6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 7d917aa8376fed8004f30e92bf88face17165a92..c9a6847b4eb29b8d0ed68741b5e6055de02d1e83 100644
|
||||
index 34728cebe2de88e0a935707ea9969e068c0f6d7e..17d47e201da2bcbe55807f17dcc5e938e9944aea 100644
|
||||
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -179,6 +179,16 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
|
@ -5,10 +5,10 @@ Subject: [PATCH] don't attempt to teleport dead entities
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 61a3f7984e798191c74e85a514ca1ecde70e03ba..f1d9b75eae4d42c02974c8bface6d73cb1e58182 100644
|
||||
index 2487452f4ac5665208691eaeb68b91f116a2d231..658fd3abef087c873ebc2833a38a111660311576 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -787,7 +787,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -703,7 +703,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
// CraftBukkit start
|
||||
public void postTick() {
|
||||
// No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
|
@ -5,10 +5,10 @@ Subject: [PATCH] Prevent excessive velocity through repeated crits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 4e368756efce3cb31bd88a2145a97b00366fa977..b9c3e19feb29a4a67fe78cd5d5b0cca7b570d2de 100644
|
||||
index 8ccdbfc7908f2b20f94e614009a2063e0a131d7b..bc3f781be18f4a039aa58217cf4d560ab42b2d26 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -2648,13 +2648,26 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -2683,13 +2683,26 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
return this.hasEffect(MobEffects.JUMP) ? 0.1F * ((float) this.getEffect(MobEffects.JUMP).getAmplifier() + 1.0F) : 0.0F;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Remove client-side code using deprecated for removal
|
||||
Fixes warnings on build
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
|
||||
index fcade0a121f155dbf4f5f8af66240923d8da460d..c60c73d9f998260f3abe6fe445255c6e7c38b0c3 100644
|
||||
index a17e61f6f59eae179b76179985a9bd7a32a7e40a..5c1503f5b173138fc9e918d5562a981ca8b66d06 100644
|
||||
--- a/src/main/java/net/minecraft/Util.java
|
||||
+++ b/src/main/java/net/minecraft/Util.java
|
||||
@@ -909,17 +909,7 @@ public class Util {
|
||||
@@ -910,17 +910,7 @@ public class Util {
|
||||
}
|
||||
|
||||
public void openUrl(URL url) {
|
@ -7,18 +7,18 @@ Subject: [PATCH] Fix removing recipes from RecipeIterator
|
||||
public net.minecraft.world.item.crafting.RecipeManager byName
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
index f12a93544313065fc9dc2a87063688aef79d3d96..548c3b288f2b3b711e1a75f1fc0d1e9713f47bcf 100644
|
||||
index 65b12eaab871019def074bf17257772ff7f09806..692d9abd715988c96934888b492b93efa64ecce4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
@@ -12,6 +12,7 @@ import org.bukkit.inventory.Recipe;
|
||||
@@ -13,6 +13,7 @@ import org.bukkit.inventory.Recipe;
|
||||
public class RecipeIterator implements Iterator<Recipe> {
|
||||
private final Iterator<Map.Entry<RecipeType<?>, Object2ObjectLinkedOpenHashMap<ResourceLocation, net.minecraft.world.item.crafting.Recipe<?>>>> recipes;
|
||||
private Iterator<net.minecraft.world.item.crafting.Recipe<?>> current;
|
||||
private final Iterator<Map.Entry<RecipeType<?>, Object2ObjectLinkedOpenHashMap<ResourceLocation, RecipeHolder<?>>>> recipes;
|
||||
private Iterator<RecipeHolder<?>> current;
|
||||
+ private Recipe currentRecipe; // Paper - fix removing recipes
|
||||
|
||||
public RecipeIterator() {
|
||||
this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.entrySet().iterator();
|
||||
@@ -35,15 +36,27 @@ public class RecipeIterator implements Iterator<Recipe> {
|
||||
@@ -36,15 +37,27 @@ public class RecipeIterator implements Iterator<Recipe> {
|
||||
public Recipe next() {
|
||||
if (this.current == null || !this.current.hasNext()) {
|
||||
this.current = this.recipes.next().getValue().values().iterator();
|
@ -18,10 +18,10 @@ index 97da8896865ff0bdd4fe8f2155b0830b42051bb1..9ca897d92c5bdd2764d114c74d64c776
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index e7c0d214abbad1f300049f790ae54e7ea488e150..24f0d61a2fa9ac95dd26443a978209b53baf10b1 100644
|
||||
index fbcb6843492c25a03bdc2efb4efb529f9fecc221..dcf412aa557cdc7464893264b86b916e0ffbb0b8 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -338,7 +338,10 @@ public class ServerEntity {
|
||||
@@ -335,7 +335,10 @@ public class ServerEntity {
|
||||
ItemStack itemstack = ((LivingEntity) this.entity).getItemBySlot(enumitemslot);
|
||||
|
||||
if (!itemstack.isEmpty()) {
|
||||
@ -34,10 +34,10 @@ index e7c0d214abbad1f300049f790ae54e7ea488e150..24f0d61a2fa9ac95dd26443a978209b5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index b9c3e19feb29a4a67fe78cd5d5b0cca7b570d2de..de69507b71c79172f0581aa58a7ac7e9a002444f 100644
|
||||
index bc3f781be18f4a039aa58217cf4d560ab42b2d26..52c8812c6670dbec377d0dfb985b190bf6e87da9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3157,7 +3157,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3194,7 +3194,10 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
equipmentChanges.forEach((enumitemslot, itemstack) -> {
|
||||
ItemStack itemstack1 = itemstack.copy();
|
||||
|
||||
@ -49,7 +49,7 @@ index b9c3e19feb29a4a67fe78cd5d5b0cca7b570d2de..de69507b71c79172f0581aa58a7ac7e9
|
||||
switch (enumitemslot.getType()) {
|
||||
case HAND:
|
||||
this.setLastHandItem(enumitemslot, itemstack1);
|
||||
@@ -3170,6 +3173,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3207,6 +3210,34 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
((ServerLevel) this.level()).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list));
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Hide unnecessary itemmeta from clients
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerEntity.java b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
index 24f0d61a2fa9ac95dd26443a978209b53baf10b1..31fa0f4fbf195d0db7a89a060b1cc4fd30dc5ab0 100644
|
||||
index dcf412aa557cdc7464893264b86b916e0ffbb0b8..1f71e11ec2bd617595de788f42562a436e61c156 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerEntity.java
|
||||
@@ -340,7 +340,7 @@ public class ServerEntity {
|
||||
@@ -337,7 +337,7 @@ public class ServerEntity {
|
||||
if (!itemstack.isEmpty()) {
|
||||
// Paper start - prevent oversized data
|
||||
final ItemStack sanitized = LivingEntity.sanitizeItemStack(itemstack.copy(), false);
|
||||
@ -18,25 +18,25 @@ index 24f0d61a2fa9ac95dd26443a978209b53baf10b1..31fa0f4fbf195d0db7a89a060b1cc4fd
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 31c8b483006febd23363f7bcc2c09bde37b84847..81750c1551a69d1c77ab8c34437e5d839b7e2941 100644
|
||||
index 67f2de8c2ad186fb6fa6cf68a87964f687605c64..3dcffcf52a5342b515a26a426820491ebde15d33 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2693,8 +2693,8 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -2543,8 +2543,8 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
// Refresh the current entity metadata
|
||||
entity.getEntityData().refresh(player);
|
||||
// SPIGOT-7136 - Allays
|
||||
- if (entity instanceof Allay) {
|
||||
- ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
|
||||
- send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
|
||||
+ if (entity instanceof Allay allay) { // Paper
|
||||
+ ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta
|
||||
+ send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, allay.stripMeta(allay.getItemBySlot(slot), true))).collect(Collectors.toList()))); // Paper - remove unnecessary item meta
|
||||
player.containerMenu.sendAllDataToRemote();
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index de69507b71c79172f0581aa58a7ac7e9a002444f..a35e59544786776391ba135f247ac1a28be3d754 100644
|
||||
index 52c8812c6670dbec377d0dfb985b190bf6e87da9..2a23448e756199b631355cd10b567ea1d54caa37 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3159,7 +3159,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3196,7 +3196,7 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
|
||||
// Paper start - prevent oversized data
|
||||
ItemStack toSend = sanitizeItemStack(itemstack1, true);
|
||||
@ -45,7 +45,7 @@ index de69507b71c79172f0581aa58a7ac7e9a002444f..a35e59544786776391ba135f247ac1a2
|
||||
// Paper end
|
||||
switch (enumitemslot.getType()) {
|
||||
case HAND:
|
||||
@@ -3173,6 +3173,70 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -3210,6 +3210,70 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
((ServerLevel) this.level()).getChunkSource().broadcast(this, new ClientboundSetEquipmentPacket(this.getId(), list));
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ Co-authored-by: Noah van der Aa <ndvdaa@gmail.com>
|
||||
Co-authored-by: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
|
||||
index 55f2fa02a36f0500b47f9ce377926719557106e5..18b5bce1138d50be32e5da013221be69dc47e21f 100644
|
||||
index e628b4d6683eb0bc4f83c12480ab750ecbc1599b..ead7b37122c76d43af2cdd17af7f0da8014efb26 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CaveVinesBlock.java
|
||||
@@ -47,9 +47,17 @@ public class CaveVinesBlock extends GrowingPlantHeadBlock implements Bonemealabl
|
||||
@ -36,7 +36,7 @@ index 55f2fa02a36f0500b47f9ce377926719557106e5..18b5bce1138d50be32e5da013221be69
|
||||
public ItemStack getCloneItemStack(BlockGetter world, BlockPos pos, BlockState state) {
|
||||
return new ItemStack(Items.GLOW_BERRIES);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CropBlock.java b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
index 08d442713bf0cc4f01f693c9a2fbd1a17a6fa348..decb8caa67bc5f4525e4d92fedf465a17171fceb 100644
|
||||
index c5608f72a8f2ad2640f32fa63c69a6ef69d746da..6365ddea0c23bc5d4009d98915f2b39aed2a0328 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CropBlock.java
|
||||
@@ -84,6 +84,10 @@ public class CropBlock extends BushBlock implements BonemealableBlock {
|
||||
@ -51,7 +51,7 @@ index 08d442713bf0cc4f01f693c9a2fbd1a17a6fa348..decb8caa67bc5f4525e4d92fedf465a1
|
||||
modifier = world.spigotConfig.wheatModifier;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
index 53b91cf8092b46dbf45afea9ccf439d565d1914a..3a1aa4e2405090ccebefb7f5944f36462929e221 100644
|
||||
index d123f476ce2573bf3b5ee964cf515e9b07c60cec..b325fdec8eb99ce57152a5c0fefa5059685276e4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
|
||||
@@ -56,12 +56,18 @@ public abstract class GrowingPlantHeadBlock extends GrowingPlantBlock implements
|
||||
@ -75,7 +75,7 @@ index 53b91cf8092b46dbf45afea9ccf439d565d1914a..3a1aa4e2405090ccebefb7f5944f3646
|
||||
return (BlockState) state.cycle(GrowingPlantHeadBlock.AGE);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
|
||||
index 5d78348fc18b22ccb7ad109890f867e20efec047..44c78f0d56c3459c063c104e401a521e3df7d8e5 100644
|
||||
index 2aab37b35214432b472414a81c314e3b5e7f1201..cf240750aecc57d287efc986b471e66a860850ee 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/MangrovePropaguleBlock.java
|
||||
@@ -89,7 +89,7 @@ public class MangrovePropaguleBlock extends SaplingBlock implements SimpleWaterl
|
||||
@ -88,10 +88,10 @@ index 5d78348fc18b22ccb7ad109890f867e20efec047..44c78f0d56c3459c063c104e401a521e
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
|
||||
index 593eae04ecf6dee86c9c3664ddcdc3f86d042e66..849c0ae6ca30691134f51e5d4d5da372e0e728bd 100644
|
||||
index 20fdd6cc35bec8f707a83fb682257f68163ed6fc..aca205d641b4a87d093b140585cf04fa4fefca86 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/PitcherCropBlock.java
|
||||
@@ -116,7 +116,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl
|
||||
@@ -112,7 +112,7 @@ public class PitcherCropBlock extends DoublePlantBlock implements BonemealableBl
|
||||
@Override
|
||||
public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
|
||||
float f = CropBlock.getGrowthSpeed(this, world, pos);
|
@ -24,10 +24,10 @@ to corrupted data. This is also something that Anti-Xray is currently
|
||||
relying on.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java b/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java
|
||||
index a6d0008636f72ff6614eda4b1fa856798e6b46fd..50580313a1e224a9569e343ccf4aa0c00b906a30 100644
|
||||
index 26e093243c70313b777483d9555fb1557443c9b8..7b7b614e5c3a30be89eeea2d25112fc9bcb3052c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/HashMapPalette.java
|
||||
@@ -19,7 +19,7 @@ public class HashMapPalette<T> implements Palette<T> {
|
||||
@@ -20,7 +20,7 @@ public class HashMapPalette<T> implements Palette<T> {
|
||||
}
|
||||
|
||||
public HashMapPalette(IdMap<T> idList, int indexBits, PaletteResize<T> listener) {
|
||||
@ -36,7 +36,7 @@ index a6d0008636f72ff6614eda4b1fa856798e6b46fd..50580313a1e224a9569e343ccf4aa0c0
|
||||
}
|
||||
|
||||
private HashMapPalette(IdMap<T> idList, int indexBits, PaletteResize<T> listener, CrudeIncrementalIntIdentityHashBiMap<T> map) {
|
||||
@@ -37,10 +37,16 @@ public class HashMapPalette<T> implements Palette<T> {
|
||||
@@ -38,10 +38,16 @@ public class HashMapPalette<T> implements Palette<T> {
|
||||
public int idFor(T object) {
|
||||
int i = this.values.getId(object);
|
||||
if (i == -1) {
|
@ -5,11 +5,11 @@ Subject: [PATCH] Allow delegation to vanilla chunk gen
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7460e45e5a9a9733824161dc9a75bf66370f816b..2b4167581303c79ead5628745efb7a0fa87cf405 100644
|
||||
index 460350ad26df0a07fab623e404ed4eff117ead13..8dc88ba48dbbf97c41d15cd1f01a5292b4e5a56c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2361,6 +2361,88 @@ public final class CraftServer implements Server {
|
||||
return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME), world); // Paper - Anti-Xray - Add parameters
|
||||
@@ -2364,6 +2364,88 @@ public final class CraftServer implements Server {
|
||||
return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().registryOrThrow(Registries.BIOME));
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -98,7 +98,7 @@ index 7460e45e5a9a9733824161dc9a75bf66370f816b..2b4167581303c79ead5628745efb7a0f
|
||||
public BossBar createBossBar(String title, BarColor color, BarStyle style, BarFlag... flags) {
|
||||
return new CraftBossBar(title, color, style, flags);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
|
||||
index a9700b750f124b5367c91ac071ee5194e9f7f8d8..1a363ceeefbf69618e5f17f67b6f6a2660579ba5 100644
|
||||
index c23ce88cb9693291fec81a99e3a5bcb2615bb897..189a584b4b81bbc28d4c47b901b5aa6f85fb7932 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
|
||||
@@ -23,7 +23,7 @@ import org.bukkit.material.MaterialData;
|
||||
@ -110,7 +110,7 @@ index a9700b750f124b5367c91ac071ee5194e9f7f8d8..1a363ceeefbf69618e5f17f67b6f6a26
|
||||
private final Registry<net.minecraft.world.level.biome.Biome> biomes;
|
||||
private Set<BlockPos> tiles;
|
||||
private final Set<BlockPos> lights = new HashSet<>();
|
||||
@@ -194,7 +194,13 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
|
||||
@@ -189,7 +189,13 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
|
||||
return this.tiles;
|
||||
}
|
||||
|
@ -1180,10 +1180,10 @@ index 0000000000000000000000000000000000000000..3d2fa2466fe40e0b9d7749498684587a
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 52dba7fad11a7280137ade67983e594487e20891..50f6a044385c22336e799efe471ab65e7196aaa6 100644
|
||||
index 6974a1a4c1142339dffedfd4e0205103274bfa5b..aab560700503a0c3415e4aaf09a86e907106bd63 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -461,7 +461,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -419,7 +419,7 @@ public class ServerPlayer extends Player {
|
||||
|
||||
if (blockposition1 != null) {
|
||||
this.moveTo(blockposition1, 0.0F, 0.0F);
|
||||
@ -1192,7 +1192,7 @@ index 52dba7fad11a7280137ade67983e594487e20891..50f6a044385c22336e799efe471ab65e
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -469,7 +469,7 @@ public class ServerPlayer extends Player {
|
||||
@@ -427,7 +427,7 @@ public class ServerPlayer extends Player {
|
||||
} else {
|
||||
this.moveTo(blockposition, 0.0F, 0.0F);
|
||||
|
||||
@ -1202,23 +1202,23 @@ index 52dba7fad11a7280137ade67983e594487e20891..50f6a044385c22336e799efe471ab65e
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index ffa831673805201932c36b814f4439f3bb5c4c04..64e40e3caa85bff9382a483237301a8f231d1991 100644
|
||||
index 42520ae8a26b0970981ef44fe95d70b79fd5bc47..3542ba4c043e4d38caa191efbabfa98092228a84 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -895,7 +895,7 @@ public abstract class PlayerList {
|
||||
// CraftBukkit end
|
||||
@@ -892,7 +892,7 @@ public abstract class PlayerList {
|
||||
entityplayer1.forceSetPositionRotation(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
|
||||
|
||||
worldserver1.getChunkSource().addRegionTicket(net.minecraft.server.level.TicketType.POST_TELEPORT, new net.minecraft.world.level.ChunkPos(location.getBlockX() >> 4, location.getBlockZ() >> 4), 1, entityplayer.getId()); // Paper
|
||||
- while (avoidSuffocation && !worldserver1.noCollision((Entity) entityplayer1) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) {
|
||||
+ while (avoidSuffocation && !worldserver1.noCollision(entityplayer1, entityplayer1.getBoundingBox(), true) && entityplayer1.getY() < (double) worldserver1.getMaxBuildHeight()) { // Paper - make sure this loads chunks, we default to NOT loading now
|
||||
// CraftBukkit end
|
||||
entityplayer1.setPos(entityplayer1.getX(), entityplayer1.getY() + 1.0D, entityplayer1.getZ());
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index f1d9b75eae4d42c02974c8bface6d73cb1e58182..23194249ab0add8cf2cbea190d3c6aee606b10a1 100644
|
||||
index 658fd3abef087c873ebc2833a38a111660311576..71b5d3a7ecbdc798847209c02458d11dbbe23556 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1210,9 +1210,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1091,9 +1091,44 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
float f = this.getBlockSpeedFactor();
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply((double) f, 1.0D, (double) f));
|
||||
@ -1266,7 +1266,7 @@ index f1d9b75eae4d42c02974c8bface6d73cb1e58182..23194249ab0add8cf2cbea190d3c6aee
|
||||
if (this.remainingFireTicks <= 0) {
|
||||
this.setRemainingFireTicks(-this.getFireImmuneTicks());
|
||||
}
|
||||
@@ -1392,32 +1427,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -1266,32 +1301,78 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
private Vec3 collide(Vec3 movement) {
|
||||
@ -1366,7 +1366,7 @@ index f1d9b75eae4d42c02974c8bface6d73cb1e58182..23194249ab0add8cf2cbea190d3c6aee
|
||||
}
|
||||
|
||||
public static Vec3 collideBoundingBox(@Nullable Entity entity, Vec3 movement, AABB entityBoundingBox, Level world, List<VoxelShape> collisions) {
|
||||
@@ -2611,11 +2692,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -2493,11 +2574,31 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
float f = this.dimensions.width * 0.8F;
|
||||
AABB axisalignedbb = AABB.ofSize(this.getEyePosition(), (double) f, 1.0E-6D, (double) f);
|
||||
|
||||
@ -1416,7 +1416,7 @@ index a3eaf80b020c3bbc0306c5d17659ee661dfd275b..1b6f72932fbdd567a1534bcf15e8a610
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/CollisionGetter.java b/src/main/java/net/minecraft/world/level/CollisionGetter.java
|
||||
index 06107d69dff9f0b52a5f188095cbd9a9efa5684c..c0dd933c8e64484c4ae0d4fa0f6e19969cf09b37 100644
|
||||
index c476e37df8a75d77f5093b2a449e04f25ef2c2dd..05d91e5c09015a4064317a3a9c0d4bd06485cec9 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/CollisionGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/CollisionGetter.java
|
||||
@@ -35,31 +35,33 @@ public interface CollisionGetter extends BlockGetter {
|
||||
@ -1470,12 +1470,12 @@ index 06107d69dff9f0b52a5f188095cbd9a9efa5684c..c0dd933c8e64484c4ae0d4fa0f6e1996
|
||||
+ // Paper end - optimise collisions
|
||||
}
|
||||
|
||||
List<VoxelShape> getEntityCollisions(@Nullable Entity entity, AABB box);
|
||||
default boolean noBlockCollision(@Nullable Entity entity, AABB box) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
index 66a5783e2a83c75ca46d1fd6f97d9de733c01a09..d860ddae508f53d06f74d8ae0efdfc500c1ddf07 100644
|
||||
index c41d0efb40f137d71b2a038dd362d17ddb2fac60..e82a56c32f4179dc6a8df97f314dc3b4370e818d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -49,7 +49,7 @@ public interface EntityGetter {
|
||||
@@ -37,7 +37,7 @@ public interface EntityGetter {
|
||||
return true;
|
||||
} else {
|
||||
for(Entity entity : this.getEntities(except, shape.bounds())) {
|
||||
@ -1484,7 +1484,7 @@ index 66a5783e2a83c75ca46d1fd6f97d9de733c01a09..d860ddae508f53d06f74d8ae0efdfc50
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -67,7 +67,7 @@ public interface EntityGetter {
|
||||
@@ -55,7 +55,7 @@ public interface EntityGetter {
|
||||
return List.of();
|
||||
} else {
|
||||
Predicate<Entity> predicate = entity == null ? EntitySelector.CAN_BE_COLLIDED_WITH : EntitySelector.NO_SPECTATORS.and(entity::canCollideWith);
|
||||
@ -1494,7 +1494,7 @@ index 66a5783e2a83c75ca46d1fd6f97d9de733c01a09..d860ddae508f53d06f74d8ae0efdfc50
|
||||
return List.of();
|
||||
} else {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
index a9e8d9c65a809562d4768df348dcd79bec4d0e3c..27680befd64967ef3c2ae0f35c9e7bd68d474314 100644
|
||||
index 96bdf69c8788aa0b1dff64789e6f13c856ee99ff..04b27d3797057b80e71d2d32c9e31c3fba39c86b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java
|
||||
@@ -863,6 +863,12 @@ public abstract class BlockBehaviour implements FeatureElement {
|
||||
@ -1547,11 +1547,11 @@ index a9e8d9c65a809562d4768df348dcd79bec4d0e3c..27680befd64967ef3c2ae0f35c9e7bd6
|
||||
|
||||
public Block getBlock() {
|
||||
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 12edaf88cca54540c617239ac31b2263dfa0ecd7..7a57a75db00cd64e4c95740b575277a1f355e414 100644
|
||||
index 5d53b09e19b664fad337ea5098bf9cf41a7168f8..f150a16fbf888455301d8b9043f0b45fb1fa1d84 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java
|
||||
@@ -42,6 +42,110 @@ public class LevelChunkSection {
|
||||
this.biomes = new PalettedContainer<>(biomeRegistry.asHolderIdMap(), biomeRegistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES, null); // Paper - Anti-Xray - Add preset biomes
|
||||
@@ -39,6 +39,110 @@ public class LevelChunkSection {
|
||||
this.biomes = new PalettedContainer<>(biomeRegistry.asHolderIdMap(), biomeRegistry.getHolderOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -1661,7 +1661,7 @@ index 12edaf88cca54540c617239ac31b2263dfa0ecd7..7a57a75db00cd64e4c95740b575277a1
|
||||
public BlockState getBlockState(int x, int y, int z) {
|
||||
return (BlockState) this.states.get(x, y, z);
|
||||
}
|
||||
@@ -62,8 +166,8 @@ public class LevelChunkSection {
|
||||
@@ -59,8 +163,8 @@ public class LevelChunkSection {
|
||||
return this.setBlockState(x, y, z, state, true);
|
||||
}
|
||||
|
||||
@ -1672,7 +1672,7 @@ index 12edaf88cca54540c617239ac31b2263dfa0ecd7..7a57a75db00cd64e4c95740b575277a1
|
||||
|
||||
if (lock) {
|
||||
iblockdata1 = (BlockState) this.states.getAndSet(x, y, z, state);
|
||||
@@ -102,6 +206,7 @@ public class LevelChunkSection {
|
||||
@@ -99,6 +203,7 @@ public class LevelChunkSection {
|
||||
++this.tickingFluidCount;
|
||||
}
|
||||
|
||||
@ -1680,7 +1680,7 @@ index 12edaf88cca54540c617239ac31b2263dfa0ecd7..7a57a75db00cd64e4c95740b575277a1
|
||||
return iblockdata1;
|
||||
}
|
||||
|
||||
@@ -147,6 +252,7 @@ public class LevelChunkSection {
|
||||
@@ -144,6 +249,7 @@ public class LevelChunkSection {
|
||||
|
||||
});
|
||||
// Paper end
|
||||
@ -2087,7 +2087,7 @@ index 9176735c08a75854209f24113b0e78332249dc4d..731c7dd15f131dc124be6af8f342b122
|
||||
if (one.isEmpty() && two.isEmpty()) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/phys/shapes/VoxelShape.java b/src/main/java/net/minecraft/world/phys/shapes/VoxelShape.java
|
||||
index c4ca051720f790f5b8eb860b14e268de8557454d..2182afd1b95acf14c55bddfeec17dae0a63e1f00 100644
|
||||
index 15e2dfa9a17b4f19768c0cde0ad8031f0122cd33..c9b376949cefbcb6292ce393dfcdd85ff9855b11 100644
|
||||
--- a/src/main/java/net/minecraft/world/phys/shapes/VoxelShape.java
|
||||
+++ b/src/main/java/net/minecraft/world/phys/shapes/VoxelShape.java
|
||||
@@ -16,11 +16,17 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||
@ -2110,7 +2110,7 @@ index c4ca051720f790f5b8eb860b14e268de8557454d..2182afd1b95acf14c55bddfeec17dae0
|
||||
this.shape = voxels;
|
||||
}
|
||||
|
||||
@@ -163,7 +169,7 @@ public abstract class VoxelShape {
|
||||
@@ -167,7 +173,7 @@ public abstract class VoxelShape {
|
||||
}
|
||||
}
|
||||
|
@ -8,10 +8,10 @@ Move collision logic to just the hasNewCollision call instead of getCubes + hasN
|
||||
CHECK ME
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b2de8ddeb 100644
|
||||
index 3dcffcf52a5342b515a26a426820491ebde15d33..735b47f2c452229f7d6951b5b1869ef40b14d26b 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -649,7 +649,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -534,7 +534,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
return;
|
||||
}
|
||||
|
||||
@ -20,7 +20,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
|
||||
d6 = d3 - this.vehicleLastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d4 - this.vehicleLastGoodY - 1.0E-6D; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -665,6 +665,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -550,6 +550,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
@ -28,7 +28,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
double d11 = d7;
|
||||
|
||||
d6 = d3 - entity.getX();
|
||||
@@ -678,16 +679,24 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -563,16 +564,24 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
boolean flag2 = false;
|
||||
|
||||
if (d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold) { // Spigot
|
||||
@ -55,8 +55,8 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
+ if (teleportBack) { // Paper end - optimise out extra getCubes
|
||||
entity.absMoveTo(d0, d1, d2, f, f1);
|
||||
this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
|
||||
this.connection.send(new ClientboundMoveVehiclePacket(entity));
|
||||
@@ -773,7 +782,32 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
this.send(new ClientboundMoveVehiclePacket(entity));
|
||||
@@ -658,7 +667,32 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
private boolean noBlocksAround(Entity entity) {
|
||||
@ -90,7 +90,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1349,7 +1383,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1227,7 +1261,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
@ -99,7 +99,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
|
||||
}
|
||||
@@ -1442,7 +1476,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1320,7 +1354,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
|
||||
d6 = d0 - this.lastGoodX; // Paper - diff on change, used for checking large move vectors above
|
||||
d7 = d1 - this.lastGoodY; // Paper - diff on change, used for checking large move vectors above
|
||||
@@ -1484,6 +1518,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1362,6 +1396,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
|
||||
this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
|
||||
@ -116,7 +116,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
// Paper start - prevent position desync
|
||||
if (this.awaitingPositionFromClient != null) {
|
||||
return; // ... thanks Mojang for letting move calls teleport across dimensions.
|
||||
@@ -1502,11 +1537,23 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1380,11 +1415,23 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
boolean flag2 = false;
|
||||
|
||||
if (!this.player.isChangingDimension() && d10 > org.spigotmc.SpigotConfig.movedWronglyThreshold && !this.player.isSleeping() && !this.player.gameMode.isCreative() && this.player.gameMode.getGameModeForPlayer() != GameType.SPECTATOR) { // Spigot
|
||||
@ -142,7 +142,7 @@ index 81750c1551a69d1c77ab8c34437e5d839b7e2941..6345d9d3ade4c490e4a6266fc5ecbd5b
|
||||
this.internalTeleport(d3, d4, d5, f, f1, Collections.emptySet()); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
|
||||
this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
|
||||
} else {
|
||||
@@ -1592,6 +1639,26 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic
|
||||
@@ -1470,6 +1517,26 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
}
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix ChunkSnapshot#isSectionEmpty(int) and optimize
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
index 269ebe8e8826a0c89e471cb59b503900d7ebe0fa..883eed6e92792e225ebfa8667ce3f4eeb6287d6a 100644
|
||||
index 719730451635d418b3f5024c35620412add42b7f..51e46990f3c27b4e96a3dc0a2d8a62b24cd281c6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
|
||||
@@ -289,13 +289,17 @@ public class CraftChunk implements Chunk {
|
||||
@@ -333,13 +333,17 @@ public class CraftChunk implements Chunk {
|
||||
PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
|
||||
|
||||
Registry<net.minecraft.world.level.biome.Biome> iregistry = this.worldServer.registryAccess().registryOrThrow(Registries.BIOME);
|
||||
@ -31,7 +31,7 @@ index 269ebe8e8826a0c89e471cb59b503900d7ebe0fa..883eed6e92792e225ebfa8667ce3f4ee
|
||||
|
||||
LevelLightEngine lightengine = this.worldServer.getLightEngine();
|
||||
DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(x, i, z));
|
||||
@@ -314,8 +318,7 @@ public class CraftChunk implements Chunk {
|
||||
@@ -358,8 +362,7 @@ public class CraftChunk implements Chunk {
|
||||
}
|
||||
|
||||
if (biome != null) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add more Campfire API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
index 0cd019dc20ff5b3e7ee663866f98595081e991a3..91feee1e284c929b008bc2df7ab548df898b3ef7 100644
|
||||
index 04b2697ee857e714b1202d02d093b0c60f079a6f..d80855b22dc10dbf697578d5f78664ed7b6ac572 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
|
||||
@@ -41,6 +41,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -42,6 +42,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
public final int[] cookingProgress;
|
||||
public final int[] cookingTime;
|
||||
private final RecipeManager.CachedCheck<Container, CampfireCookingRecipe> quickCheck;
|
||||
@ -16,7 +16,7 @@ index 0cd019dc20ff5b3e7ee663866f98595081e991a3..91feee1e284c929b008bc2df7ab548df
|
||||
|
||||
public CampfireBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.CAMPFIRE, pos, state);
|
||||
@@ -48,6 +49,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -49,6 +50,7 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
this.cookingProgress = new int[4];
|
||||
this.cookingTime = new int[4];
|
||||
this.quickCheck = RecipeManager.createCheck(RecipeType.CAMPFIRE_COOKING);
|
||||
@ -24,7 +24,7 @@ index 0cd019dc20ff5b3e7ee663866f98595081e991a3..91feee1e284c929b008bc2df7ab548df
|
||||
}
|
||||
|
||||
public static void cookTick(Level world, BlockPos pos, BlockState state, CampfireBlockEntity campfire) {
|
||||
@@ -58,7 +60,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -59,7 +61,9 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
|
||||
if (!itemstack.isEmpty()) {
|
||||
flag = true;
|
||||
@ -34,7 +34,7 @@ index 0cd019dc20ff5b3e7ee663866f98595081e991a3..91feee1e284c929b008bc2df7ab548df
|
||||
|
||||
if (campfire.cookingProgress[i] >= campfire.cookingTime[i]) {
|
||||
SimpleContainer inventorysubcontainer = new SimpleContainer(new ItemStack[]{itemstack});
|
||||
@@ -167,6 +171,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -168,6 +172,16 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
System.arraycopy(aint, 0, this.cookingTime, 0, Math.min(this.cookingTime.length, aint.length));
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ index 0cd019dc20ff5b3e7ee663866f98595081e991a3..91feee1e284c929b008bc2df7ab548df
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -175,6 +189,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -176,6 +190,13 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
ContainerHelper.saveAllItems(nbt, this.items, true);
|
||||
nbt.putIntArray("CookingTimes", this.cookingProgress);
|
||||
nbt.putIntArray("CookingTotalTimes", this.cookingTime);
|
@ -8,10 +8,10 @@ This ensures at least a valid version of the chunk exists
|
||||
on disk, even if outdated
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 9bae47f99336c377beb72c4b50b7f01cb4db15da..dcfe090c269d4cbcc2eb1b6f85392848bb34656c 100644
|
||||
index 13ab2d2d8d0d3ab0facbae8285b09267765cc97d..a030d149d7b65d9d3983fecc77a560fbd304f0d3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
@@ -1004,6 +1004,9 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -520,6 +520,9 @@ public class RegionFile implements AutoCloseable {
|
||||
}
|
||||
|
||||
}
|
||||
@ -21,7 +21,7 @@ index 9bae47f99336c377beb72c4b50b7f01cb4db15da..dcfe090c269d4cbcc2eb1b6f85392848
|
||||
// Paper end
|
||||
private class ChunkBuffer extends ByteArrayOutputStream {
|
||||
|
||||
@@ -1019,6 +1022,24 @@ public class RegionFile implements AutoCloseable {
|
||||
@@ -535,6 +538,24 @@ public class RegionFile implements AutoCloseable {
|
||||
this.pos = chunkcoordintpair;
|
||||
}
|
||||
|
||||
@ -47,10 +47,10 @@ index 9bae47f99336c377beb72c4b50b7f01cb4db15da..dcfe090c269d4cbcc2eb1b6f85392848
|
||||
ByteBuffer bytebuffer = ByteBuffer.wrap(this.buf, 0, this.count);
|
||||
|
||||
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 c2643f61fe5efb62d15f0798db691c76c7674a6e..81554c321a78258ff78da3801f00d0fb90b9e113 100644
|
||||
index 16346d727a854996ec1d2adb56ebca2a9ff7ab3b..96e5d67f9150c0962b06b2fb67222857fd948db1 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
|
||||
@@ -345,10 +345,17 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@@ -239,10 +239,17 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
NbtIo.write(nbt, (DataOutput) dataoutputstream);
|
||||
regionfile.setStatus(pos.x, pos.z, ChunkSerializer.getStatus(nbt)); // Paper - cache status on disk
|
||||
regionfile.setOversized(pos.x, pos.z, false); // Paper - We don't do this anymore, mojang stores differently, but clear old meta flag if it exists to get rid of our own meta file once last oversized is gone
|
||||
@ -69,7 +69,7 @@ index c2643f61fe5efb62d15f0798db691c76c7674a6e..81554c321a78258ff78da3801f00d0fb
|
||||
} catch (Throwable throwable1) {
|
||||
throwable.addSuppressed(throwable1);
|
||||
}
|
||||
@@ -356,10 +363,7 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@@ -250,10 +257,7 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
|
||||
throw throwable;
|
||||
}
|
||||
@ -81,7 +81,7 @@ index c2643f61fe5efb62d15f0798db691c76c7674a6e..81554c321a78258ff78da3801f00d0fb
|
||||
}
|
||||
// Paper start
|
||||
return;
|
||||
@@ -405,4 +409,13 @@ public class RegionFileStorage implements AutoCloseable {
|
||||
@@ -296,4 +300,13 @@ public final class RegionFileStorage implements AutoCloseable {
|
||||
}
|
||||
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 23194249ab0add8cf2cbea190d3c6aee606b10a1..d441db38210b15c6fae5a1632f4e2372c7a04b7c 100644
|
||||
index 71b5d3a7ecbdc798847209c02458d11dbbe23556..addd14088a5fa1671345de1537fbbd9d57dd4b40 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3444,6 +3444,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3354,6 +3354,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
}
|
||||
|
||||
public void restoreFrom(Entity original) {
|
||||
@ -22,7 +22,7 @@ index 23194249ab0add8cf2cbea190d3c6aee606b10a1..d441db38210b15c6fae5a1632f4e2372
|
||||
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
||||
|
||||
nbttagcompound.remove("Dimension");
|
||||
@@ -3530,10 +3537,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
@@ -3440,10 +3447,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
||||
if (worldserver.getTypeKey() == LevelStem.END) { // CraftBukkit
|
||||
ServerLevel.makeObsidianPlatform(worldserver, this); // CraftBukkit
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Improve scoreboard entries
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
|
||||
index ef1b0b716b11327a8f2856f51545aaba355ce74e..442ed17a4c91fe5ccf567f2af518569b945aa36c 100644
|
||||
index be3e1c4765ba891462e36ce5b6e35f16e3ec189a..d00e9ca05c36c2d1194024914bf935db0113d7fa 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
|
||||
@@ -145,6 +145,14 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
|
@ -7,7 +7,7 @@ Subject: [PATCH] Entity powdered snow API
|
||||
public net.minecraft.world.entity.monster.Skeleton inPowderSnowTime
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index f96144b6ee8b4d1d114e38bb933dd3072191574c..d976796c6e80d8abc5c110bdefc09f63cfc4a60a 100644
|
||||
index 984e6fa489e6b3d833d5f83dd739a6ff8a3ec5f0..f05d8107368e639adf60f3e5d944c65300087a3c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1381,5 +1381,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@ -10,10 +10,10 @@ when if this was fixed on the client, that wouldn't be needed.
|
||||
Mojira Issue: https://bugs.mojang.com/browse/MC-235045
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/commands/CommandSourceStack.java b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
index 308b3a36f063c401a447f9b7f0364700eee5a54c..43c71d9bf2eac98023057b4483fdd143a8343e98 100644
|
||||
index 7dfd18cfda943ea4486249e20d9763b8465c9601..0112035219b21550ca14fa1755c43a5547ca4136 100644
|
||||
--- a/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
+++ b/src/main/java/net/minecraft/commands/CommandSourceStack.java
|
||||
@@ -441,4 +441,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
@@ -437,4 +437,20 @@ public class CommandSourceStack implements SharedSuggestionProvider, com.destroy
|
||||
return this.source.getBukkitSender(this);
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -35,10 +35,10 @@ index 308b3a36f063c401a447f9b7f0364700eee5a54c..43c71d9bf2eac98023057b4483fdd143
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java
|
||||
index 7592b592a541912f729d6b99f455cd87ebcb34b8..f967e9039c87ec458da3f133743df834437b3e02 100644
|
||||
index b201fd131864751bea1e926c6b23f9742eae1c8e..c704761bd5dae98f7c77780a4f7058b737fdb664 100644
|
||||
--- a/src/main/java/net/minecraft/commands/Commands.java
|
||||
+++ b/src/main/java/net/minecraft/commands/Commands.java
|
||||
@@ -472,6 +472,7 @@ public class Commands {
|
||||
@@ -478,6 +478,7 @@ public class Commands {
|
||||
private void fillUsableCommands(CommandNode<CommandSourceStack> tree, CommandNode<SharedSuggestionProvider> result, CommandSourceStack source, Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> resultNodes) {
|
||||
Iterator iterator = tree.getChildren().iterator();
|
||||
|
||||
@ -46,7 +46,7 @@ index 7592b592a541912f729d6b99f455cd87ebcb34b8..f967e9039c87ec458da3f133743df834
|
||||
while (iterator.hasNext()) {
|
||||
CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
|
||||
// Paper start
|
||||
@@ -498,6 +499,12 @@ public class Commands {
|
||||
@@ -504,6 +505,12 @@ public class Commands {
|
||||
|
||||
if (requiredargumentbuilder.getSuggestionsProvider() != null) {
|
||||
requiredargumentbuilder.suggests(SuggestionProviders.safelySwap(requiredargumentbuilder.getSuggestionsProvider()));
|
||||
@ -94,7 +94,7 @@ index 850db283bf12345e9e7d7e8e590dbe8135c6dce1..a71726cee91fb406875a4540c9fb7c0e
|
||||
|
||||
SharedSuggestionProvider.suggest((Iterable) iterable, suggestionsbuilder1);
|
||||
diff --git a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
index cdc1319a7cb45a7c5ea30885958b8c3c54f0a241..4cc2ee22369aef22c9bf9d2b244c7278d6db39bb 100644
|
||||
index 3e5774139132b58fa447bcdf622150c0c9733a86..799f34d1ddb6c504329637a5171d06a999c57c13 100644
|
||||
--- a/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
+++ b/src/main/java/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
|
||||
@@ -113,12 +113,19 @@ public class EntitySelectorParser {
|
||||
@ -118,10 +118,10 @@ index cdc1319a7cb45a7c5ea30885958b8c3c54f0a241..4cc2ee22369aef22c9bf9d2b244c7278
|
||||
this.level = MinMaxBounds.Ints.ANY;
|
||||
this.rotX = WrappedMinMaxBounds.ANY;
|
||||
diff --git a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||
index 027906d533717fa97a523f4b03b31270fe3fa5fc..c51bcb3d89936cf558a5fe8aa6371617274a02a1 100644
|
||||
index a159ca2b6a2c6f3c69dbf4b499db57007d0df6aa..63c7c46eb5982a07b5dc0782d33e09c6c0fc44cf 100644
|
||||
--- a/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||
+++ b/src/main/java/net/minecraft/commands/arguments/selector/options/EntitySelectorOptions.java
|
||||
@@ -68,6 +68,19 @@ public class EntitySelectorOptions {
|
||||
@@ -69,6 +69,19 @@ public class EntitySelectorOptions {
|
||||
public static final DynamicCommandExceptionType ERROR_ENTITY_TYPE_INVALID = new DynamicCommandExceptionType((entity) -> {
|
||||
return Component.translatable("argument.entity.options.type.invalid", entity);
|
||||
});
|
||||
@ -141,7 +141,7 @@ index 027906d533717fa97a523f4b03b31270fe3fa5fc..c51bcb3d89936cf558a5fe8aa6371617
|
||||
|
||||
private static void register(String id, EntitySelectorOptions.Modifier handler, Predicate<EntitySelectorParser> condition, Component description) {
|
||||
OPTIONS.put(id, new EntitySelectorOptions.Option(handler, condition, description));
|
||||
@@ -315,6 +328,12 @@ public class EntitySelectorOptions {
|
||||
@@ -316,6 +329,12 @@ public class EntitySelectorOptions {
|
||||
|
||||
if (reader.isTag()) {
|
||||
TagKey<EntityType<?>> tagKey = TagKey.create(Registries.ENTITY_TYPE, ResourceLocation.read(reader.getReader()));
|
@ -27,7 +27,7 @@ Co-authored-by: Zach Brown <zach@zachbr.io>
|
||||
Co-authored-by: Madeline Miller <mnmiller1@me.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
index 8125c334c54d41ad731bbc3481662b0cf0afee51..58d1f76544d7a8d196f75438579266664e5d7404 100644
|
||||
index 195a08045d6705a47efa918fa0d3882ee9073ab4..5acf0e1fba2967e67bdb208ef73ae8fa84ffe35d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/piston/PistonBaseBlock.java
|
||||
@@ -146,15 +146,15 @@ public class PistonBaseBlock extends DirectionalBlock {
|
@ -6,15 +6,15 @@ Subject: [PATCH] Load effect amplifiers greater than 127 correctly
|
||||
MOJIRA: MC-118857
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
||||
index ddb369057bbfeb67c7825f7a93fa68d1c18eb6fc..14fab63346d56c72cd7534a04760efd10eef4295 100644
|
||||
index af7889fbed11ca413124908cb174a285d6d973e2..68e1b8271475996020af50b3b2cf04cd25aa6c85 100644
|
||||
--- a/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
||||
+++ b/src/main/java/net/minecraft/world/effect/MobEffectInstance.java
|
||||
@@ -286,7 +286,7 @@ public class MobEffectInstance implements Comparable<MobEffectInstance> {
|
||||
@@ -293,7 +293,7 @@ public class MobEffectInstance implements Comparable<MobEffectInstance> {
|
||||
}
|
||||
|
||||
private static MobEffectInstance loadSpecifiedEffect(MobEffect type, CompoundTag nbt) {
|
||||
- int i = nbt.getByte("Amplifier");
|
||||
+ int i = Byte.toUnsignedInt(nbt.getByte("Amplifier")); // Paper - correctly load amplifiers > 127
|
||||
int j = nbt.getInt("Duration");
|
||||
boolean bl = nbt.getBoolean("Ambient");
|
||||
- int i = nbt.getByte("amplifier");
|
||||
+ int i = Byte.toUnsignedInt(nbt.getByte("amplifier")); // Paper - correctly load amplifiers > 127
|
||||
int j = nbt.getInt("duration");
|
||||
boolean bl = nbt.getBoolean("ambient");
|
||||
boolean bl2 = true;
|
Loading…
Reference in New Issue
Block a user