mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 12:05:53 +01:00
More more more more more more more more more more more more more more more work
This commit is contained in:
parent
97a4a70766
commit
26dcf812a4
@ -212,7 +212,7 @@ index 13eac9ad2c1672051635d1c35cc49239252e7a61..107e36ef02a9481954bd770ce9a55a0b
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 25294bd8c4faa05af1429d934c5666742e3ee23c..271ebba09fd9248717750e998668ae6fe013bacc 100644
|
||||
index 20463f92d83dea3130d4a3f0ac70e5f399c97711..9bc8e82c1f5192e32781958ecd17fe8467eaeb80 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -31,7 +31,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -224,7 +224,7 @@ index 25294bd8c4faa05af1429d934c5666742e3ee23c..271ebba09fd9248717750e998668ae6f
|
||||
|
||||
/**
|
||||
* Gets the metadata for this block
|
||||
@@ -618,5 +618,15 @@ public interface Block extends Metadatable {
|
||||
@@ -627,5 +627,15 @@ public interface Block extends Metadatable {
|
||||
*/
|
||||
@NotNull
|
||||
com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index c729cb44290cd719e7684fd919bf74300484b883..57717976b5281ecf316064793f300426d0983a32 100644
|
||||
index b7d3cd271cccbc250914c5bc17ae892ffcf14b57..81de9c7af05224cc866e814a7bbc7efda26947dd 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -755,5 +755,10 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@ -5,7 +5,7 @@ Subject: [PATCH] Clarify the Javadocs for Entity.getEntitySpawnReason()
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java
|
||||
index 57717976b5281ecf316064793f300426d0983a32..b02704b0535522c5535b560105eec2885fdd3e77 100644
|
||||
index 81de9c7af05224cc866e814a7bbc7efda26947dd..2c892de67ecca09e490246186c8d2eccf91f3536 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Entity.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Entity.java
|
||||
@@ -721,7 +721,7 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 1171971a8f9b566ddc6f529845bc8e4ac11a112f..5b95ef65a8cffbb303952c071d0addc7430bd1c4 100644
|
||||
index 899a9dbd277b755195a67b6a0c56ac266a52e4c8..60528523299f92f842700cafd513a8ef6fd3c290 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1081,6 +1081,27 @@ public final class Bukkit {
|
||||
@@ -1095,6 +1095,27 @@ public final class Bukkit {
|
||||
return server.getOfflinePlayer(name);
|
||||
}
|
||||
|
||||
@ -37,10 +37,10 @@ index 1171971a8f9b566ddc6f529845bc8e4ac11a112f..5b95ef65a8cffbb303952c071d0addc7
|
||||
* Gets the player by the given UUID, regardless if they are offline or
|
||||
* online.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 221bc443695289a21aee9f7ac7d8453fea3f774e..95b07b5c13291203cde6653b2de400ff8430011f 100644
|
||||
index ad19ce0418ce3477d21583cb83c9ced639b250ff..5e0124fbfa7caa4ed321bf1e01ad0fde9941d7ef 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -914,6 +914,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -926,6 +926,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@NotNull
|
||||
public OfflinePlayer getOfflinePlayer(@NotNull String name);
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/Block.java b/src/main/java/org/bukkit/block/Block.java
|
||||
index 271ebba09fd9248717750e998668ae6fe013bacc..33fa378176d2a46e60de539246e5e13a34cb4bac 100644
|
||||
index 9bc8e82c1f5192e32781958ecd17fe8467eaeb80..f53377f1d860ef89d016ffd9068f261a09a8a556 100644
|
||||
--- a/src/main/java/org/bukkit/block/Block.java
|
||||
+++ b/src/main/java/org/bukkit/block/Block.java
|
||||
@@ -628,5 +628,29 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
||||
@@ -637,5 +637,29 @@ public interface Block extends Metadatable, net.kyori.adventure.translation.Tran
|
||||
@NotNull
|
||||
@Deprecated
|
||||
String getTranslationKey();
|
@ -5,7 +5,7 @@ Subject: [PATCH] Enable multi-release plugin jars
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
index 6b5d7c350c216b7a234d96ecacae1d39a1acd814..81292899918c4dc880661ee628384cb840a6244f 100644
|
||||
index 9e14c95deaca0044a3e9284ceefbb2b5c54ede07..c4ffe80bc7b4903eb8b8b2dbb18b5ff2d9877508 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -58,7 +58,7 @@ public final class PluginClassLoader extends URLClassLoader { // Spigot
|
@ -21,10 +21,10 @@ changes but this should usually not happen. A config option to disable
|
||||
this completely is added though in case that should ever be necessary.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 568da8f2ef3c5e1412cf13c10b425100af75e902..7ef45c941dacaa1f5cc4f0544af9ec76424cc783 100644
|
||||
index d985472c7982130cfa3a7d85694fd692717fa295..52c2373e1277e3f98bdfeafae0ef79158622b753 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -417,6 +417,14 @@ public class PaperWorldConfig {
|
||||
@@ -400,6 +400,14 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,14 +40,14 @@ index 568da8f2ef3c5e1412cf13c10b425100af75e902..7ef45c941dacaa1f5cc4f0544af9ec76
|
||||
private void maxEntityCollision() {
|
||||
maxCollisionsPerEntity = getInt( "max-entity-collisions", this.spigotConfig.getInt("max-entity-collisions", 8) );
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
index d7129f3379f2edecbcfd85f83d75e4d7064ce71d..7705ad4460ddf5166d922888f3a1368c50bb11ca 100644
|
||||
index 0670c1f72d9d0c4f8ea32ed314f75a106b2e2b09..6389e94abf3bae3e3cbeac11e0c99b1e50964563 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/levelgen/feature/StructureFeature.java
|
||||
@@ -171,7 +171,24 @@ public abstract class StructureFeature<C extends FeatureConfiguration> {
|
||||
if (!world.getWorldBorder().isChunkInBounds(chunkPos.x, chunkPos.z)) { continue; } // Paper
|
||||
boolean bl3 = world.getBiomeManager().getPrimaryBiomeAtChunk(chunkPos).getGenerationSettings().isValidStart(this);
|
||||
if (bl3) {
|
||||
- ChunkAccess chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS);
|
||||
@@ -175,7 +175,24 @@ public class StructureFeature<C extends FeatureConfiguration> {
|
||||
return this.getLocatePos(chunkPos);
|
||||
}
|
||||
|
||||
- ChunkAccess chunkAccess = levelReader.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS);
|
||||
+ // Paper start - seed based feature search
|
||||
+ ChunkAccess chunkAccess = null;
|
||||
+ if (structureAccessor.getWorld().paperConfig.seedBasedFeatureSearch) {
|
||||
@ -63,7 +63,7 @@ index d7129f3379f2edecbcfd85f83d75e4d7064ce71d..7705ad4460ddf5166d922888f3a1368c
|
||||
+ }
|
||||
+ }
|
||||
+ if (chunkAccess == null) {
|
||||
+ chunkAccess = world.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS);
|
||||
+ chunkAccess = levelReader.getChunk(chunkPos.x, chunkPos.z, ChunkStatus.STRUCTURE_STARTS);
|
||||
+ }
|
||||
+ // Paper end
|
||||
StructureStart<?> structureStart = structureAccessor.getStartForFeature(SectionPos.bottomOf(chunkAccess), this, chunkAccess);
|
@ -43,7 +43,7 @@ index c09d3cdb3acb04b6a833c30a619ff2af5e8b6b18..2384ae5082afd01c4f28fe2f3f782cdc
|
||||
this.connection.disconnect(chatmessage);
|
||||
return;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
index 6468a675862ee2956308b760012fe25cf505563f..f4cff18afa816aa7efb2f80e0af51216129963a4 100644
|
||||
index 1766a22e65af2e08611a9435c7384377120406de..8dc1e8bba37986c75966e321614ebb6366729c29 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
|
||||
@@ -106,14 +106,7 @@ public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener
|
@ -5,10 +5,10 @@ Subject: [PATCH] PortalCreateEvent needs to know its entity
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index ab5c59676451e6b338cd8678689bce776513d921..e4736190358181a6a7e7e81f4452045f41134060 100644
|
||||
index a18cf051b374cbf294e319b619b7e2fba10a6268..77785840754651b914c069d37a084a60995acd41 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -409,7 +409,7 @@ public final class ItemStack {
|
||||
@@ -410,7 +410,7 @@ public final class ItemStack {
|
||||
net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition);
|
||||
|
||||
if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
|
||||
@ -18,18 +18,10 @@ index ab5c59676451e6b338cd8678689bce776513d921..e4736190358181a6a7e7e81f4452045f
|
||||
|
||||
world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
||||
index a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc210bd31d 100644
|
||||
index adcfa3cac4f11557e0f27ae905c035e188bae25f..ed216f0b6cf031883c4ca4123d82c9fc542b915e 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BaseFireBlock.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.world.damagesource.DamageSource;
|
||||
import net.minecraft.world.entity.Entity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
+import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelAccessor;
|
||||
@@ -141,20 +142,23 @@ public abstract class BaseFireBlock extends Block {
|
||||
@@ -140,20 +140,23 @@ public abstract class BaseFireBlock extends Block {
|
||||
super.entityInside(state, world, pos, entity);
|
||||
}
|
||||
|
||||
@ -38,16 +30,16 @@ index a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc
|
||||
@Override
|
||||
- public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
||||
- if (!oldState.is(state.getBlock())) {
|
||||
+ public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) {
|
||||
+ public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, net.minecraft.world.item.context.UseOnContext itemActionContext) {
|
||||
+ // Paper end
|
||||
+ if (!iblockdata1.is(iblockdata.getBlock())) {
|
||||
if (BaseFireBlock.inPortalDimension(world)) {
|
||||
- Optional<PortalShape> optional = PortalShape.findEmptyPortalShape((LevelAccessor) world, pos, Direction.Axis.X);
|
||||
+ Optional<PortalShape> optional = PortalShape.findEmptyPortalShape((LevelAccessor) world, blockposition, Direction.Axis.X);
|
||||
- Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, pos, Direction.Axis.X);
|
||||
+ Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, blockposition, Direction.Axis.X);
|
||||
|
||||
if (optional.isPresent()) {
|
||||
- ((PortalShape) optional.get()).createPortal();
|
||||
+ ((PortalShape) optional.get()).createPortal(itemActionContext); // Paper - pass ItemActionContext param
|
||||
- ((PortalShape) optional.get()).createPortalBlocks();
|
||||
+ ((PortalShape) optional.get()).createPortalBlocks(itemActionContext); // Paper - pass ItemActionContext param
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -60,37 +52,37 @@ index a36d31caa5bfc82a5fd9b16dc42334955fe7511d..177d1da44c83da5f99ae91891dec41dc
|
||||
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
index 4156f212461201e8f8001f3fbcd7fb683e86ed6b..c8a58cd67bb7f7491de04bda703e2a1f166fb845 100644
|
||||
index 08bc35b40720ca001d3f6c1185bdd11c61ec9ee1..d8e4fda2d501545e5f891bca317e2aa5f9368f47 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java
|
||||
@@ -13,6 +13,7 @@ import net.minecraft.core.Direction;
|
||||
import net.minecraft.core.Vec3i;
|
||||
@@ -12,6 +12,7 @@ import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.Direction;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
+import net.minecraft.world.item.context.UseOnContext;
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.GameRules;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -359,9 +360,11 @@ public class FireBlock extends BaseFireBlock {
|
||||
@@ -358,9 +359,11 @@ public class FireBlock extends BaseFireBlock {
|
||||
}
|
||||
|
||||
@Override
|
||||
- public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
||||
- super.onPlace(state, world, pos, oldState, notify);
|
||||
- world.getBlockTicks().scheduleTick(pos, this, FireBlock.getFireTickDelay(world.random));
|
||||
- world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random));
|
||||
+ // Paper start - ItemActionContext param
|
||||
+ public void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext itemActionContext) {
|
||||
+ super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, itemActionContext);
|
||||
+ // Paper end
|
||||
+ world.getBlockTicks().scheduleTick(blockposition, this, getFireTickDelay(world.random));
|
||||
+ world.scheduleTick(blockposition, this, getFireTickDelay(world.random));
|
||||
}
|
||||
|
||||
private static int getFireTickDelay(Random random) {
|
||||
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 bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c4165b75ad4 100644
|
||||
index e1beb18dfb5529f48c312bf7ff85be18f6c935b5..23662570869de3bb1f6207a7d5104fdaff75163e 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
|
||||
@@ -32,6 +32,7 @@ import net.minecraft.world.item.DyeColor;
|
||||
@@ -31,6 +31,7 @@ import net.minecraft.world.item.DyeColor;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.context.BlockPlaceContext;
|
||||
@ -98,7 +90,7 @@ index bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c41
|
||||
import net.minecraft.world.level.BlockGetter;
|
||||
import net.minecraft.world.level.EmptyBlockGetter;
|
||||
import net.minecraft.world.level.Level;
|
||||
@@ -128,6 +129,12 @@ public abstract class BlockBehaviour {
|
||||
@@ -127,6 +128,12 @@ public abstract class BlockBehaviour {
|
||||
DebugPackets.sendNeighborsUpdatePacket(world, pos);
|
||||
}
|
||||
|
||||
@ -112,7 +104,7 @@ index bea9c7ac0fe08c3ca3309e8311f192cc557ca67d..983ca190dadc6f0b552133e6296f1c41
|
||||
public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
|
||||
org.spigotmc.AsyncCatcher.catchOp("block onPlace"); // Spigot
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalShape.java b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
index b68fa6cb68bb8fa078d4572bad338f43f20e8dc7..c07b5d1f1ef8b5e6026c7555d476880c8802d6c5 100644
|
||||
index c327308dd0209b952e738a01cc9cefdaece393e4..5d76674d5e181f012c0686e9915556bc93087706 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalShape.java
|
||||
@@ -11,6 +11,7 @@ import net.minecraft.tags.BlockTags;
|
||||
@ -127,10 +119,10 @@ index b68fa6cb68bb8fa078d4572bad338f43f20e8dc7..c07b5d1f1ef8b5e6026c7555d476880c
|
||||
}
|
||||
|
||||
// CraftBukkit start - return boolean
|
||||
- public boolean createPortal() {
|
||||
- public boolean createPortalBlocks() {
|
||||
+ // Paper start - ItemActionContext param
|
||||
+ @Deprecated public boolean createPortal() { return this.createPortal(null); }
|
||||
+ public boolean createPortal(UseOnContext itemActionContext) {
|
||||
+ @Deprecated public boolean createPortalBlocks() { return this.createPortalBlocks(null); }
|
||||
+ public boolean createPortalBlocks(UseOnContext itemActionContext) {
|
||||
+ // Paper end
|
||||
org.bukkit.World bworld = this.level.getMinecraftWorld().getWorld();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add methods to get translation keys
|
||||
Co-authored-by: MeFisto94 <MeFisto94@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 5f9f35c25a6247b6cd1ba31888a0afb8cea31da2..4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288 100644
|
||||
index 00056d5b3426df121242de2ae01fca492d20089a..ce97c1cafc520db5670004e00aee6b08045e9e00 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -612,5 +612,15 @@ public class CraftBlock implements Block {
|
||||
@@ -625,5 +625,15 @@ public class CraftBlock implements Block {
|
||||
public com.destroystokyo.paper.block.BlockSoundGroup getSoundGroup() {
|
||||
return new com.destroystokyo.paper.block.CraftBlockSoundGroup(getNMS().getBlock().defaultBlockState().getSoundType());
|
||||
}
|
||||
@ -42,7 +42,7 @@ index eb99e0c2462a2d1ab4508a5c3f1580b6e31d7465..c536eceef3365a7b726cd970df345ba1
|
||||
|
||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 3b727b96c4166e88ec23df3e3e1e98d6aed58637..aceb11620972d13324aa05c841b5251d0fda3fab 100644
|
||||
index 114890cceaf786ca7f76f8d2a62d6243b039285b..458be5e7cff9f9d97323360b7deaf045dff36fa6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -425,6 +425,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache block data strings
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 968476493bcea8b4d961e838b142912d3eac91cd..b9c628b2786df4b85329b4d1da55452f61d80dfd 100644
|
||||
index f7a0976488732e41e197a3a77f20a937d44c7be3..461ee423bfdcc63267f32f2b29ed9d87b1423f8c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2043,6 +2043,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1960,6 +1960,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.getFunctionLibrary());
|
||||
this.structureManager.onResourceManagerReload(this.resources.getResourceManager());
|
@ -9,10 +9,10 @@ as this is how Vanilla teleports entities.
|
||||
Cancel any pending motion when teleported.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index f20578abf959bf4005b2de0726de99ab7daaba47..17289eeb53dc4463897819a1c732fab3ec6a9cdd 100644
|
||||
index c5fc4a2470093202f38472df84355ba0404645c5..2074760beee6fdc2e94bb0f5dcfbae7b5813e8c9 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -681,7 +681,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -680,7 +680,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
public void handleAcceptTeleportPacket(ServerboundAcceptTeleportationPacket packet) {
|
||||
PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel());
|
||||
if (packet.getId() == this.awaitingTeleport && this.awaitingPositionFromClient != null) { // CraftBukkit
|
||||
@ -21,20 +21,20 @@ index f20578abf959bf4005b2de0726de99ab7daaba47..17289eeb53dc4463897819a1c732fab3
|
||||
this.lastGoodX = this.awaitingPositionFromClient.x;
|
||||
this.lastGoodY = this.awaitingPositionFromClient.y;
|
||||
this.lastGoodZ = this.awaitingPositionFromClient.z;
|
||||
@@ -1548,7 +1548,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1554,7 +1554,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit end
|
||||
|
||||
this.awaitingTeleportTime = this.tickCount;
|
||||
- this.player.absMoveTo(d0, d1, d2, f, f1);
|
||||
+ this.player.moveTo(d0, d1, d2, f, f1); // Paper - use proper setPositionRotation for teleportation
|
||||
this.player.forceCheckHighPriority(); // Paper
|
||||
this.player.connection.send(new ClientboundPlayerPositionPacket(d0 - d3, d1 - d4, d2 - d5, f - f2, f1 - f3, set, this.awaitingTeleport, flag));
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 8df955a0aa6cd0c7d10619fb63abd16af4754be8..a652bbc4b3c768fecfb6f067d21a90315256f885 100644
|
||||
index 91e034f54deb2aa084527aaa001e48ddcc2e9cd1..8ec3e8056b0a4f3994e27f9bb1dc5ccfb7ebfa52 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -152,6 +152,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -151,6 +151,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
@ -42,7 +42,7 @@ index 8df955a0aa6cd0c7d10619fb63abd16af4754be8..a652bbc4b3c768fecfb6f067d21a9031
|
||||
static boolean isLevelAtLeast(CompoundTag tag, int level) {
|
||||
return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
|
||||
}
|
||||
@@ -1568,6 +1569,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -1562,6 +1563,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
public void moveTo(double x, double y, double z, float yaw, float pitch) {
|
||||
@ -57,10 +57,10 @@ index 8df955a0aa6cd0c7d10619fb63abd16af4754be8..a652bbc4b3c768fecfb6f067d21a9031
|
||||
this.setYRot(yaw);
|
||||
this.setXRot(pitch);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 409467ca9a8a21d1e22e3a08f462e54d6124f6a1..56d3867f748d92a55976820215d9b8316989677b 100644
|
||||
index dba24bb35085a14a3780c10762f229eb40f84ef9..135abdd46561cfdcb2186c5872802fdcedc86359 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -171,6 +171,7 @@ public abstract class BaseSpawner {
|
||||
@@ -161,6 +161,7 @@ public abstract class BaseSpawner {
|
||||
return;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add additional open container api to HumanEntity
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 2be54303ad01fd2b464a8962ec1afe81d045b098..01c235d48d9b5276c5b754b25c5585654591ec1c 100644
|
||||
index a0af465056786f0c8e177a3f48bbf51c0f79b949..45fe3d2d728b984651c478ff050a7c69b1eebef3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
@@ -458,6 +458,70 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
|
@ -6,11 +6,11 @@ Subject: [PATCH] Extend block drop capture to capture all items added to the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 1b13c67441c46208a9b2adde5ca109f90bbb92e2..3563690e404a68b8940d9c06a0198dd0a4b2d220 100644
|
||||
index f9daa7183e29d203e73b242c285d10cda44aab11..bc57099ffc447a713b92896a1348728702ef51b2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1252,6 +1252,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getName(entity.getEntityType())); // CraftBukkit
|
||||
@@ -1226,6 +1226,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
// WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
|
||||
return false;
|
||||
} else {
|
||||
+ // Paper start - capture all item additions to the world
|
||||
@ -24,22 +24,14 @@ index 1b13c67441c46208a9b2adde5ca109f90bbb92e2..3563690e404a68b8940d9c06a0198dd0
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
index 784e6c2db5bb346408948cff8ac3cc9b964dd6d8..0b274a5b9e0bf68769637f10e43dbff6d909512b 100644
|
||||
index f087f48ad9e0b28d9874f3a9c1e3988ce6b60d87..2ac2100b6ae006ab490742424b682395e7513156 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.InteractionResultHolder;
|
||||
import net.minecraft.world.MenuProvider;
|
||||
import net.minecraft.world.entity.EquipmentSlot;
|
||||
+import net.minecraft.world.entity.item.ItemEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.DoubleHighBlockItem;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
@@ -424,10 +425,12 @@ public class ServerPlayerGameMode {
|
||||
@@ -421,10 +421,12 @@ public class ServerPlayerGameMode {
|
||||
// return true; // CraftBukkit
|
||||
}
|
||||
// CraftBukkit start
|
||||
+ java.util.List<ItemEntity> itemsToDrop = level.captureDrops; // Paper - store current list
|
||||
+ java.util.List<net.minecraft.world.entity.item.ItemEntity> itemsToDrop = level.captureDrops; // Paper - store current list
|
||||
+ level.captureDrops = null; // Paper - Remove this earlier so that we can actually drop stuff
|
||||
if (event.isDropItems()) {
|
||||
- org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, level.captureDrops);
|
@ -5,14 +5,14 @@ Subject: [PATCH] Don't mark dirty in invalid locations (SPIGOT-6086)
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index 96759f349e10c8ef634a11a6b48f9affae77d65a..823451570e02ee75bfce1c106779a0502187fcea 100644
|
||||
index 26a787864058dccc0365680b0259ddf0dad22b58..292a26a2e13d97e4796bfe00c4d5789f94e67cc1 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -381,6 +381,7 @@ public class ChunkHolder {
|
||||
@@ -206,6 +206,7 @@ public class ChunkHolder {
|
||||
}
|
||||
|
||||
public void blockChanged(BlockPos pos) {
|
||||
+ if (!pos.isValidLocation(levelHeightAccessor)) return; // Paper - SPIGOT-6086 for all invalid locations; avoid acquiring locks
|
||||
LevelChunk chunk = this.getSendingChunk(); // Paper - no-tick view distance
|
||||
LevelChunk chunk = this.getTickingChunk();
|
||||
|
||||
if (chunk != null) {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index dd98f228135c634235dc28c8edd396fb90fc98bc..595428849a32374678fc4125cb4a6f90186a1340 100644
|
||||
index 8ec3e8056b0a4f3994e27f9bb1dc5ccfb7ebfa52..d7403f6a2fc2574768c2751e5bfa816b87906117 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3958,4 +3958,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -3970,4 +3970,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
@ -21,7 +21,7 @@ index dd98f228135c634235dc28c8edd396fb90fc98bc..595428849a32374678fc4125cb4a6f90
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index aceb11620972d13324aa05c841b5251d0fda3fab..ee974e615096f78906a31b4774e3dde7a156d023 100644
|
||||
index 458be5e7cff9f9d97323360b7deaf045dff36fa6..5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -449,6 +449,10 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -14,21 +14,23 @@ this breaks your workflow you can always force all scoreboards to be tracked wit
|
||||
settings.track-plugin-scoreboards in paper.yml.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 6733e78ba6bf2993bb2adde4cf9f1f6ca366679c..380c4f46b98e6296cf28568abb1e74a80278ffa0 100644
|
||||
index 9a66cddbf9863aa6ff566a337153883c07c08e41..c0c807522aaa82ca74c47849b47e6b6b48b9a6f8 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -486,4 +486,9 @@ public class PaperConfig {
|
||||
private static void maxJoinsPerTick() {
|
||||
@@ -96,6 +96,11 @@ public class PaperConfig {
|
||||
maxJoinsPerTick = getInt("settings.max-joins-per-tick", 3);
|
||||
}
|
||||
+
|
||||
|
||||
+ public static boolean trackPluginScoreboards;
|
||||
+ private static void trackPluginScoreboards() {
|
||||
+ trackPluginScoreboards = getBoolean("settings.track-plugin-scoreboards", false);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
public static void registerCommands() {
|
||||
for (Map.Entry<String, Command> entry : commands.entrySet()) {
|
||||
MinecraftServer.getServer().server.getCommandMap().register(entry.getKey(), "Paper", entry.getValue());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
|
||||
index 68aa66c340b7a686a353e2a15084d811a3955a0a..b1fbbfeadb63d495b57f6c29b00de5327ca713cd 100644
|
||||
index 59f60fcadd8767cf8698482547e8c771d970732a..7b61a2be2be0bdf06592b65be9acd4cbbae5bf7f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
|
||||
@@ -18,6 +18,7 @@ import org.bukkit.scoreboard.Team;
|
@ -5,18 +5,18 @@ Subject: [PATCH] Entity#isTicking
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 9e6a2c5fc55674ab144ebd46da6152e51d3c1dba..9524771be6268b28f14618523d59cff00a127d9b 100644
|
||||
index d7403f6a2fc2574768c2751e5bfa816b87906117..2da1f5611d4c515107895692b9456e0800fb3cd3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -52,6 +52,7 @@ import net.minecraft.resources.ResourceKey;
|
||||
@@ -52,6 +52,7 @@ import net.minecraft.network.syncher.SynchedEntityData;
|
||||
import net.minecraft.resources.ResourceKey;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
import net.minecraft.server.MCUtil;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
+import net.minecraft.server.level.ServerChunkCache;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.server.level.TicketType;
|
||||
@@ -3963,5 +3964,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -3975,5 +3976,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
@ -27,7 +27,7 @@ index 9e6a2c5fc55674ab144ebd46da6152e51d3c1dba..9524771be6268b28f14618523d59cff0
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index a0a24a46624b3d174d08c806c8ad45d8a9028a09..2712aa554383a3b2b742c945e2f0be7ee96eea69 100644
|
||||
index 0547727afbd1b37c1a75fd8b4da585d80d54245a..986f045a2e6a040c6e2aab7420c8cb2d4ac3a726 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
@@ -1259,5 +1259,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix deop kicking non-whitelisted player when white list is
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b9c628b2786df4b85329b4d1da55452f61d80dfd..1e163dd6f1f1038cb7945347982407969962e277 100644
|
||||
index 461ee423bfdcc63267f32f2b29ed9d87b1423f8c..c739e90c4f015aea555c455e336e079a59c948bb 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2109,13 +2109,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2026,13 +2026,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
@ -20,7 +20,7 @@ index 893c37cc7e33f4baa98131afca45a258600ddc75..09998d160a6d79fdb5a5041a5d572649
|
||||
public GateBehavior(Map<MemoryModuleType<?>, MemoryStatus> requiredMemoryState, Set<MemoryModuleType<?>> memoriesToForgetWhenStopped, GateBehavior.OrderPolicy order, GateBehavior.RunningPolicy runMode, List<Pair<Behavior<? super E>, Integer>> tasks) {
|
||||
super(requiredMemoryState);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
index d4c9def80154c3e62a0b6928057062a0808f339f..4fa64b1e2004810906bb0b174436c8e687a75ada 100644
|
||||
index ca4c067ae99f4a1f2e62f8d92928d65ab29bc517..1bc34453933bc7590af45a5559a4fc75eb3e0c5c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/ShufflingList.java
|
||||
@@ -14,12 +14,25 @@ import java.util.stream.Stream;
|
@ -11,10 +11,10 @@ This ensures the crystals/pillars are in expected state when the dragon spawns.
|
||||
See #3522
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 711be01abe9d47bdc9bfe8b09a2719d666b986fb..9899c70b88fc371963e33caccd7125ef8c333df4 100644
|
||||
index 9a6b2c75b8622b0f9eda85011ef6f2f1dca574c9..01fb5d0c18d50e298a891a42428c5c87d6820194 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -404,6 +404,7 @@ public class EndDragonFight {
|
||||
@@ -408,6 +408,7 @@ public class EndDragonFight {
|
||||
enderDragon.moveTo(0.0D, 128.0D, 0.0D, this.level.random.nextFloat() * 360.0F, 0.0F);
|
||||
this.level.addFreshEntity(enderDragon);
|
||||
this.dragonUUID = enderDragon.getUUID();
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix for large move vectors crashing server
|
||||
Check movement distance also based on current position.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b226d7657e 100644
|
||||
index 2074760beee6fdc2e94bb0f5dcfbae7b5813e8c9..2dd47eab63cf9322a5844e748709e220272a8cfe 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -506,20 +506,31 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -505,20 +505,31 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
|
||||
ServerLevel worldserver = this.player.getLevel();
|
||||
@ -49,7 +49,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2
|
||||
|
||||
// CraftBukkit start - handle custom speeds and skipped ticks
|
||||
this.allowedPlayerTicks += (System.currentTimeMillis() / 50) - this.lastTick;
|
||||
@@ -562,9 +573,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -561,9 +572,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
boolean flag = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
|
||||
|
||||
@ -62,7 +62,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2
|
||||
entity.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
|
||||
double d11 = d7;
|
||||
|
||||
@@ -1232,14 +1243,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1231,14 +1242,25 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
float prevPitch = this.player.getXRot();
|
||||
// CraftBukkit end
|
||||
double d3 = this.player.getX(); final double toX = d3; // Paper - OBFHELPER
|
||||
@ -90,7 +90,7 @@ index be682e8459bb7293256c3552d90f5cdb8d97a29d..557817c8ac1eadabc11f7f3efc8485b2
|
||||
|
||||
if (this.player.isSleeping()) {
|
||||
if (d11 > 1.0D) {
|
||||
@@ -1291,9 +1313,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -1290,9 +1312,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
AABB axisalignedbb = this.player.getBoundingBox();
|
||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Optimise getType calls
|
||||
Remove the map lookup for converting from Block->Bukkit Material
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockState.java b/src/main/java/net/minecraft/world/level/block/state/BlockState.java
|
||||
index 3581aa7dcba934017896dc947adeb9d548d5f333..6158ef624ddbf02179afcc4aebc8284ae326ffb1 100644
|
||||
index 76133c77e8ebce7c9e5402e3e7cd50b30aa1c2e0..348a91a760bd728f8e732e1a35c86ab75d8fc0f1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/state/BlockState.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/state/BlockState.java
|
||||
@@ -10,6 +10,17 @@ import net.minecraft.world.level.block.state.properties.Property;
|
||||
public class BlockState extends BlockBehaviour.BlockStateBase {
|
||||
public static final Codec<BlockState> CODEC = codec(Registry.BLOCK, Block::defaultBlockState).stable();
|
||||
public static final Codec<BlockState> CODEC = codec(Registry.BLOCK.byNameCodec(), Block::defaultBlockState).stable();
|
||||
|
||||
+ // Paper start - optimise getType calls
|
||||
+ org.bukkit.Material cachedMaterial;
|
||||
@ -28,10 +28,10 @@ index 3581aa7dcba934017896dc947adeb9d548d5f333..6158ef624ddbf02179afcc4aebc8284a
|
||||
super(block, propertyMap, codec);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
|
||||
index e2e6652fc227173b69580dba74855c3ed8884a3b..2c23712aadfe32439ae014c62aa16f1b2a677439 100644
|
||||
index 10e65d6b9c0fe34414894e0debd17bab6f25d4f2..a37a7bd61df25408fef425cee941f75d0568fe31 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
|
||||
@@ -81,7 +81,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
|
||||
@@ -80,7 +80,7 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
|
||||
public Material getBlockType(int x, int y, int z) {
|
||||
this.validateChunkCoordinates(x, y, z);
|
||||
|
||||
@ -41,10 +41,10 @@ index e2e6652fc227173b69580dba74855c3ed8884a3b..2c23712aadfe32439ae014c62aa16f1b
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index 4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288..fd4a0bbd1438bfc94580f29382d0c5f50531292b 100644
|
||||
index ce97c1cafc520db5670004e00aee6b08045e9e00..e69b1831cbfdff3f2b1e4be4d5de313bfe724795 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -212,7 +212,7 @@ public class CraftBlock implements Block {
|
||||
@@ -215,7 +215,7 @@ public class CraftBlock implements Block {
|
||||
|
||||
@Override
|
||||
public Material getType() {
|
||||
@ -54,7 +54,7 @@ index 4febad176d8dc7c56e9cb09c8e5ce55f4c9f3288..fd4a0bbd1438bfc94580f29382d0c5f5
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
|
||||
index 8f7da903c75feaaf31e368ac8d798af8ed845ebf..db7a6af045364e7b1e9c0449faaf5f49394f6204 100644
|
||||
index 0a755f38fae9dc84440f43113920c5b4c6d8218b..7b9e943b391c061782fccd2b8d705ceec8db50fe 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
|
||||
@@ -166,7 +166,7 @@ public class CraftBlockState implements BlockState {
|
||||
@ -80,10 +80,10 @@ index 6dc8f9f269db6971b8b46819e017357899ccd118..7f49c7c7048b5778f20ddce1d844d4b3
|
||||
|
||||
public BlockState getState() {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
index 0b8975b34ef47d5ea91d34acd2ec5a1d548d74ff..68c47608a50a0cb6bd75ecbf73637d6f2e9db361 100644
|
||||
index ee88ff2ee86bbd3ccf3e4a0b2310f020f137ef4f..5e15feb408b8a05ec5ee393a604c8d39a91ff106 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
|
||||
@@ -99,7 +99,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
||||
@@ -96,7 +96,7 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
|
||||
|
||||
@Override
|
||||
public Material getType(int x, int y, int z) {
|
@ -5,7 +5,7 @@ Subject: [PATCH] Villager#resetOffers
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
index ab701d86b1181e30d74e0e03eef79c43f7fb2513..2610d9cd849aa38cc7a67aef21223707e85682ec 100644
|
||||
index dddc84e233e9108f2304694e53990d0654225c5b..68bd3bb6fde77a65b5271631f6ef726dc613019b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/AbstractVillager.java
|
||||
@@ -115,6 +115,13 @@ public abstract class AbstractVillager extends AgeableMob implements InventoryCa
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve inlinig for some hot IBlockData methods
|
||||
|
||||
|
||||
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 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a2143a37bfe 100644
|
||||
index 23662570869de3bb1f6207a7d5104fdaff75163e..8fddb02a6266002800a7e31444c6465300d76689 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
|
||||
@@ -659,8 +659,14 @@ public abstract class BlockBehaviour {
|
||||
@@ -658,8 +658,14 @@ public abstract class BlockBehaviour {
|
||||
return this.shapeExceedsCube;
|
||||
}
|
||||
// Paper end
|
||||
@ -23,7 +23,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21
|
||||
if (!this.getBlock().hasDynamicShape()) {
|
||||
this.cache = new BlockBehaviour.BlockStateBase.Cache(this.asState());
|
||||
}
|
||||
@@ -704,15 +710,15 @@ public abstract class BlockBehaviour {
|
||||
@@ -703,15 +709,15 @@ public abstract class BlockBehaviour {
|
||||
return this.shapeExceedsCube; // Paper - moved into shape cache init
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21
|
||||
return this.isAir;
|
||||
}
|
||||
|
||||
@@ -786,7 +792,7 @@ public abstract class BlockBehaviour {
|
||||
@@ -785,7 +791,7 @@ public abstract class BlockBehaviour {
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21
|
||||
return this.canOcclude;
|
||||
}
|
||||
|
||||
@@ -979,12 +985,12 @@ public abstract class BlockBehaviour {
|
||||
@@ -978,12 +984,12 @@ public abstract class BlockBehaviour {
|
||||
return this.getBlock() == block;
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index 983ca190dadc6f0b552133e6296f1c4165b75ad4..b534fd9e5d2a17926282cf40c9d66a21
|
||||
|
||||
public long getSeed(BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/material/FluidState.java b/src/main/java/net/minecraft/world/level/material/FluidState.java
|
||||
index 65911334082f9d53fc930d7c6b0313e8acef0c5e..0ae876f0bbfac74a9d5f06fb73f9cfcf5991b02e 100644
|
||||
index b0611b985efc2cc8a528ff4589fd11cbcc84ac39..5e7dc3868dbf676b7ddfc39ec1ea97ff2a9dbaae 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/material/FluidState.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/material/FluidState.java
|
||||
@@ -23,8 +23,12 @@ public final class FluidState extends StateHolder<Fluid, FluidState> {
|
@ -10,10 +10,10 @@ In general, look at making this logic more robust (i.e properly handling
|
||||
cases where a captured entry is overriden) - but for now this will do.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 1dd4ee6cf037dcc6a8683d79b623165d1be62d57..af3f8bfae033fb77a0428515fa9da80f1851fa1f 100644
|
||||
index 9d628996437959e79348679e2c85e07bc138475e..8830f1cf93969a3c74b208227fbc264bede709aa 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -148,7 +148,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@@ -149,7 +149,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
public boolean captureBlockStates = false;
|
||||
public boolean captureTreeGeneration = false;
|
||||
public Map<BlockPos, org.bukkit.craftbukkit.block.CraftBlockState> capturedBlockStates = new java.util.LinkedHashMap<>(); // Paper
|
@ -5,7 +5,7 @@ Subject: [PATCH] Reduce blockpos allocation from 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 b37acb6e6e253529a38f44a518a02c7747d3145e..2ad5ff9a1d7de54e75436e99da8a73db9dc91bde 100644
|
||||
index c33fda773ec071d27e924461a30a2938db35c231..46d3640b6556a104889f1d57e61d60b5094c28f2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/pathfinder/WalkNodeEvaluator.java
|
||||
@@ -471,7 +471,7 @@ public class WalkNodeEvaluator extends NodeEvaluator {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix item locations dropped from campfires
|
||||
Fixes #4259 by not flooring the blockposition among other weirdness
|
||||
|
||||
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 7a5f748f974429ce4faa8f64fae905994b5e59a9..ad35d82f03f7643507dde6adbb38c911d12ec6c1 100644
|
||||
index 05cae0e74c64f5ab659dbfae4e40f1c8d9f15ed7..dd272fe24d330c04f2f3f44db9357b3d35034c4e 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
|
||||
@@ -71,7 +71,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
@@ -70,7 +70,11 @@ public class CampfireBlockEntity extends BlockEntity implements Clearable {
|
||||
result = blockCookEvent.getResult();
|
||||
itemstack1 = CraftItemStack.asNMSCopy(result);
|
||||
// CraftBukkit end
|
@ -5,10 +5,10 @@ Subject: [PATCH] Player elytra boost API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c661f6f29633fd5b28bb6ce71ed49463a3d7ecf0..434fba86e04894a3a2c4daeb4582980319d64d8e 100644
|
||||
index 465961e0e21fe15c366a492a1de94c6da7bbc51c..bb3e706aae719c8cff904425c09cc3b0f82534f1 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -539,6 +539,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -562,6 +562,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
throw new RuntimeException("Unknown settings type");
|
||||
}
|
@ -6,7 +6,7 @@ Subject: [PATCH] Fixed TileEntityBell memory leak
|
||||
TileEntityBell has a list of entities (entitiesAtRing) that was not being cleared at the right time, causing leaks whenever a bell would be rung near a crowd of entities.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
|
||||
index 58ee348d0934a8d8743005b4b8e9114cfe1bc028..a71bf0802d04217dd11086901b7148957d32ca89 100644
|
||||
index 205db12aa5a8161b07efe7f12da79e9d7bff5cd6..b06e911acb825883c93da73358fa81653e8a0d4a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BellBlockEntity.java
|
||||
@@ -61,6 +61,11 @@ public class BellBlockEntity extends BlockEntity {
|
@ -8,10 +8,10 @@ This can realistically only happen if there's custom loot active on fishing
|
||||
which can return 0 items. This would disconnect the player who's fishing.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
index 45d007c519e80415e34eaf404c03bf104b6f9dc1..5c16566f59535ce61fb3f747a745255cfaa439e8 100644
|
||||
index abab779379e60d4b775f7b39cc46943e91c8749c..1037d0a0cdd4fd7aa99a958ee969759c5883fdc0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -497,9 +497,15 @@ public class FishingHook extends Projectile {
|
||||
@@ -496,9 +496,15 @@ public class FishingHook extends Projectile {
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ItemStack itemstack1 = (ItemStack) iterator.next();
|
||||
@ -29,7 +29,7 @@ index 45d007c519e80415e34eaf404c03bf104b6f9dc1..5c16566f59535ce61fb3f747a745255c
|
||||
playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
|
||||
this.level.getCraftServer().getPluginManager().callEvent(playerFishEvent);
|
||||
|
||||
@@ -512,8 +518,12 @@ public class FishingHook extends Projectile {
|
||||
@@ -511,8 +517,12 @@ public class FishingHook extends Projectile {
|
||||
double d2 = entityhuman.getZ() - this.getZ();
|
||||
double d3 = 0.1D;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add getOfflinePlayerIfCached(String)
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ab7eae6483a8981f6324f9da671b3d41667c3768..374155f592907fc078dd4747ad7710ee83d7da50 100644
|
||||
index cd98fa713ecd0cb8d4bb2a9211ee9b9b89a04330..5c8dc52d012117ebf9721fb26d3c0e9d84a751f4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1763,6 +1763,28 @@ public final class CraftServer implements Server {
|
||||
@@ -1808,6 +1808,28 @@ public final class CraftServer implements Server {
|
||||
return result;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ignore discounts API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc69e3f18cd 100644
|
||||
index 785fcb94d707b6790ef2191f7c9db77d253e9c6d..353ee3699c7c7e40dc920e687055d82e23f02008 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -474,6 +474,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -475,6 +475,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
|
||||
@ -16,7 +16,7 @@ index 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc6
|
||||
|
||||
// CraftBukkit start
|
||||
int bonus = -Mth.floor((float) i * merchantrecipe.getPriceMultiplier());
|
||||
@@ -493,6 +494,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -494,6 +495,7 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
|
||||
while (iterator1.hasNext()) {
|
||||
MerchantOffer merchantrecipe1 = (MerchantOffer) iterator1.next();
|
||||
@ -25,7 +25,7 @@ index 64d5ddb8ce06e17e1a4dee284ba4c6ecfcdae11e..2eb60384b244a5c1dc8bcbeb59c8adc6
|
||||
int k = (int) Math.floor(d0 * (double) merchantrecipe1.getBaseCostA().getCount());
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
index 75827fcad36a551d832f4be094167936092b6caf..70b703b920752e7301e4f19cdc07a1a4ceac5e0e 100644
|
||||
index 29b65a80e890e7e513336cb78d052c9d2c535a35..e0f1857dc100bc4d68e5e308b984e5eeaef976b5 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/trading/MerchantOffer.java
|
||||
@@ -19,6 +19,7 @@ public class MerchantOffer {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Toggle for removing existing dragon
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index b70be9eea934aa88a9597581dbd1fd5662876c2d..568da8f2ef3c5e1412cf13c10b425100af75e902 100644
|
||||
index aea942ddba54a23733cb32a0a1d0dcb82e247718..d985472c7982130cfa3a7d85694fd692717fa295 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -72,6 +72,14 @@ public class PaperWorldConfig {
|
||||
@@ -70,6 +70,14 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,10 +24,10 @@ index b70be9eea934aa88a9597581dbd1fd5662876c2d..568da8f2ef3c5e1412cf13c10b425100
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
index 9899c70b88fc371963e33caccd7125ef8c333df4..e1d689aa65b8d993c7223d306363366f3adff62f 100644
|
||||
index 01fb5d0c18d50e298a891a42428c5c87d6820194..ddfaaac55646527ccd5bb4f5b4d35aa3ddaf34f4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java
|
||||
@@ -212,7 +212,7 @@ public class EndDragonFight {
|
||||
@@ -216,7 +216,7 @@ public class EndDragonFight {
|
||||
this.dragonUUID = enderDragon.getUUID();
|
||||
LOGGER.info("Found that there's a dragon still alive ({})", (Object)enderDragon);
|
||||
this.dragonKilled = false;
|
@ -15,7 +15,7 @@ manually reload the advancement data for all players, which
|
||||
normally takes place as a part of the datapack reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index f212ca8756782b12a746f86933f46b747481c87e..c0a08c3ac18b3ec0964c61c90df3263c50ece83d 100644
|
||||
index 5d5720b2a6cbf9d73b6c7413e4ddc5cc114b9448..ea45befec7e03f48da00f8a77dcae6561745a01e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -306,7 +306,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Beacon API - custom effect ranges
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba0e1b2788 100644
|
||||
index 76a401bcfdacded2137142ed38d739ed65d9fae6..008d486f4166d9f384e3aab48af6d66a255f3564 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
|
||||
@@ -79,6 +79,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -78,6 +78,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null;
|
||||
}
|
||||
// CraftBukkit end
|
||||
@ -35,7 +35,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba
|
||||
|
||||
public BeaconBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(BlockEntityType.BEACON, pos, state);
|
||||
@@ -182,7 +202,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -181,7 +201,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
|
||||
if (blockEntity.levels > 0 && !blockEntity.beamSections.isEmpty()) {
|
||||
@ -44,7 +44,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba
|
||||
BeaconBlockEntity.playSound(world, pos, SoundEvents.BEACON_AMBIENT);
|
||||
}
|
||||
}
|
||||
@@ -268,8 +288,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -267,8 +287,13 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
|
||||
public static List getHumansInRange(Level world, BlockPos blockposition, int i) {
|
||||
@ -59,7 +59,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba
|
||||
|
||||
AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
|
||||
List<Player> list = world.getEntitiesOfClass(Player.class, axisalignedbb);
|
||||
@@ -310,12 +335,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -309,12 +334,17 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
|
||||
private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect) {
|
||||
@ -78,7 +78,7 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba
|
||||
|
||||
BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0, true, pos); // Paper - BeaconEffectEvent
|
||||
|
||||
@@ -366,6 +396,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -364,6 +394,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
|
||||
this.lockKey = LockCode.fromTag(nbt);
|
||||
@ -86,16 +86,16 @@ index 0fa01b98f4a2ce2a7d34437a71d8c1cc7e718fb1..11740e6a312cf8ab10b52461f455feba
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -379,6 +410,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
@@ -377,6 +408,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider {
|
||||
}
|
||||
|
||||
this.lockKey.addToTag(nbt);
|
||||
+ nbt.putDouble(PAPER_RANGE_TAG, this.effectRange); // Paper
|
||||
return nbt;
|
||||
}
|
||||
|
||||
public void setCustomName(@Nullable Component customName) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
index 22e9245b0a0d30972980c6c13a22cb4501c3d3ca..046981c5611d2064811fa34a02218db4a7c1c0c6 100644
|
||||
index c186a44b927188ed222f8b2f8f76aaef35d9c654..c47e613cae3d9252a8364ccc4d717e410bb0fc0c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
|
||||
@@ -29,7 +29,7 @@ public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implem
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add API for quit reason
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/network/Connection.java b/src/main/java/net/minecraft/network/Connection.java
|
||||
index 7f6405ac44fef423dc8b21f3dbeaae26a1005077..bdd4f4db9849d9107b5c62d5e83b1277621f49f1 100644
|
||||
index d30bc3f1da336b421d9a42070184e07169dd14e4..a6eadf71957b37e2acc5d09f0ce4ee961810891f 100644
|
||||
--- a/src/main/java/net/minecraft/network/Connection.java
|
||||
+++ b/src/main/java/net/minecraft/network/Connection.java
|
||||
@@ -142,12 +142,15 @@ public class Connection extends SimpleChannelInboundHandler<Packet<?>> {
|
||||
@ -25,22 +25,22 @@ index 7f6405ac44fef423dc8b21f3dbeaae26a1005077..bdd4f4db9849d9107b5c62d5e83b1277
|
||||
Connection.LOGGER.debug("Failed to sent packet", throwable);
|
||||
ConnectionProtocol enumprotocol = this.getCurrentProtocol();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d8df3bcf6ddd87e9fa932f01a41a48a641328f9d..4f1291a1f840000aac782389e4c93b317cbf90d1 100644
|
||||
index beebb7a0e6b8b1fa4e7d2f9fdf1962357cc2ebc3..207c566603671685f7d0abbb11274d2027568a05 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -262,6 +262,7 @@ public class ServerPlayer extends Player {
|
||||
public double lastEntitySpawnRadiusSquared; // Paper - optimise isOutsideRange, this field is in blocks
|
||||
@@ -254,6 +254,7 @@ public class ServerPlayer extends Player {
|
||||
public PlayerNaturallySpawnCreaturesEvent playerNaturallySpawnedEvent; // Paper
|
||||
|
||||
public final com.destroystokyo.paper.util.misc.PooledLinkedHashSets.PooledObjectLinkedOpenHashSet<ServerPlayer> cachedSingleHashSet; // Paper
|
||||
boolean needsChunkCenterUpdate; // Paper - no-tick view distance
|
||||
+ public org.bukkit.event.player.PlayerQuitEvent.QuitReason quitReason = null; // Paper - there are a lot of changes to do if we change all methods leading to the event
|
||||
|
||||
public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile) {
|
||||
super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 557817c8ac1eadabc11f7f3efc8485b226d7657e..7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea 100644
|
||||
index 2dd47eab63cf9322a5844e748709e220272a8cfe..c0a685cfe62aeda3583763ecc1e4fa127f8fb0d4 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -443,6 +443,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -442,6 +442,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
final Component ichatbasecomponent = PaperAdventure.asVanilla(event.reason()); // Paper - Adventure
|
||||
// CraftBukkit end
|
||||
|
||||
@ -49,10 +49,10 @@ index 557817c8ac1eadabc11f7f3efc8485b226d7657e..7cfdd686773b8ef67c99f3211c3ed2bf
|
||||
this.connection.disconnect(ichatbasecomponent);
|
||||
});
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 4d1d5dacb175e7059a6af036432ef891bcf77970..76e21498b6cfd1c9a601a55e1483eb8dfd892c2e 100644
|
||||
index 9cec325fdcfd8b66bbeccb973cbe75ebd423fec4..7b14ca5806afc83f5ba608ec26874244aa3420fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -597,7 +597,7 @@ public abstract class PlayerList {
|
||||
@@ -594,7 +594,7 @@ public abstract class PlayerList {
|
||||
entityplayer.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.DISCONNECT); // Paper
|
||||
}
|
||||
|
@ -11,10 +11,10 @@ in IWorldServerData are removed as they were only used in certain places, with h
|
||||
values used in other places.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index 7ef45c941dacaa1f5cc4f0544af9ec76424cc783..e1aa521a3947b38643866e038c7d0536658c58f2 100644
|
||||
index d985472c7982130cfa3a7d85694fd692717fa295..f91cc86a2bf4f77c248ca4f513195b65972e3084 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -80,6 +80,19 @@ public class PaperWorldConfig {
|
||||
@@ -78,6 +78,19 @@ public class PaperWorldConfig {
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ index 7ef45c941dacaa1f5cc4f0544af9ec76424cc783..e1aa521a3947b38643866e038c7d0536
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
index 12aa0fd5b6bada9820c3a08eee47c870f9c183cb..60f08ecd0034e8ef2965b54b3abccce582d0ca54 100644
|
||||
index 80a895bad59538acbc88b9cb3392cbc95092a1fe..487dfa0dd39b99994a82ff3858903c28d7676c0d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
|
||||
@@ -43,43 +43,53 @@ public class WanderingTraderSpawner implements CustomSpawner {
|
||||
@ -96,7 +96,7 @@ index 12aa0fd5b6bada9820c3a08eee47c870f9c183cb..60f08ecd0034e8ef2965b54b3abccce5
|
||||
} else {
|
||||
int i = this.spawnChance;
|
||||
|
||||
- this.spawnChance = Mth.clamp(this.spawnChance + 25, 25, 75);
|
||||
- this.spawnChance = Mth.clamp(this.spawnChance + 25, (int) 25, (int) 75);
|
||||
- this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance);
|
||||
+ this.spawnChance = Mth.clamp(i + world.paperConfig.wanderingTraderSpawnChanceFailureIncrement, world.paperConfig.wanderingTraderSpawnChanceMin, world.paperConfig.wanderingTraderSpawnChanceMax);
|
||||
+ //this.serverLevelData.setWanderingTraderSpawnChance(this.spawnChance); // Paper - We don't need to save this value to disk if it gets set back to a hardcoded value anyways
|
@ -12,10 +12,10 @@ Co-authored-by: Dylan Xaldin <Puremin0rez515@gmail.com>
|
||||
Co-authored-by: pop4959 <pop4959@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
|
||||
index 9a64ab092ac8616ed8b9ea5c1e8677dda5c4333c..3f7c4e0938933705ac1bcb8dd676d018088a831a 100644
|
||||
index d090bdc063480ee6e28b0d60447ebe4063e6d688..ff0255e7f3c75e9972e8516058c234c7b58a0bd7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/biome/TheEndBiomeSource.java
|
||||
@@ -28,6 +28,16 @@ public class TheEndBiomeSource extends BiomeSource {
|
||||
@@ -29,6 +29,16 @@ public class TheEndBiomeSource extends BiomeSource {
|
||||
private final Biome midlands;
|
||||
private final Biome islands;
|
||||
private final Biome barrens;
|
||||
@ -32,7 +32,7 @@ index 9a64ab092ac8616ed8b9ea5c1e8677dda5c4333c..3f7c4e0938933705ac1bcb8dd676d018
|
||||
|
||||
public TheEndBiomeSource(Registry<Biome> biomeRegistry, long seed) {
|
||||
this(biomeRegistry, seed, biomeRegistry.getOrThrow(Biomes.THE_END), biomeRegistry.getOrThrow(Biomes.END_HIGHLANDS), biomeRegistry.getOrThrow(Biomes.END_MIDLANDS), biomeRegistry.getOrThrow(Biomes.SMALL_END_ISLANDS), biomeRegistry.getOrThrow(Biomes.END_BARRENS));
|
||||
@@ -87,12 +97,26 @@ public class TheEndBiomeSource extends BiomeSource {
|
||||
@@ -88,12 +98,26 @@ public class TheEndBiomeSource extends BiomeSource {
|
||||
float f = 100.0F - Mth.sqrt((long) i * (long) i + (long) j * (long) j) * 8.0F; // Paper - cast ints to long to avoid integer overflow
|
||||
f = Mth.clamp(f, -100.0F, 80.0F);
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose world spawn angle
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index d95403513eb3b497187d9a93ea8230a632025d79..51764416bc8adcd3bca28200453e57e6e52cab5b 100644
|
||||
index 7b14ca5806afc83f5ba608ec26874244aa3420fd..1d7e5d0f155dd92015dcf287b8a21d0337fc2af7 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -875,7 +875,7 @@ public abstract class PlayerList {
|
||||
@@ -872,7 +872,7 @@ public abstract class PlayerList {
|
||||
if (location == null) {
|
||||
worldserver1 = this.server.getLevel(Level.OVERWORLD);
|
||||
blockposition = entityplayer1.getSpawnPoint(worldserver1);
|
||||
@ -18,7 +18,7 @@ index d95403513eb3b497187d9a93ea8230a632025d79..51764416bc8adcd3bca28200453e57e6
|
||||
|
||||
Player respawnPlayer = entityplayer1.getBukkitEntity();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index c21b98fbd9b410e0e993f3073e5cbb37015776eb..9088d41108fa355850def4a9afcca6439c406fc3 100644
|
||||
index 1f12da32b5bc10f77a5b8f4a9b32cbb89d7f2968..48557c6fdf9ffcce52713fc47ccf0ac9a9f73d0d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -236,7 +236,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Destroy Speed API
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
index fd4a0bbd1438bfc94580f29382d0c5f50531292b..6d79409f58715038de1e9e397e73f8739fb9dca2 100644
|
||||
index e69b1831cbfdff3f2b1e4be4d5de313bfe724795..f0d5c3a182acc8a2ccb936e98376f2840892be28 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
|
||||
@@ -622,5 +622,23 @@ public class CraftBlock implements Block {
|
||||
@@ -635,5 +635,23 @@ public class CraftBlock implements Block {
|
||||
public String translationKey() {
|
||||
return org.bukkit.Bukkit.getUnsafe().getTranslationKey(this);
|
||||
}
|
@ -5,10 +5,10 @@ Subject: [PATCH] Fix Player spawnParticle x/y/z precision loss
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index 23ada9f9b9d4969c7a9e493906d51a4293462305..d082e6e43ac638c353ae22a46c128c151a39424d 100644
|
||||
index bb3e706aae719c8cff904425c09cc3b0f82534f1..f4a94bc00a8318af810c3c859decbf88decfa98d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -2075,7 +2075,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -2069,7 +2069,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
if (data != null && !particle.getDataType().isInstance(data)) {
|
||||
throw new IllegalArgumentException("data should be " + particle.getDataType() + " got " + data.getClass());
|
||||
}
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add LivingEntity#clearActiveItem
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 95f08ceb8cf7ea91a6b7b53ada22b30965384083..37d8519c9c653be0eb60563dc5811a1202a662dd 100644
|
||||
index 537d1a6dcf8add34e8dac8aee2fa50c50ce7e5d0..24ffc967391c9ba175f41396a90007ecdc32f55c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -805,6 +805,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Climbing should not bypass cramming gamerule
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3 100644
|
||||
index f91cc86a2bf4f77c248ca4f513195b65972e3084..daab716a75e39dfb62b5d9db5fa55b4dd13ac1ed 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -93,6 +93,11 @@ public class PaperWorldConfig {
|
||||
@@ -91,6 +91,11 @@ public class PaperWorldConfig {
|
||||
wanderingTraderSpawnChanceMax = getInt("wandering-trader.spawn-chance-max", wanderingTraderSpawnChanceMax);
|
||||
}
|
||||
|
||||
@ -21,10 +21,10 @@ index e1aa521a3947b38643866e038c7d0536658c58f2..a6cfc237fe5e06d43732dcd76b3a52a8
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 368c80ac596b66396985521e6e8c6aee6af26697..7e0f711ded0ecf0b94a79f69a3d75c2afa57c5a9 100644
|
||||
index 2da1f5611d4c515107895692b9456e0800fb3cd3..11cb360e71b3f2e3d6821162af91d6752e8d17c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1749,6 +1749,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, n
|
||||
@@ -1743,6 +1743,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, i
|
||||
}
|
||||
|
||||
public boolean isPushable() {
|
||||
@ -38,10 +38,10 @@ index 368c80ac596b66396985521e6e8c6aee6af26697..7e0f711ded0ecf0b94a79f69a3d75c2a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422fe7757af 100644
|
||||
index 22f36cd3df49160f1b6668befdd05c2268edaa49..e39965c2e50bc8ee424ea07819346e0611398e28 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
@@ -44,11 +44,17 @@ public final class EntitySelector {
|
||||
@@ -45,11 +45,17 @@ public final class EntitySelector {
|
||||
}
|
||||
|
||||
public static Predicate<Entity> pushableBy(Entity entity) {
|
||||
@ -61,19 +61,19 @@ index 8fb89326395a7e70982c0d757b506565e98b12a4..a060cca08631fb42041e3a79a9abc422
|
||||
} else if (entity.level.isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
|
||||
return false;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e837dd8dd8 100644
|
||||
index 2e02fc6d9c54bd246602b8535553dd04c4e26679..de90fc7af633576a33b0d35715c3cb68bb9f5b21 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3277,7 +3277,7 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3276,7 +3276,7 @@ public abstract class LivingEntity extends Entity {
|
||||
return;
|
||||
}
|
||||
// Paper end - don't run getEntities if we're not going to use its result
|
||||
- List<Entity> list = this.level.getEntities(this, this.getBoundingBox(), EntitySelector.pushableBy(this));
|
||||
+ List<Entity> list = this.level.getEntities(this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule
|
||||
- List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this));
|
||||
+ List<Entity> list = this.level.getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushable(this, level.paperConfig.fixClimbingBypassingCrammingRule)); // Paper - fix climbing bypassing cramming rule
|
||||
|
||||
if (!list.isEmpty()) {
|
||||
// Paper - move up
|
||||
@@ -3444,9 +3444,16 @@ public abstract class LivingEntity extends Entity {
|
||||
@@ -3447,9 +3447,16 @@ public abstract class LivingEntity extends Entity {
|
||||
return !this.isRemoved() && this.collides; // CraftBukkit
|
||||
}
|
||||
|
||||
@ -92,7 +92,7 @@ index 40964014376aa911f412f6a5b717c6cf523530ab..327199d0e002bb7e7c2194fb54c213e8
|
||||
|
||||
// CraftBukkit start - collidable API
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ambient/Bat.java b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
index ee55623cddc6d9e0dde5f384d66a750b92cc4f0e..9ed2f8f2843c634fd14dda4459f85b7140dd447a 100644
|
||||
index 3b34f1e7ae8aa33d957a9ff7ebe4a8e7fed73f3c..29dfbcecfbb2560e6ecde997abd5224a16c08c94 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ambient/Bat.java
|
||||
@@ -83,7 +83,7 @@ public class Bat extends AmbientCreature {
|
||||
@ -105,10 +105,10 @@ index ee55623cddc6d9e0dde5f384d66a750b92cc4f0e..9ed2f8f2843c634fd14dda4459f85b71
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/Parrot.java b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
index 57378e42d6ef1be70a0abcca846cab9108c76783..ae21d260b2d4673eb4aa56a82e1043d20507adb2 100644
|
||||
index daec622f4b47c5ccd474ae7f56042fa6434091e1..dd80d9e0614445ba088c295784dc30584dedaa2b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/Parrot.java
|
||||
@@ -380,8 +380,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
@@ -383,8 +383,8 @@ public class Parrot extends ShoulderRidingEntity implements FlyingAnimal {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -120,10 +120,10 @@ index 57378e42d6ef1be70a0abcca846cab9108c76783..ae21d260b2d4673eb4aa56a82e1043d2
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
index c613a5e4d3ae360ce3eed312c5eecc553fae0066..630b6491ee186e1e3f17489311a91681e52b7ff5 100644
|
||||
index e63f55df91d301b18c63ba94dc19966155916b65..cd278a859c87fc89c421378ffab1bd36a45bd65d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java
|
||||
@@ -239,7 +239,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
@@ -241,7 +241,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener,
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -133,10 +133,10 @@ index c613a5e4d3ae360ce3eed312c5eecc553fae0066..630b6491ee186e1e3f17489311a91681
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
index c5e9273055ff7302941b7475d8175be53eaece1f..02bce120fc93caa9e1e92b61e74c28209a1b2385 100644
|
||||
index 0d468631b9c260091e732925da43c177ebda892f..e5ef24d92de21c4c0e6a98e06985e52d47bfdce0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
||||
@@ -345,7 +345,7 @@ public class ArmorStand extends LivingEntity {
|
||||
@@ -344,7 +344,7 @@ public class ArmorStand extends LivingEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -146,10 +146,10 @@ index c5e9273055ff7302941b7475d8175be53eaece1f..02bce120fc93caa9e1e92b61e74c2820
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
index fa889f93a5c6782957bdbf803915cb5e80e05f3e..9653b142c199c068e4d6175bcd3cbecb6465853f 100644
|
||||
index 6f9cbba0c063b272afd6aacc3eab02df405b3061..75cff07051d3b81d37926fb1da50af5ba27c34dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java
|
||||
@@ -149,7 +149,7 @@ public abstract class AbstractMinecart extends Entity {
|
||||
@@ -148,7 +148,7 @@ public abstract class AbstractMinecart extends Entity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -159,7 +159,7 @@ index fa889f93a5c6782957bdbf803915cb5e80e05f3e..9653b142c199c068e4d6175bcd3cbecb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
index 3f1059569da23bd02c00279050bf7bce7a160462..a1b93f2878e22fa1d0cad639416d2dc5b8339c73 100644
|
||||
index 11632004d16fe254e7b20cf6db25d4fc24887867..b4516094996c80886b8d7af599ba7c3d4229ba9d 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/Boat.java
|
||||
@@ -158,7 +158,7 @@ public class Boat extends Entity {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerShearBlockEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
index 96bc2cc1e3005a5273b8834569f5dee5c3a08293..d3b85a29662d33d458cfd4d7942b8e2d2264b750 100644
|
||||
index 56d2e0ca2414c2f1fdde3f1d9a3aa3c93fb46b03..bcfd5bfa7839738396b6137effc3f66c445c2e0c 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java
|
||||
@@ -115,7 +115,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@@ -116,7 +116,7 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
}
|
||||
|
||||
public static void dropHoneycomb(Level world, BlockPos pos) {
|
||||
@ -17,7 +17,7 @@ index 96bc2cc1e3005a5273b8834569f5dee5c3a08293..d3b85a29662d33d458cfd4d7942b8e2d
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -128,8 +128,19 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
@@ -129,8 +129,19 @@ public class BeehiveBlock extends BaseEntityBlock {
|
||||
Item item = itemstack.getItem();
|
||||
|
||||
if (itemstack.is(Items.SHEARS)) {
|
@ -8,10 +8,10 @@ and curing a villager on repeat by simply resetting the relevant part of
|
||||
the reputation when it is cured.
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
index a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3..87e3f45057bde15e10b5bb55a9be6e9b6131e254 100644
|
||||
index daab716a75e39dfb62b5d9db5fa55b4dd13ac1ed..458a17d7b0cc1ee9dcdb7ca9e6cd571033ecfacb 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperWorldConfig.java
|
||||
@@ -98,6 +98,11 @@ public class PaperWorldConfig {
|
||||
@@ -96,6 +96,11 @@ public class PaperWorldConfig {
|
||||
fixClimbingBypassingCrammingRule = getBoolean("fix-climbing-bypassing-cramming-rule", fixClimbingBypassingCrammingRule);
|
||||
}
|
||||
|
||||
@ -24,10 +24,10 @@ index a6cfc237fe5e06d43732dcd76b3a52a886ae8fe3..87e3f45057bde15e10b5bb55a9be6e9b
|
||||
private void keepLoadedRange() {
|
||||
keepLoadedRange = (short) (getInt("keep-spawn-loaded-range", Math.min(spigotConfig.viewDistance, 10)) * 16);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
index 2eb60384b244a5c1dc8bcbeb59c8adc69e3f18cd..b746453774054dd2db023b7eea265a395cfc7cc9 100644
|
||||
index 353ee3699c7c7e40dc920e687055d82e23f02008..dbd17107f08c218d88ef075fc04823b83083648b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java
|
||||
@@ -1056,6 +1056,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@@ -1059,6 +1059,15 @@ public class Villager extends AbstractVillager implements ReputationEventHandler
|
||||
@Override
|
||||
public void onReputationEventFrom(ReputationEventType interaction, Entity entity) {
|
||||
if (interaction == ReputationEventType.ZOMBIE_VILLAGER_CURED) {
|
@ -5,10 +5,10 @@ Subject: [PATCH] Limit recipe packets
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1b6bc8ae3 100644
|
||||
index c0c807522aaa82ca74c47849b47e6b6b48b9a6f8..1de3d8848419fce792e28c8100eca1b2488ac968 100644
|
||||
--- a/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
+++ b/src/main/java/com/destroystokyo/paper/PaperConfig.java
|
||||
@@ -355,6 +355,13 @@ public class PaperConfig {
|
||||
@@ -365,6 +365,13 @@ public class PaperConfig {
|
||||
tabSpamLimit = getInt("settings.spam-limiter.tab-spam-limit", tabSpamLimit);
|
||||
}
|
||||
|
||||
@ -23,18 +23,18 @@ index 380c4f46b98e6296cf28568abb1e74a80278ffa0..288310df8ca9eff6901d906b48ba7cd1
|
||||
public static boolean velocityOnlineMode;
|
||||
public static byte[] velocitySecretKey;
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea..7a4766d4fd86b6f0ab725955e364c631d37752b6 100644
|
||||
index c0a685cfe62aeda3583763ecc1e4fa127f8fb0d4..ff36ca2dbdf4a9abb953097f1b6246a177370b02 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -231,6 +231,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -230,6 +230,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit start - multithreaded fields
|
||||
private AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
private final AtomicInteger chatSpamTickCount = new AtomicInteger();
|
||||
private final java.util.concurrent.atomic.AtomicInteger tabSpamLimiter = new java.util.concurrent.atomic.AtomicInteger(); // Paper - configurable tab spam limits
|
||||
+ private final java.util.concurrent.atomic.AtomicInteger recipeSpamPackets = new java.util.concurrent.atomic.AtomicInteger(); // Paper - auto recipe limit
|
||||
// CraftBukkit end
|
||||
private int dropSpamTickCount;
|
||||
private double firstGoodX;
|
||||
@@ -376,6 +377,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -375,6 +376,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
// CraftBukkit start
|
||||
for (int spam; (spam = this.chatSpamTickCount.get()) > 0 && !this.chatSpamTickCount.compareAndSet(spam, spam - 1); ) ;
|
||||
if (tabSpamLimiter.get() > 0) tabSpamLimiter.getAndDecrement(); // Paper - split to seperate variable
|
||||
@ -42,7 +42,7 @@ index 7cfdd686773b8ef67c99f3211c3ed2bf84fb54ea..7a4766d4fd86b6f0ab725955e364c631
|
||||
/* Use thread-safe field access instead
|
||||
if (this.chatSpamTickCount > 0) {
|
||||
--this.chatSpamTickCount;
|
||||
@@ -2801,6 +2803,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
@@ -2810,6 +2812,14 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Ser
|
||||
|
||||
@Override
|
||||
public void handlePlaceRecipe(ServerboundPlaceRecipePacket packet) {
|
Loading…
Reference in New Issue
Block a user