mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
[ci skip] (Mostly) finish adding identifying patch comments
This commit is contained in:
parent
76da4bc683
commit
11645e3268
@ -7,7 +7,7 @@ Bamboo - Both the minimum fully-grown heights and the maximum are configurable
|
||||
- Machine_Maker
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e7438380f9a7a8 100644
|
||||
index bd72deadb59289ae90afc379ee61e8198ddaf4ed..b54c76ce5c9433765495a5dd0f2166c17ebd304d 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/BambooStalkBlock.java
|
||||
@@ -137,7 +137,7 @@ public class BambooStalkBlock extends Block implements BonemealableBlock {
|
||||
@ -15,7 +15,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
int i = this.getHeightBelowUpToMax(world, pos) + 1;
|
||||
|
||||
- if (i < 16) {
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.bamboo.max) { // Paper
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.bamboo.max) { // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
this.growBamboo(state, world, pos, random, i);
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
int j = this.getHeightBelowUpToMax(world, pos);
|
||||
|
||||
- return i + j + 1 < 16 && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1;
|
||||
+ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; // Paper
|
||||
+ return i + j + 1 < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && (Integer) world.getBlockState(pos.above(i)).getValue(BambooStalkBlock.STAGE) != 1; // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -33,7 +33,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
BlockState iblockdata1 = world.getBlockState(blockposition1);
|
||||
|
||||
- if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here
|
||||
+ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus bamboo and reed growth heights
|
||||
+ if (k >= world.paperConfig().maxGrowthHeight.bamboo.max || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
return;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
|
||||
int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
|
||||
- int k = (height < 11 || random.nextFloat() >= 0.25F) && height != 15 ? 0 : 1;
|
||||
+ int k = (height < world.paperConfig().maxGrowthHeight.bamboo.min || random.nextFloat() >= 0.25F) && height != (world.paperConfig().maxGrowthHeight.bamboo.max - 1) ? 0 : 1; // Paper
|
||||
+ int k = (height < world.paperConfig().maxGrowthHeight.bamboo.min || random.nextFloat() >= 0.25F) && height != (world.paperConfig().maxGrowthHeight.bamboo.max - 1) ? 0 : 1; // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
|
||||
// CraftBukkit start
|
||||
if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) {
|
||||
@ -51,7 +51,7 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < 16 && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) {
|
||||
+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper
|
||||
+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.above(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
;
|
||||
}
|
||||
|
||||
@ -60,12 +60,12 @@ index bd72deadb59289ae90afc379ee61e8198ddaf4ed..1dd85da8da9e2040d740c5f573e74383
|
||||
int i;
|
||||
|
||||
- for (i = 0; i < 16 && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) {
|
||||
+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper
|
||||
+ for (i = 0; i < ((Level) world).paperConfig().maxGrowthHeight.bamboo.max && world.getBlockState(pos.below(i + 1)).is(Blocks.BAMBOO); ++i) { // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
;
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/CactusBlock.java b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..3c7bbfcb3a88f23056cd0db3da2a281a81dc8c85 100644
|
||||
index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..43ecbeaced4d50910a59b24934908ff40d894770 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/CactusBlock.java
|
||||
@@ -61,7 +61,7 @@ public class CactusBlock extends Block {
|
||||
@ -73,12 +73,12 @@ index fcd5b593c79aab42928cb1ddd0e6c1b03b7bafaf..3c7bbfcb3a88f23056cd0db3da2a281a
|
||||
}
|
||||
|
||||
- if (i < 3) {
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.cactus) { // Paper - Configurable growth height
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.cactus) { // Paper - Configurable cactus/bamboo/reed growth heightst
|
||||
int j = (Integer) state.getValue(CactusBlock.AGE);
|
||||
|
||||
int modifier = world.spigotConfig.cactusModifier; // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..ceaec1776067b7635c3952025f00f13f4ea86c88 100644
|
||||
index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..e4a9ddf77d36f2d6df55c666c16677adb2e4fbe7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/SugarCaneBlock.java
|
||||
@@ -59,7 +59,7 @@ public class SugarCaneBlock extends Block {
|
||||
@ -86,7 +86,7 @@ index 47d4fc5bcf2657078abc7a2637b6337fc0ea0977..ceaec1776067b7635c3952025f00f13f
|
||||
}
|
||||
|
||||
- if (i < 3) {
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.reeds) { // Paper - Configurable growth height
|
||||
+ if (i < world.paperConfig().maxGrowthHeight.reeds) { // Paper - Configurable cactus/bamboo/reed growth heights
|
||||
int j = (Integer) state.getValue(SugarCaneBlock.AGE);
|
||||
|
||||
int modifier = world.spigotConfig.caneModifier; // Spigot - SPIGOT-7159: Better modifier resolution
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Configurable baby zombie movement speed
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 190a02bce0026b2c6df796a5f14e639b5a84ccf1..38403a5bb8569f105056d61ca444d6b3a19becd2 100644
|
||||
index 190a02bce0026b2c6df796a5f14e639b5a84ccf1..a779d32f87b59f347408974e402fad22fdc47f09 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -78,6 +78,7 @@ public class Zombie extends Monster {
|
||||
@ -21,10 +21,10 @@ index 190a02bce0026b2c6df796a5f14e639b5a84ccf1..38403a5bb8569f105056d61ca444d6b3
|
||||
AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
|
||||
|
||||
- attributemodifiable.removeModifier(Zombie.SPEED_MODIFIER_BABY.getId());
|
||||
+ attributemodifiable.removeModifier(this.babyModifier.getId()); // Paper
|
||||
+ attributemodifiable.removeModifier(this.babyModifier.getId()); // Paper - Make baby speed configurable
|
||||
if (baby) {
|
||||
- attributemodifiable.addTransientModifier(Zombie.SPEED_MODIFIER_BABY);
|
||||
+ attributemodifiable.addTransientModifier(this.babyModifier); // Paper
|
||||
+ attributemodifiable.addTransientModifier(this.babyModifier); // Paper - Make baby speed configurable
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,17 @@ Subject: [PATCH] Configurable fishing time ranges
|
||||
|
||||
|
||||
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 e5d9902331e3c4e461e855290a95980b41f5efe2..af6829c25fcd186adc3575d50cab6d46db9a2fac 100644
|
||||
index e5d9902331e3c4e461e855290a95980b41f5efe2..8b27b5118cbeeb0b25fb6a23056e51899be32035 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/projectile/FishingHook.java
|
||||
@@ -92,6 +92,10 @@ public class FishingHook extends Projectile {
|
||||
this.noCulling = true;
|
||||
this.luck = Math.max(0, luckOfTheSeaLevel);
|
||||
this.lureSpeed = Math.max(0, lureLevel);
|
||||
+ // Paper start
|
||||
+ // Paper start - Configurable fishing time ranges
|
||||
+ minWaitTime = world.paperConfig().fishingTimeRange.minimum;
|
||||
+ maxWaitTime = world.paperConfig().fishingTimeRange.maximum;
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable fishing time ranges
|
||||
}
|
||||
|
||||
public FishingHook(EntityType<? extends FishingHook> type, Level world) {
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Allow nerfed mobs to jump
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 01761d37c9e4be4e498b62c7612885648b2968a6..183866636eb67f632728a01c8e5e11b514d89f84 100644
|
||||
index 01761d37c9e4be4e498b62c7612885648b2968a6..093c60df0948fd1a46aef86223ecc63bc9e8b440 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -112,6 +112,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
private final BodyRotationControl bodyRotationControl;
|
||||
protected PathNavigation navigation;
|
||||
public GoalSelector goalSelector;
|
||||
+ @Nullable public net.minecraft.world.entity.ai.goal.FloatGoal goalFloat; // Paper
|
||||
+ @Nullable public net.minecraft.world.entity.ai.goal.FloatGoal goalFloat; // Paper - Allow nerfed mobs to jump and float
|
||||
public GoalSelector targetSelector;
|
||||
@Nullable
|
||||
private LivingEntity target;
|
||||
@ -29,19 +29,19 @@ index 01761d37c9e4be4e498b62c7612885648b2968a6..183866636eb67f632728a01c8e5e11b5
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Allow nerfed mobs to jump and float
|
||||
this.level().getProfiler().push("sensing");
|
||||
this.sensing.tick();
|
||||
this.level().getProfiler().pop();
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
index 01950951ea06e43bedeeede489a112e577617829..7093c62be53fe99ed9880fc8ddaa07440fe4f715 100644
|
||||
index 01950951ea06e43bedeeede489a112e577617829..60a62781fcfe4c598c308a7ce2b0dcf72c0895ae 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/ai/goal/FloatGoal.java
|
||||
@@ -9,6 +9,7 @@ public class FloatGoal extends Goal {
|
||||
|
||||
public FloatGoal(Mob mob) {
|
||||
this.mob = mob;
|
||||
+ if (mob.getCommandSenderWorld().paperConfig().entities.behavior.spawnerNerfedMobsShouldJump) mob.goalFloat = this; // Paper
|
||||
+ if (mob.getCommandSenderWorld().paperConfig().entities.behavior.spawnerNerfedMobsShouldJump) mob.goalFloat = this; // Paper - Allow nerfed mobs to jump and float
|
||||
this.setFlags(EnumSet.of(Goal.Flag.JUMP));
|
||||
mob.getNavigation().setCanFloat(true);
|
||||
}
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Suddenly <suddenly@suddenly.coffee>
|
||||
Date: Tue, 1 Mar 2016 13:51:54 -0600
|
||||
Subject: [PATCH] Add configurable despawn distances for living entities
|
||||
Subject: [PATCH] Add configurable entity despawn distances
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 183866636eb67f632728a01c8e5e11b514d89f84..007a5c9a6dc70ca6a215fdeb3fe77f8a8ee46818 100644
|
||||
index 093c60df0948fd1a46aef86223ecc63bc9e8b440..7cbb74f4bc7b63af86b7b2c52783fb20c7739258 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -853,14 +853,14 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@ -13,7 +13,7 @@ index 183866636eb67f632728a01c8e5e11b514d89f84..007a5c9a6dc70ca6a215fdeb3fe77f8a
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
||||
- int i = this.getType().getCategory().getDespawnDistance();
|
||||
+ int i = this.level().paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).hard(); // Paper - custom despawn distances
|
||||
+ int i = this.level().paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).hard(); // Paper - Configurable despawn distances
|
||||
int j = i * i;
|
||||
|
||||
if (d0 > (double) j && this.removeWhenFarAway(d0)) {
|
||||
@ -21,7 +21,7 @@ index 183866636eb67f632728a01c8e5e11b514d89f84..007a5c9a6dc70ca6a215fdeb3fe77f8a
|
||||
}
|
||||
|
||||
- int k = this.getType().getCategory().getNoDespawnDistance();
|
||||
+ int k = this.level().paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).soft(); // Paper - custom despawn distances
|
||||
+ int k = this.level().paperConfig().entities.spawning.despawnRanges.get(this.getType().getCategory()).soft(); // Paper - Configurable despawn distances
|
||||
int l = k * k;
|
||||
|
||||
if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
|
@ -5,14 +5,14 @@ Subject: [PATCH] Allow for toggling of spawn chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 2922b90241e81245dbd56c53ab2eb661314c04fd..9369e0346a6b511a332d54577c781c3d2c2b5c86 100644
|
||||
index d3a7de8d3fd92d36d3df257cae5686fc7f61d3c3..0d3ce1ad077128585bb8960d2d6d38b567bbe5d3 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -264,6 +264,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
});
|
||||
// CraftBukkit end
|
||||
this.timings = new co.aikar.timings.WorldTimingsHandler(this); // Paper - code below can generate new world and access timings
|
||||
+ this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper
|
||||
+ this.keepSpawnInMemory = this.paperConfig().spawn.keepSpawnLoaded; // Paper - Option to keep spawn chunks loaded
|
||||
this.entityLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.entityMaxTickTime);
|
||||
this.tileLimiter = new org.spigotmc.TickLimiter(this.spigotConfig.tileMaxTickTime);
|
||||
}
|
||||
|
@ -6,14 +6,14 @@ Subject: [PATCH] Drop falling block and tnt entities at the specified height
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index d344b13e3726f0fe8a57c098769d1beea9705cdd..5d09790876c3c50d126678565001645f6aece16f 100644
|
||||
index d344b13e3726f0fe8a57c098769d1beea9705cdd..67088152004caeecf4a678618be19419862e7ff1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -142,6 +142,16 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
+ // Paper start - Configurable EntityFallingBlock height nerf
|
||||
+ // Paper start - Configurable falling blocks height nerf
|
||||
+ if (this.level().paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
|
||||
+ if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
+ this.spawnAtLocation(block);
|
||||
@ -22,41 +22,41 @@ index d344b13e3726f0fe8a57c098769d1beea9705cdd..5d09790876c3c50d126678565001645f
|
||||
+ this.discard();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable falling blocks height nerf
|
||||
if (!this.level().isClientSide) {
|
||||
BlockPos blockposition = this.blockPosition();
|
||||
boolean flag = this.blockState.getBlock() instanceof ConcretePowderBlock;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 36d93ee421406302c05945db17d46b04b485e4c0..f08c021f867c00611139a17db48352944eb2aa99 100644
|
||||
index 36d93ee421406302c05945db17d46b04b485e4c0..19e2f2005bd1fb4d199debd34e92a0794a3d3fe4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -77,6 +77,12 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
+ // Paper start - Configurable TNT entity height nerf
|
||||
+ // Paper start - Configurable TNT height nerf
|
||||
+ if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
|
||||
+ this.discard();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable TNT height nerf
|
||||
this.setDeltaMovement(this.getDeltaMovement().scale(0.98D));
|
||||
if (this.onGround()) {
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.7D, -0.5D, 0.7D));
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
index 0fc58f38bbd855414ad36b682e60b069d7b68cb1..9ec8821cf6571c5cc6b32212fe6f33bc4f6b949f 100644
|
||||
index 0fc58f38bbd855414ad36b682e60b069d7b68cb1..48f531da21fa0305ab1e8d5b50276e61e3155a38 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/vehicle/MinecartTNT.java
|
||||
@@ -53,6 +53,12 @@ public class MinecartTNT extends AbstractMinecart {
|
||||
public void tick() {
|
||||
super.tick();
|
||||
if (this.fuse > 0) {
|
||||
+ // Paper start - Configurable TNT entity height nerf
|
||||
+ // Paper start - Configurable TNT height nerf
|
||||
+ if (this.level().paperConfig().fixes.tntEntityHeightNerf.test(v -> this.getY() > v)) {
|
||||
+ this.discard();
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable TNT height nerf
|
||||
--this.fuse;
|
||||
this.level().addParticle(ParticleTypes.SMOKE, this.getX(), this.getY() + 0.5D, this.getZ(), 0.0D, 0.0D, 0.0D);
|
||||
} else if (this.fuse == 0) {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Show 'Paper' in client crashes, server lists, and Mojang
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index cfab6bdf3c3eaf456b60653377df05fcf74c53e3..0c3a23502ab6cb9e1f027b1050dd6849ceb181d9 100644
|
||||
index 75b39c8a8471bc37add3a012453c74217357535a..44715334bc69cc9b12f53cecb64381b8aef6fae3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1546,7 +1546,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -14,7 +14,7 @@ index cfab6bdf3c3eaf456b60653377df05fcf74c53e3..0c3a23502ab6cb9e1f027b1050dd6849
|
||||
@DontObfuscate
|
||||
public String getServerModName() {
|
||||
- return "Spigot"; // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||
+ return "Paper"; // Paper - Paper > // Spigot - Spigot > // CraftBukkit - cb > vanilla!
|
||||
+ return "Paper"; // Paper
|
||||
}
|
||||
|
||||
public SystemReport fillSystemReport(SystemReport details) {
|
||||
@ -32,7 +32,7 @@ index c41e0fe3421a9066a4a32e74fcc3a414d7006bbd..452fcc1106e25db87c1dd29fb839c45c
|
||||
private final String bukkitVersion = Versioning.getBukkitVersion();
|
||||
private final Logger logger = Logger.getLogger("Minecraft");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 3436351140383f53404d37b8f974181724d13627..bf6ee9f7613e76daba9db4089d13a1f189d093b4 100644
|
||||
index c312c450055965d63db0ccdee8aa8e34e7051d0b..9f4c5a6f22719ae30d88ca02a1db4a3f39957943 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -241,12 +241,25 @@ public class Main {
|
||||
@ -57,7 +57,7 @@ index 3436351140383f53404d37b8f974181724d13627..bf6ee9f7613e76daba9db4089d13a1f1
|
||||
+ } else {
|
||||
+ System.out.println("Unable to read system info");
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Log Java and OS versioning to help with debugging plugin issues
|
||||
+
|
||||
System.out.println("Loading libraries, please wait...");
|
||||
net.minecraft.server.Main.main(options);
|
||||
|
@ -5,23 +5,23 @@ Subject: [PATCH] Player affects spawning API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..170fbb1d80947b9b21c2106497baae5c37bcdc0c 100644
|
||||
index 3126e8cab3c40e3af47f4c8925e1c6a9523309ba..3207166061bf9c4d7bf3f38e5a9f7aff23ccd5c1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
@@ -30,6 +30,11 @@ public final class EntitySelector {
|
||||
public static final Predicate<Entity> CAN_BE_COLLIDED_WITH = EntitySelector.NO_SPECTATORS.and(Entity::canBeCollidedWith);
|
||||
|
||||
private EntitySelector() {}
|
||||
+ // Paper start
|
||||
+ // Paper start - Affects Spawning API
|
||||
+ public static final Predicate<Entity> PLAYER_AFFECTS_SPAWNING = (entity) -> {
|
||||
+ return !entity.isSpectator() && entity.isAlive() && entity instanceof Player player && player.affectsSpawning;
|
||||
+ };
|
||||
+ // Paper end
|
||||
+ // Paper end - Affects Spawning API
|
||||
|
||||
public static Predicate<Entity> withinDistance(double x, double y, double z, double max) {
|
||||
double d4 = max * max;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 007a5c9a6dc70ca6a215fdeb3fe77f8a8ee46818..3d054cfa5050f4b75eab4a18035655c1bfd9290b 100644
|
||||
index 7cbb74f4bc7b63af86b7b2c52783fb20c7739258..3fcd93f6d5a7553b032b44e7e919838ad2120dc9 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -849,7 +849,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@ -29,7 +29,7 @@ index 007a5c9a6dc70ca6a215fdeb3fe77f8a8ee46818..3d054cfa5050f4b75eab4a18035655c1
|
||||
this.discard();
|
||||
} else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
|
||||
- Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
|
||||
+ Player entityhuman = this.level().findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper
|
||||
+ Player entityhuman = this.level().findNearbyPlayer(this, -1.0D, EntitySelector.PLAYER_AFFECTS_SPAWNING); // Paper - Affects Spawning API
|
||||
|
||||
if (entityhuman != null) {
|
||||
double d0 = entityhuman.distanceToSqr((Entity) this);
|
||||
@ -60,7 +60,7 @@ index 96181e8925aef7f3d0a2010305caf1f6d9bcfcc9..6f452605e9dc9ebd9980eae9fdeea344
|
||||
return false;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Zombie.java b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
index 38403a5bb8569f105056d61ca444d6b3a19becd2..2aec8e2f45fe6ba56d84e5a51a6e30d36505df42 100644
|
||||
index a779d32f87b59f347408974e402fad22fdc47f09..15ccde8ee8bac1f70c6047464595aff6db073646 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/monster/Zombie.java
|
||||
@@ -326,7 +326,7 @@ public class Zombie extends Monster {
|
||||
@ -73,16 +73,14 @@ index 38403a5bb8569f105056d61ca444d6b3a19becd2..2aec8e2f45fe6ba56d84e5a51a6e30d3
|
||||
entityzombie.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(entityzombie.blockPosition()), MobSpawnType.REINFORCEMENT, (SpawnGroupData) null, (CompoundTag) null);
|
||||
worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index eed6481bc88ed15a5e3fe7056b545ab44ed81983..86d187cadb73dbe0757f9417c4549e358ff303ca 100644
|
||||
index eed6481bc88ed15a5e3fe7056b545ab44ed81983..f8d3e195c094ff200c0a7bd8cd4829ef36d328da 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -179,6 +179,9 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -179,6 +179,7 @@ public abstract class Player extends LivingEntity {
|
||||
@Nullable
|
||||
public FishingHook fishing;
|
||||
protected float hurtDir;
|
||||
+ // Paper start
|
||||
+ public boolean affectsSpawning = true;
|
||||
+ // Paper end
|
||||
+ public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
|
||||
// CraftBukkit start
|
||||
public boolean fauxSleeping;
|
||||
@ -100,18 +98,18 @@ index d156f7e3430685947d2b4c30aa867e8002ca70ad..e888cf862662ae6baa6d0de8188aa74a
|
||||
|
||||
public void clientTick(Level world, BlockPos pos) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/EntityGetter.java b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..36d793b492d9776ee36f8285b5bab09e6463cdce 100644
|
||||
index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..1872de0804862be1986b4eb2e6cfe28f952fdde6 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -82,6 +82,11 @@ public interface EntityGetter {
|
||||
}
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Affects Spawning API
|
||||
+ default @Nullable Player findNearbyPlayer(Entity entity, double maxDistance, @Nullable Predicate<Entity> predicate) {
|
||||
+ return this.getNearestPlayer(entity.getX(), entity.getY(), entity.getZ(), maxDistance, predicate);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Affects Spawning API
|
||||
@Nullable
|
||||
default Player getNearestPlayer(double x, double y, double z, double maxDistance, @Nullable Predicate<Entity> targetPredicate) {
|
||||
double d = -1.0D;
|
||||
@ -119,7 +117,7 @@ index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..36d793b492d9776ee36f8285b5bab09e
|
||||
return this.getNearestPlayer(x, y, z, maxDistance, predicate);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
+ // Paper start - Affects Spawning API
|
||||
+ default boolean hasNearbyAlivePlayerThatAffectsSpawning(double x, double y, double z, double range) {
|
||||
+ for (Player player : this.players()) {
|
||||
+ if (EntitySelector.PLAYER_AFFECTS_SPAWNING.test(player)) { // combines NO_SPECTATORS and LIVING_ENTITY_STILL_ALIVE with an "affects spawning" check
|
||||
@ -131,7 +129,7 @@ index 2ec2b1d9d987c7f31c685aec3d3c87f42758c94b..36d793b492d9776ee36f8285b5bab09e
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Affects Spawning API
|
||||
+
|
||||
default boolean hasNearbyAlivePlayer(double x, double y, double z, double range) {
|
||||
for(Player player : this.players()) {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Only refresh abilities if needed
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index c6c4a50bc9d8dbba4c8e5980417e93e190f25d42..9f1ab39b333ef51ed41a80d5d513a7c1d30d92f9 100644
|
||||
index e1647bc92cc3a7e887cacb8d204ffb120114ff05..7aa9787b96862e427cfd0011bccc0895b0c8f4cd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -1984,12 +1984,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
@ -5,10 +5,10 @@ Subject: [PATCH] fix ItemMeta removing CustomModelData
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index b2f9a670c5224fb63081466fa594b2b4b3e8bddb..95c75aadea68e9b60caa935a88f2829e36948ae5 100644
|
||||
index fcef34d7c88f7f8e21f9789ce3d0962e64d2f092..814c4cf3f3b0fee53cbad9855525fb18e6631748 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -381,7 +381,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -353,7 +353,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
}
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Entity Origin API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index ded164bbc983a058c944ebf43d2f46f3deeb59da..9c6e9d628765fe8aaf0a275a57cede21d40fad23 100644
|
||||
index ded164bbc983a058c944ebf43d2f46f3deeb59da..ef26da06b13254b2b745e7e62540f78615c81252 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2403,6 +2403,15 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
+ // Paper start - Set origin location when the entity is being added to the world
|
||||
+ // Paper start - Entity origin API
|
||||
+ if (entity.getOriginVector() == null) {
|
||||
+ entity.setOrigin(entity.getBukkitEntity().getLocation());
|
||||
+ }
|
||||
@ -20,29 +20,29 @@ index ded164bbc983a058c944ebf43d2f46f3deeb59da..9c6e9d628765fe8aaf0a275a57cede21
|
||||
+ if (entity.getOriginWorld() == null) {
|
||||
+ entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Entity origin API
|
||||
}
|
||||
|
||||
public void onTrackingEnd(Entity entity) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..37eab94ce7e4ba01c2c8a5fb15ef1f6ef314ccc9 100644
|
||||
index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..3afb2a7b02e10976eca5bcd9cf9f29223326a1cd 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -319,7 +319,27 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
+ // Paper start
|
||||
+ // Paper start - Entity origin API
|
||||
+ @javax.annotation.Nullable
|
||||
+ private org.bukkit.util.Vector origin;
|
||||
+ @javax.annotation.Nullable
|
||||
+ private UUID originWorld;
|
||||
+
|
||||
|
||||
+ public void setOrigin(@javax.annotation.Nonnull Location location) {
|
||||
+ this.origin = location.toVector();
|
||||
+ this.originWorld = location.getWorld().getUID();
|
||||
+ }
|
||||
|
||||
+
|
||||
+ @javax.annotation.Nullable
|
||||
+ public org.bukkit.util.Vector getOriginVector() {
|
||||
+ return this.origin != null ? this.origin.clone() : null;
|
||||
@ -52,7 +52,7 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..37eab94ce7e4ba01c2c8a5fb15ef1f6e
|
||||
+ public UUID getOriginWorld() {
|
||||
+ return this.originWorld;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Entity origin API
|
||||
public float getBukkitYaw() {
|
||||
return this.yRot;
|
||||
}
|
||||
@ -60,7 +60,7 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..37eab94ce7e4ba01c2c8a5fb15ef1f6e
|
||||
this.bukkitEntity.storeBukkitValues(nbttagcompound);
|
||||
}
|
||||
// CraftBukkit end
|
||||
+ // Paper start - Save the entity's origin location
|
||||
+ // Paper start
|
||||
+ if (this.origin != null) {
|
||||
+ UUID originWorld = this.originWorld != null ? this.originWorld : this.level != null ? this.level.getWorld().getUID() : null;
|
||||
+ if (originWorld != null) {
|
||||
@ -76,7 +76,7 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..37eab94ce7e4ba01c2c8a5fb15ef1f6e
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
+ // Paper start - Restore the entity's origin location
|
||||
+ // Paper start
|
||||
+ ListTag originTag = nbt.getList("Paper.Origin", net.minecraft.nbt.Tag.TAG_DOUBLE);
|
||||
+ if (!originTag.isEmpty()) {
|
||||
+ UUID originWorld = null;
|
||||
@ -93,44 +93,6 @@ index 80affc349b03d3eba394b6d882d29efb4bbbf4a2..37eab94ce7e4ba01c2c8a5fb15ef1f6e
|
||||
} catch (Throwable throwable) {
|
||||
CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
|
||||
CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index 5d09790876c3c50d126678565001645f6aece16f..6c4224e4752b655710c5b992d9acf9563b183483 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -343,6 +343,14 @@ public class FallingBlockEntity extends Entity {
|
||||
this.blockState = Blocks.SAND.defaultBlockState();
|
||||
}
|
||||
|
||||
+ // Paper start - Try and load origin location from the old NBT tags for backwards compatibility
|
||||
+ if (nbt.contains("SourceLoc_x")) {
|
||||
+ int srcX = nbt.getInt("SourceLoc_x");
|
||||
+ int srcY = nbt.getInt("SourceLoc_y");
|
||||
+ int srcZ = nbt.getInt("SourceLoc_z");
|
||||
+ this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ));
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index f08c021f867c00611139a17db48352944eb2aa99..5c3b86e2301079e775971aa4da6a8f2dc6a40d1f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -132,6 +132,14 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
this.setBlockState(NbtUtils.readBlockState(this.level().holderLookup(Registries.BLOCK), nbt.getCompound("block_state")));
|
||||
}
|
||||
|
||||
+ // Paper start - Try and load origin location from the old NBT tags for backwards compatibility
|
||||
+ if (nbt.contains("SourceLoc_x")) {
|
||||
+ int srcX = nbt.getInt("SourceLoc_x");
|
||||
+ int srcY = nbt.getInt("SourceLoc_y");
|
||||
+ int srcZ = nbt.getInt("SourceLoc_z");
|
||||
+ this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ));
|
||||
+ }
|
||||
+ // Paper end
|
||||
}
|
||||
|
||||
@Nullable
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
index e269812e6193492afc3f25612edafa1a58325fa3..49294a8d580d891f21d8d4cbae14ae477c01ff8d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
||||
|
@ -1,11 +1,11 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Tue, 1 Mar 2016 23:52:34 -0600
|
||||
Subject: [PATCH] Prevent tile entity and entity crashes
|
||||
Subject: [PATCH] Prevent block entity and entity crashes
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 6818173e3f798b4d89a17c6934020cc929ec5e4e..5315def7ff7ba0be6c09be86453284f3aed29576 100644
|
||||
index 0d3ce1ad077128585bb8960d2d6d38b567bbe5d3..99133791afe8a8b5edfbe45eadfa3e0f4e4484a7 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -739,11 +739,11 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -17,16 +17,16 @@ index 6818173e3f798b4d89a17c6934020cc929ec5e4e..5315def7ff7ba0be6c09be86453284f3
|
||||
-
|
||||
- entity.fillCrashReportCategory(crashreportsystemdetails);
|
||||
- throw new ReportedException(crashreport);
|
||||
+ // Paper start - Prevent tile entity and entity crashes
|
||||
+ // Paper start - Prevent block entity and entity crashes
|
||||
+ final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
+ MinecraftServer.LOGGER.error(msg, throwable);
|
||||
+ entity.discard();
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent block entity and entity crashes
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309297c2055 100644
|
||||
index b300d12e9e00519028b53aca9c3fb01f589eaa91..66757716b401d4f5b690c895effbbaa46f169238 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -213,7 +213,12 @@ public abstract class BlockEntity {
|
||||
@ -34,17 +34,17 @@ index b300d12e9e00519028b53aca9c3fb01f589eaa91..63acd109a79ed752a05df3d4f1b99309
|
||||
});
|
||||
if (this.level != null) {
|
||||
- CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.getBlockState());
|
||||
+ // Paper start - Prevent TileEntity and Entity crashes
|
||||
+ // Paper start - Prevent block entity and entity crashes
|
||||
+ BlockState block = this.getBlockState();
|
||||
+ if (block != null) {
|
||||
+ CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, block);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent block entity and entity crashes
|
||||
CrashReportCategory.populateBlockDetails(crashReportSection, this.level, this.worldPosition, this.level.getBlockState(this.worldPosition));
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index a664126bbcd29026e9d6770e362aa04c2c0b3fc8..92ae6e100cd70772dfc781bb630f41e94f0cdd06 100644
|
||||
index a664126bbcd29026e9d6770e362aa04c2c0b3fc8..ae62ef9bad1774cc6aecb686660ef19244bd1365 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1159,11 +1159,11 @@ public class LevelChunk extends ChunkAccess {
|
||||
@ -56,11 +56,11 @@ index a664126bbcd29026e9d6770e362aa04c2c0b3fc8..92ae6e100cd70772dfc781bb630f41e9
|
||||
-
|
||||
- this.blockEntity.fillCrashReportCategory(crashreportsystemdetails);
|
||||
- throw new ReportedException(crashreport);
|
||||
+ // Paper start - Prevent tile entity and entity crashes
|
||||
+ // Paper start - Prevent block entity and entity crashes
|
||||
+ final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
+ net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
+ LevelChunk.this.removeBlockEntity(this.getPos());
|
||||
+ // Paper end
|
||||
+ // Paper end - Prevent block entity and entity crashes
|
||||
// Spigot start
|
||||
} finally {
|
||||
this.blockEntity.tickTimer.stopTiming();
|
@ -6,7 +6,7 @@ Subject: [PATCH] Configurable top of nether void damage
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 37eab94ce7e4ba01c2c8a5fb15ef1f6ef314ccc9..16fa26878fc7bcf5d22d779ce7b37a59582ba033 100644
|
||||
index 3afb2a7b02e10976eca5bcd9cf9f29223326a1cd..47dc48fcf1e0d3a717479ce2738bfb79961bbed3 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -722,7 +722,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -18,12 +18,12 @@ index 37eab94ce7e4ba01c2c8a5fb15ef1f6ef314ccc9..16fa26878fc7bcf5d22d779ce7b37a59
|
||||
+ if (this.getY() < (double) (this.level.getMinBuildHeight() - 64) || (this.level.getWorld().getEnvironment() == org.bukkit.World.Environment.NETHER
|
||||
+ && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
||||
+ && (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable nether ceiling damage
|
||||
this.onBelowWorld();
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
index 02e3322ec41108fe9275510e2daa833d180353dc..0762bb248b3bd43a06e89aa1893a6189f0e13866 100644
|
||||
index 02e3322ec41108fe9275510e2daa833d180353dc..550b7bc694d861c084769265f6c49c4d44033296 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/portal/PortalForcer.java
|
||||
@@ -55,7 +55,7 @@ public class PortalForcer {
|
||||
@ -31,7 +31,7 @@ index 02e3322ec41108fe9275510e2daa833d180353dc..0762bb248b3bd43a06e89aa1893a6189
|
||||
return holder.is(PoiTypes.NETHER_PORTAL);
|
||||
}, blockposition, i, PoiManager.Occupancy.ANY).filter((villageplacerecord) -> {
|
||||
- return worldborder.isWithinBounds(villageplacerecord.getPos());
|
||||
+ return worldborder.isWithinBounds(villageplacerecord.getPos()) && !(this.level.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> villageplacerecord.getPos().getY() >= v)); // Paper - don't teleport into void damage
|
||||
+ return worldborder.isWithinBounds(villageplacerecord.getPos()) && !(this.level.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> villageplacerecord.getPos().getY() >= v)); // Paper - Configurable nether ceiling damage
|
||||
}).sorted(Comparator.comparingDouble((PoiRecord villageplacerecord) -> { // CraftBukkit - decompile error
|
||||
return villageplacerecord.getPos().distSqr(blockposition);
|
||||
}).thenComparingInt((villageplacerecord) -> {
|
||||
@ -39,11 +39,11 @@ index 02e3322ec41108fe9275510e2daa833d180353dc..0762bb248b3bd43a06e89aa1893a6189
|
||||
BlockPos blockposition2 = null;
|
||||
WorldBorder worldborder = this.level.getWorldBorder();
|
||||
int i = Math.min(this.level.getMaxBuildHeight(), this.level.getMinBuildHeight() + this.level.getLogicalHeight()) - 1;
|
||||
+ // Paper start - if ceiling void damage is enabled, make sure the max height doesn't exceed the void damage height
|
||||
+ // Paper start - Configurable nether ceiling damage; make sure the max height doesn't exceed the void damage height
|
||||
+ if (this.level.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER && this.level.paperConfig().environment.netherCeilingVoidDamageHeight.enabled()) {
|
||||
+ i = Math.min(i, this.level.paperConfig().environment.netherCeilingVoidDamageHeight.intValue() - 1);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable nether ceiling damage
|
||||
BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable();
|
||||
Iterator iterator = BlockPos.spiralAround(blockposition, createRadius, Direction.EAST, Direction.SOUTH).iterator(); // CraftBukkit
|
||||
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Configurable end credits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index b6939932a4b8800c8751125a4a6d4dcea39110c1..bf89ea0f7506434848cb9c1cbfb3fe6dd2eb3212 100644
|
||||
index 682388297375ea43515388bbdf9f7d2b949a7a62..11d2a3fd4e7baa00276f358c9b97752dbc6a76fd 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1074,6 +1074,7 @@ public class ServerPlayer extends Player {
|
||||
this.unRide();
|
||||
this.serverLevel().removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
|
||||
if (!this.wonGame) {
|
||||
+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Toggle to always disable end credits
|
||||
+ if (this.level().paperConfig().misc.disableEndCredits) this.seenCredits = true; // Paper - Option to disable end credits
|
||||
this.wonGame = true;
|
||||
this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.WIN_GAME, this.seenCredits ? 0.0F : 1.0F));
|
||||
this.seenCredits = true;
|
||||
|
@ -10,10 +10,10 @@ This patch adds a per-tick cache that is used for storing and retrieving
|
||||
an entity's exposure during an explosion.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 21fc0ce46567d7bd7f24759779f8586efe72fc9f..8072eedb5bc699aa5b04fbca39f4db30534cde4b 100644
|
||||
index 44715334bc69cc9b12f53cecb64381b8aef6fae3..bb66ed2fa4bbf4e8836022b210ca754b821adf95 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1479,6 +1479,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1420,6 +1420,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
this.profiler.pop();
|
||||
this.profiler.pop();
|
||||
@ -120,7 +120,7 @@ index c5d644876e0c92a444a574ee7571227e19b28482..4e382cfae7a3a1889bc36bad24c6ea38
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 05b07a2f0b693f10da66eb51d332436caff9f9c6..4e43a957b000f852ea889ead0eb213eedaf57a5a 100644
|
||||
index 99133791afe8a8b5edfbe45eadfa3e0f4e4484a7..6c1fe1f24f79c28508e41c55d34b7a5c6c8f5d28 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -170,6 +170,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Disable explosion knockback
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
index 4e382cfae7a3a1889bc36bad24c6ea38b7eb14a6..e59348b849a71ff5eba5bd74a9e2819a560787db 100644
|
||||
index 4e382cfae7a3a1889bc36bad24c6ea38b7eb14a6..219f3abc6d3280077b53cfff97db7e724133f5a1 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Explosion.java
|
||||
@@ -285,7 +285,7 @@ public class Explosion {
|
||||
@ -13,7 +13,7 @@ index 4e382cfae7a3a1889bc36bad24c6ea38b7eb14a6..e59348b849a71ff5eba5bd74a9e2819a
|
||||
LivingEntity entityliving = (LivingEntity) entity;
|
||||
|
||||
- d13 = ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12);
|
||||
+ d13 = entity instanceof Player && level.paperConfig().environment.disableExplosionKnockback ? 0 : ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12); // Paper - disable explosion knockback
|
||||
+ d13 = entity instanceof Player && level.paperConfig().environment.disableExplosionKnockback ? 0 : ProtectionEnchantment.getExplosionKnockbackAfterDampener(entityliving, d12); // Paper - Option to disable explosion knockback
|
||||
} else {
|
||||
d13 = d12;
|
||||
}
|
||||
@ -22,7 +22,7 @@ index 4e382cfae7a3a1889bc36bad24c6ea38b7eb14a6..e59348b849a71ff5eba5bd74a9e2819a
|
||||
Player entityhuman = (Player) entity;
|
||||
|
||||
- if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.getAbilities().flying)) {
|
||||
+ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.getAbilities().flying) && !level.paperConfig().environment.disableExplosionKnockback) { // Paper - Disable explosion knockback
|
||||
+ if (!entityhuman.isSpectator() && (!entityhuman.isCreative() || !entityhuman.getAbilities().flying) && !level.paperConfig().environment.disableExplosionKnockback) { // Paper - Option to disable explosion knockback
|
||||
this.hitPlayers.put(entityhuman, vec3d1);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Disable thunder
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 88e9f55c50d2952df9c3b19cf95025c20ade9ffc..11a829cc28e01f083c4669a8a28e377b96c3db0a 100644
|
||||
index ef26da06b13254b2b745e7e62540f78615c81252..6a3caf6107430e210ee1e689af2cd6d44d9c3713 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -846,7 +846,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -13,7 +13,7 @@ index 88e9f55c50d2952df9c3b19cf95025c20ade9ffc..11a829cc28e01f083c4669a8a28e377b
|
||||
|
||||
gameprofilerfiller.push("thunder");
|
||||
- if (flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot
|
||||
+ if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - disable thunder
|
||||
+ if (!this.paperConfig().environment.disableThunder && flag && this.isThundering() && this.spigotConfig.thunderChance > 0 && this.random.nextInt(this.spigotConfig.thunderChance) == 0) { // Spigot // Paper - Option to disable thunder
|
||||
BlockPos blockposition = this.findLightningTargetAround(this.getBlockRandomPos(j, 0, k, 15));
|
||||
|
||||
if (this.isRainingAt(blockposition)) {
|
||||
|
@ -5,20 +5,20 @@ Subject: [PATCH] Disable ice and snow
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 11a829cc28e01f083c4669a8a28e377b96c3db0a..f1b34765b436461f09e8b9122cb981e319684838 100644
|
||||
index 6a3caf6107430e210ee1e689af2cd6d44d9c3713..a09299befdab37bfd3ceb42f9608e285eae5fde6 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -876,11 +876,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
||||
gameprofilerfiller.popPush("iceandsnow");
|
||||
|
||||
+ if (!this.paperConfig().environment.disableIceAndSnow) { // Paper
|
||||
+ if (!this.paperConfig().environment.disableIceAndSnow) { // Paper - Option to disable ice and snow
|
||||
for (int l = 0; l < randomTickSpeed; ++l) {
|
||||
if (this.random.nextInt(48) == 0) {
|
||||
this.tickPrecipitation(this.getBlockRandomPos(j, 0, k, 15));
|
||||
}
|
||||
}
|
||||
+ } // Paper
|
||||
+ } // Paper - Option to disable ice and snow
|
||||
|
||||
gameprofilerfiller.popPush("tickBlocks");
|
||||
timings.chunkTicksBlocks.startTiming(); // Paper
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Configurable mob spawner tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index e888cf862662ae6baa6d0de8188aa74a9c6a8e00..bd48f49d50709354abc5bcff155b5abb9ab20191 100644
|
||||
index e888cf862662ae6baa6d0de8188aa74a9c6a8e00..a46293dafeb73f9206b92a2850df18a6a5f688b4 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -47,6 +47,7 @@ public abstract class BaseSpawner {
|
||||
public int maxNearbyEntities = 6;
|
||||
public int requiredPlayerRange = 16;
|
||||
public int spawnRange = 4;
|
||||
+ private int tickDelay = 0; // Paper
|
||||
+ private int tickDelay = 0; // Paper - Configurable mob spawner tick rate
|
||||
|
||||
public BaseSpawner() {}
|
||||
|
||||
@ -24,16 +24,16 @@ index e888cf862662ae6baa6d0de8188aa74a9c6a8e00..bd48f49d50709354abc5bcff155b5abb
|
||||
+ if (spawnDelay > 0 && --tickDelay > 0) return;
|
||||
+ tickDelay = world.paperConfig().tickRates.mobSpawner;
|
||||
+ if (tickDelay == -1) { return; } // If disabled
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable mob spawner tick rate
|
||||
if (this.isNearPlayer(world, pos)) {
|
||||
- if (this.spawnDelay == -1) {
|
||||
+ if (this.spawnDelay < -tickDelay) {
|
||||
+ if (this.spawnDelay < -tickDelay) { // Paper - Configurable mob spawner tick rate
|
||||
this.delay(world, pos);
|
||||
}
|
||||
|
||||
if (this.spawnDelay > 0) {
|
||||
- --this.spawnDelay;
|
||||
+ this.spawnDelay -= tickDelay; // Paper
|
||||
+ this.spawnDelay -= tickDelay; // Paper - Configurable mob spawner tick rate
|
||||
} else {
|
||||
boolean flag = false;
|
||||
RandomSource randomsource = world.getRandom();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add BeaconEffectEvent
|
||||
|
||||
|
||||
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 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..18349957bd6d1a4bc21aff781a791f912dddff1d 100644
|
||||
index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..f4e1dc338dd240371694dd7a3455c79d5cea251a 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
|
||||
@@ -43,6 +43,10 @@ import net.minecraft.world.phys.AABB;
|
||||
@ -33,7 +33,7 @@ index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..18349957bd6d1a4bc21aff781a791f91
|
||||
+ // Paper start - BeaconEffectEvent
|
||||
+ org.bukkit.block.Block block = ((Player) list.get(0)).level().getWorld().getBlockAt(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
|
||||
+ PotionEffect effect = CraftPotionUtil.toBukkit(new MobEffectInstance(effects, i, b0, true, true));
|
||||
+ // Paper end
|
||||
+ // Paper end - BeaconEffectEvent
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
- entityhuman = (Player) iterator.next();
|
||||
@ -43,7 +43,7 @@ index 9fb27f93a7ccbf64f9babf19f626d1f45b1c7103..18349957bd6d1a4bc21aff781a791f91
|
||||
+ BeaconEffectEvent event = new BeaconEffectEvent(block, effect, (org.bukkit.entity.Player) entityhuman.getBukkitEntity(), isPrimary);
|
||||
+ if (CraftEventFactory.callEvent(event).isCancelled()) continue;
|
||||
+ entityhuman.addEffect(new MobEffectInstance(CraftPotionUtil.fromBukkit(event.getEffect())), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
|
||||
+ // Paper end
|
||||
+ // Paper end - BeaconEffectEvent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -5,14 +5,14 @@ Subject: [PATCH] Configurable container update tick rate
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 686b42a9b4475fe3d530a9b950c1cc8f04717a65..d986c09392182335112040d4b6feae6a1a740d84 100644
|
||||
index 94571a63353b014f7aa30d8d0453332265c1d53f..ca511ec40965eb33f1e0e5c257ed9ae4e3d26d62 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -247,6 +247,7 @@ public class ServerPlayer extends Player {
|
||||
private RemoteChatSession chatSession;
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
+ private int containerUpdateDelay; // Paper
|
||||
+ private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@ -26,7 +26,7 @@ index 686b42a9b4475fe3d530a9b950c1cc8f04717a65..d986c09392182335112040d4b6feae6a
|
||||
+ this.containerMenu.broadcastChanges();
|
||||
+ containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
|
||||
+ }
|
||||
+ // Paper end
|
||||
+ // Paper end - Configurable container update tick rate
|
||||
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
this.closeContainer();
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
|
@ -88,7 +88,7 @@ index c6fb4c33d7ea52b88d8fc0d90748cbab7387c565..2b5b2869589991be37a4f128faabbff5
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index f7407f5204a2cbfcc46987d5e0a34770b2e5abbf..813a79866794bad9d0da105345641a6e9136ddf8 100644
|
||||
index 19f1be39c5e245c7e999ade36e53bff8d011dedb..0023f4f4572261e38136d3629cc35679454294f5 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -1,5 +1,10 @@
|
||||
@ -103,12 +103,12 @@ index f7407f5204a2cbfcc46987d5e0a34770b2e5abbf..813a79866794bad9d0da105345641a6e
|
||||
import com.mojang.serialization.Codec;
|
||||
import java.io.IOException;
|
||||
@@ -741,6 +746,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
final String msg = String.format("Entity threw exception at %s:%s,%s,%s", entity.level().getWorld().getName(), entity.getX(), entity.getY(), entity.getZ());
|
||||
MinecraftServer.LOGGER.error(msg, throwable);
|
||||
+ getCraftServer().getPluginManager().callEvent(new ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
|
||||
entity.discard();
|
||||
// Paper end
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/level/NaturalSpawner.java b/src/main/java/net/minecraft/world/level/NaturalSpawner.java
|
||||
index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80651beabe 100644
|
||||
@ -131,7 +131,7 @@ index 5d65baba605dd83e5f74d526aeda36d8ede8c014..604766a286d00bb4b40c20482376fe80
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
index 92ae6e100cd70772dfc781bb630f41e94f0cdd06..40a829fa6b6410c2736af96ef1a46cf589056641 100644
|
||||
index ae62ef9bad1774cc6aecb686660ef19244bd1365..54aed742984809601d64f22ccf5db2d68b3831a2 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunk.java
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -164,12 +164,12 @@ index 92ae6e100cd70772dfc781bb630f41e94f0cdd06..40a829fa6b6410c2736af96ef1a46cf5
|
||||
}
|
||||
}
|
||||
@@ -1162,6 +1169,7 @@ public class LevelChunk extends ChunkAccess {
|
||||
// Paper start - Prevent tile entity and entity crashes
|
||||
// Paper start - Prevent block entity and entity crashes
|
||||
final String msg = String.format("BlockEntity threw exception at %s:%s,%s,%s", LevelChunk.this.getLevel().getWorld().getName(), this.getPos().getX(), this.getPos().getY(), this.getPos().getZ());
|
||||
net.minecraft.server.MinecraftServer.LOGGER.error(msg, throwable);
|
||||
+ net.minecraft.world.level.chunk.LevelChunk.this.level.getCraftServer().getPluginManager().callEvent(new com.destroystokyo.paper.event.server.ServerExceptionEvent(new ServerInternalException(msg, throwable))); // Paper - ServerExceptionEvent
|
||||
LevelChunk.this.removeBlockEntity(this.getPos());
|
||||
// Paper end
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
// Spigot start
|
||||
diff --git a/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java b/src/main/java/net/minecraft/world/level/chunk/storage/RegionFile.java
|
||||
index 5103081e8469dd5a393595eae00c6f6c9d0a5028..9623a7bac79af37016ba5a5b37d4ef0b3dcb7312 100644
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c893e7ed3d5db0de6a248f924a4f6f747fc71f00..b88ad110166915173d32fd00dd6bf8b22009b601 100644
|
||||
index 41422f3a54e5ee749b7389bfe761b4430e24f274..f03bacff1963650327bc94664b1ac00eb12d362d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2720,5 +2720,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2709,5 +2709,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Only process BlockPhysicsEvent if a plugin has a listener
|
||||
Saves on some object allocation and processing when no plugin listens to this
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1c0238932eec690d369dc9d55069f8b6aa15ada3..53a135f9f61a29ddfff5aa7eb20b96a2f0fc1fdf 100644
|
||||
index bb66ed2fa4bbf4e8836022b210ca754b821adf95..b7854ac5fc753302cf1ab171c561e073cc2fb3e3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1447,6 +1447,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1388,6 +1388,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
@ -18,7 +18,7 @@ index 1c0238932eec690d369dc9d55069f8b6aa15ada3..53a135f9f61a29ddfff5aa7eb20b96a2
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 817e0ddc8821dd112fc5aa72bbbe11fdd1b56488..181a4e0e44cd05528c66ce87b653c33d6bd2fd03 100644
|
||||
index 6283b7ef17a7c128efb24206fe4f7201fcc48a3e..b389c99d6c19f4d63a3bf220aa165052ea28bf7d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -221,6 +221,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -30,7 +30,7 @@ index 817e0ddc8821dd112fc5aa72bbbe11fdd1b56488..181a4e0e44cd05528c66ce87b653c33d
|
||||
public LevelChunk getChunkIfLoaded(int x, int z) {
|
||||
return this.chunkSource.getChunk(x, z, false);
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index e8b2e1f45ecd13ac4bfc2c3eb09f2d397b997b78..f711a4ef9168e05c7d795a1a831c608b19cc989c 100644
|
||||
index feaa6e1eaaa8f99f9d68b2da98be63b583e09b68..4f7d59c32db29ac95f237124c19d5a29272c8d42 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -506,7 +506,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Entity AddTo/RemoveFrom World Events
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 181a4e0e44cd05528c66ce87b653c33d6bd2fd03..449f2ebc77a1850fc948bffc66e605f7bdc8efdd 100644
|
||||
index b389c99d6c19f4d63a3bf220aa165052ea28bf7d..31439413aa5ed26b7983ac22fe9ac44786fe0e33 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2415,6 +2415,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
entity.setOrigin(entity.getOriginVector().toLocation(getWorld()));
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Entity origin API
|
||||
+ new com.destroystokyo.paper.event.entity.EntityAddToWorldEvent(entity.getBukkitEntity(), ServerLevel.this.getWorld()).callEvent(); // Paper - fire while valid
|
||||
}
|
||||
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] remove null possibility for getServer singleton
|
||||
to stop IDE complaining about potential NPE
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 9697e189cf79994ed7d231c7801761791c128310..da845f0e07e1541514c60252192d49a85163b1a8 100644
|
||||
index e7e892234d4ff95f628e1c368161345f47fa1efc..b27c991d4b7615d0305d01155c908cfcaa8cd4ab 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -190,6 +190,7 @@ import co.aikar.timings.MinecraftTimings; // Paper
|
||||
@ -25,7 +25,7 @@ index 9697e189cf79994ed7d231c7801761791c128310..da845f0e07e1541514c60252192d49a8
|
||||
this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
|
||||
this.profiler = this.metricsRecorder.getProfiler();
|
||||
this.onMetricsRecordingStopped = (methodprofilerresults) -> {
|
||||
@@ -2420,9 +2422,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2361,9 +2363,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Optional TNT doesn't move in water
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
index 5c3b86e2301079e775971aa4da6a8f2dc6a40d1f..fe51d34f9d764ed4bff4a2a0c566e132dde36e55 100644
|
||||
index 19e2f2005bd1fb4d199debd34e92a0794a3d3fe4..3408337b11f04337bb2f62de343e430d94d3a093 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java
|
||||
@@ -106,6 +106,27 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
@ -36,7 +36,7 @@ index 5c3b86e2301079e775971aa4da6a8f2dc6a40d1f..fe51d34f9d764ed4bff4a2a0c566e132
|
||||
}
|
||||
|
||||
private void explode() {
|
||||
@@ -179,4 +200,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
@@ -171,4 +192,11 @@ public class PrimedTnt extends Entity implements TraceableEntity {
|
||||
public BlockState getBlockState() {
|
||||
return (BlockState) this.entityData.get(PrimedTnt.DATA_BLOCK_STATE_ID);
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 6d45d5f149211eaad9a07019290dac2c3d04084c..c41876842886e85f44e2cc64a2e6a48cf66c3609 100644
|
||||
index ae361c8a5350b1072df5f672a8208a562b6a4312..914e551d7b2bc383c7247f1f584c6ea4f541887f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2746,5 +2746,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2735,5 +2735,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
@ -12,17 +12,17 @@ just as it does in Vanilla, but entity pushing logic will be capped.
|
||||
You can set this to 0 to disable collisions.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 34bd4a3f8639295d4980d2b36fe07e2be0ec0d1e..784ab316b6346f62519b06b0dadafa6ac75d8737 100644
|
||||
index 5a69e9b6872426e94d8b4d7a47790e4fd051f157..5903cbf0b5fe99453c74e2abc4e07415507d70dc 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -393,6 +393,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
+ protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index ed8e0f5ca865dcde73a886e65f0fd1d7d4e7ac05..a799b64e9d655e7eba509e9930e623a88bbb0389 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
|
@ -32,10 +32,10 @@ index 4c689d2a794e53a2d9915f1ba46435c41bfa74e9..03bc7ae947360a721fef5a772ecadb4a
|
||||
case RELEASE_SHIFT_KEY:
|
||||
this.player.setShiftKeyDown(false);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 86d187cadb73dbe0757f9417c4549e358ff303ca..5bac265d9c13da9aceabbd7520cb2ab5fb14b68c 100644
|
||||
index f8d3e195c094ff200c0a7bd8cd4829ef36d328da..a79e0b2d4ba706de0989ef68c87bb29fc1bf08ab 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -589,6 +589,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -587,6 +587,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityLeft());
|
||||
this.playShoulderEntityAmbientSound(this.getShoulderEntityRight());
|
||||
if (!this.level().isClientSide && (this.fallDistance > 0.5F || this.isInWater()) || this.abilities.flying || this.isSleeping() || this.isInPowderSnow) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c41876842886e85f44e2cc64a2e6a48cf66c3609..5189806a847f27e125cab3a5395e30c9d076aa4e 100644
|
||||
index 914e551d7b2bc383c7247f1f584c6ea4f541887f..e5c3ee4c53dd1c09e35f1d1a47f4467a6a06ae71 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2765,5 +2765,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2754,5 +2754,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ index 8323f135d6bf2e1f12525e05094ffa3f2420e7e1..a143ea1e58464a3122fbd8ccafe417bd
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 5ab790ed036215d8b09f63f4f13a32a4af07e1c6..fae34d85f6c3a81f29fa625c78090895d3af31cc 100644
|
||||
index 1aed25e485a45c6bf77f0baebc1a7745f441af5b..1e1c6f8b22da3e51d001db11392f3ea8d3d3573d 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -155,7 +155,7 @@ import org.slf4j.Logger;
|
||||
@ -262,16 +262,15 @@ index 5ab790ed036215d8b09f63f4f13a32a4af07e1c6..fae34d85f6c3a81f29fa625c78090895
|
||||
import joptsimple.OptionSet;
|
||||
import net.minecraft.nbt.NbtException;
|
||||
import net.minecraft.nbt.ReportedNbtException;
|
||||
@@ -284,7 +284,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -284,7 +284,6 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public org.bukkit.craftbukkit.CraftServer server;
|
||||
public OptionSet options;
|
||||
public org.bukkit.command.ConsoleCommandSender console;
|
||||
- public ConsoleReader reader;
|
||||
+ //public ConsoleReader reader; // Paper
|
||||
public static int currentTick = 0; // Paper - Further improve tick loop
|
||||
public static int currentTick = (int) (System.currentTimeMillis() / 50);
|
||||
public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
|
||||
public int autosavePeriod;
|
||||
@@ -370,7 +370,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -370,7 +369,9 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.options = options;
|
||||
this.worldLoader = worldLoader;
|
||||
this.vanillaCommandDispatcher = worldstem.dataPackResources().commands; // CraftBukkit
|
||||
@ -281,7 +280,7 @@ index 5ab790ed036215d8b09f63f4f13a32a4af07e1c6..fae34d85f6c3a81f29fa625c78090895
|
||||
if (System.console() == null && System.getProperty("jline.terminal") == null) {
|
||||
System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
|
||||
Main.useJline = false;
|
||||
@@ -391,6 +393,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -391,6 +392,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
MinecraftServer.LOGGER.warn((String) null, ex);
|
||||
}
|
||||
}
|
||||
@ -290,7 +289,7 @@ index 5ab790ed036215d8b09f63f4f13a32a4af07e1c6..fae34d85f6c3a81f29fa625c78090895
|
||||
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
|
||||
// CraftBukkit end
|
||||
this.paperConfigurations = services.paperConfigurations(); // Paper - add paper configuration files
|
||||
@@ -1172,7 +1176,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1113,7 +1116,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
org.spigotmc.WatchdogThread.doStop(); // Spigot
|
||||
// CraftBukkit start - Restore terminal to original settings
|
||||
try {
|
||||
@ -299,7 +298,7 @@ index 5ab790ed036215d8b09f63f4f13a32a4af07e1c6..fae34d85f6c3a81f29fa625c78090895
|
||||
} catch (Exception ignored) {
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -1675,7 +1679,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1616,7 +1619,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
@Override
|
||||
public void sendSystemMessage(Component message) {
|
||||
@ -387,7 +386,7 @@ index b38496b2a4d10c7f51667fca2a19129ac7db0016..466ca062eaeb9108c59f308a8212cbaf
|
||||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5189806a847f27e125cab3a5395e30c9d076aa4e..cc00ace00dc1050d644312a0289221a5c664170d 100644
|
||||
index e5c3ee4c53dd1c09e35f1d1a47f4467a6a06ae71..44cb33b24fa9d9b8ed42e0fab5b8bd8a3f6ff8ea 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -42,7 +42,7 @@ import java.util.logging.Level;
|
||||
@ -414,7 +413,7 @@ index 5189806a847f27e125cab3a5395e30c9d076aa4e..cc00ace00dc1050d644312a0289221a5
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index faf58b6263f45a3b36014eaf628c2dac23a0ccde..09164f4c446d3e80708f1bcb9da333821ee5733d 100644
|
||||
index 4fb377d967d13ed920ea1246e84b3b94cda25be6..659b32d49016a23475f3bbda1548a78101b468ce 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||
@ -453,12 +452,11 @@ index faf58b6263f45a3b36014eaf628c2dac23a0ccde..09164f4c446d3e80708f1bcb9da33382
|
||||
}
|
||||
|
||||
if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
|
||||
@@ -267,7 +277,7 @@ public class Main {
|
||||
System.out.println("Unable to read system info");
|
||||
@@ -268,6 +278,7 @@ public class Main {
|
||||
}
|
||||
// Paper end
|
||||
-
|
||||
+ System.setProperty( "library.jansi.version", "Paper" ); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows
|
||||
// Paper end - Log Java and OS versioning to help with debugging plugin issues
|
||||
|
||||
+ System.setProperty("library.jansi.version", "Paper"); // Paper - set meaningless jansi version to prevent git builds from crashing on Windows
|
||||
System.out.println("Loading libraries, please wait...");
|
||||
net.minecraft.server.Main.main(options);
|
||||
} catch (Throwable t) {
|
||||
|
@ -612,7 +612,7 @@ index adb472c175cc6f6ced7075a37423d6c898fd5ccb..1ec0f3a7148c2f412421772f6e1dff0b
|
||||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index cc00ace00dc1050d644312a0289221a5c664170d..f06afed5f786aad4415cd369903d97a0912dfac7 100644
|
||||
index 44cb33b24fa9d9b8ed42e0fab5b8bd8a3f6ff8ea..6e5f7936ff7e2838ca88990343e553a6f1213821 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -260,6 +260,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@ -633,7 +633,7 @@ index cc00ace00dc1050d644312a0289221a5c664170d..f06afed5f786aad4415cd369903d97a0
|
||||
CraftItemFactory.instance();
|
||||
}
|
||||
|
||||
@@ -2774,5 +2778,42 @@ public final class CraftServer implements Server {
|
||||
@@ -2763,5 +2767,42 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Shoulder Entities Release API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 5bac265d9c13da9aceabbd7520cb2ab5fb14b68c..08dd71295154395d6de41a97f214157658f0c24b 100644
|
||||
index a79e0b2d4ba706de0989ef68c87bb29fc1bf08ab..2d3c2b2b98b75a0815771a3f9c3bf244091a50b7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1949,20 +1949,45 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1947,20 +1947,45 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
|
@ -5,17 +5,17 @@ Subject: [PATCH] Entity#fromMobSpawner()
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 784ab316b6346f62519b06b0dadafa6ac75d8737..42f8c39fa5f9f31c03d4e7af9fb6b7a842f29aae 100644
|
||||
index 5903cbf0b5fe99453c74e2abc4e07415507d70dc..23f233adc1a3910237bb065a41e5d3d074d5bfd0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -395,6 +395,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -394,6 +394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
+ public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@javax.annotation.Nullable
|
||||
@@ -2202,6 +2203,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
@ -37,7 +37,7 @@ index 784ab316b6346f62519b06b0dadafa6ac75d8737..42f8c39fa5f9f31c03d4e7af9fb6b7a8
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index bd48f49d50709354abc5bcff155b5abb9ab20191..1a5fb001e28997a113ad8133e9dc946206b85c35 100644
|
||||
index a46293dafeb73f9206b92a2850df18a6a5f688b4..487e4211d6486d2b3052c931c27cee9729e7841b 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -167,6 +167,7 @@ public abstract class BaseSpawner {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Send attack SoundEffects only to players who can see the
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 08dd71295154395d6de41a97f214157658f0c24b..5680bc0c9c71f915f66eecae401e8f51dc4225fe 100644
|
||||
index 2d3c2b2b98b75a0815771a3f9c3bf244091a50b7..5fa0e0c5293eda8a368c1801a9b5255807bf078c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1227,7 +1227,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1225,7 +1225,7 @@ public abstract class Player extends LivingEntity {
|
||||
int i = b0 + EnchantmentHelper.getKnockbackBonus(this);
|
||||
|
||||
if (this.isSprinting() && flag) {
|
||||
@ -18,7 +18,7 @@ index 08dd71295154395d6de41a97f214157658f0c24b..5680bc0c9c71f915f66eecae401e8f51
|
||||
++i;
|
||||
flag1 = true;
|
||||
}
|
||||
@@ -1302,7 +1302,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1300,7 +1300,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ index 08dd71295154395d6de41a97f214157658f0c24b..5680bc0c9c71f915f66eecae401e8f51
|
||||
this.sweepAttack();
|
||||
}
|
||||
|
||||
@@ -1330,15 +1330,15 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1328,15 +1328,15 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
if (flag2) {
|
||||
@ -46,7 +46,7 @@ index 08dd71295154395d6de41a97f214157658f0c24b..5680bc0c9c71f915f66eecae401e8f51
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1390,7 +1390,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1388,7 +1388,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
this.causeFoodExhaustion(this.level().spigotConfig.combatExhaustion, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent // Spigot - Change to use configurable value
|
||||
} else {
|
||||
@ -55,7 +55,7 @@ index 08dd71295154395d6de41a97f214157658f0c24b..5680bc0c9c71f915f66eecae401e8f51
|
||||
if (flag4) {
|
||||
target.clearFire();
|
||||
}
|
||||
@@ -1784,6 +1784,14 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1782,6 +1782,14 @@ public abstract class Player extends LivingEntity {
|
||||
public int getXpNeededForNextLevel() {
|
||||
return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Toggleable player crits
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 5680bc0c9c71f915f66eecae401e8f51dc4225fe..4bba558b77d857ebc422c0313ba7b914df4dc2a8 100644
|
||||
index 5fa0e0c5293eda8a368c1801a9b5255807bf078c..04d02c456d2e3562dcd122cb1951f8de3d808f7f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1234,6 +1234,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1232,6 +1232,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
boolean flag2 = flag && this.fallDistance > 0.0F && !this.onGround() && !this.onClimbable() && !this.isInWater() && !this.hasEffect(MobEffects.BLINDNESS) && !this.isPassenger() && target instanceof LivingEntity;
|
||||
|
||||
|
@ -181,7 +181,7 @@ index 0000000000000000000000000000000000000000..6b0bdc266109cdfb874f08bf74323603
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fae34d85f6c3a81f29fa625c78090895d3af31cc..34189700b682377426bb70c9684f56115a6ab112 100644
|
||||
index 1e1c6f8b22da3e51d001db11392f3ea8d3d3573d..3d066e2a985ed46bc73d9856490d4aa692de26f3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -3,6 +3,9 @@ package net.minecraft.server;
|
||||
@ -194,7 +194,7 @@ index fae34d85f6c3a81f29fa625c78090895d3af31cc..34189700b682377426bb70c9684f5611
|
||||
import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
@@ -1424,7 +1427,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1364,7 +1367,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hidesOnlinePlayers()) {
|
||||
return new ServerStatus.Players(i, list.size(), List.of());
|
||||
} else {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable sprint interruption on attack
|
||||
If the sprint interruption is disabled players continue sprinting when they attack entities.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 4bba558b77d857ebc422c0313ba7b914df4dc2a8..e693d81be914800073b51acef98ef5f4e607c874 100644
|
||||
index 04d02c456d2e3562dcd122cb1951f8de3d808f7f..0c2c998a22a9328696bef75f48e1a5abd8589fa7 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1283,7 +1283,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1281,7 +1281,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||
|
@ -7,10 +7,10 @@ Called when a player is firing a bow and the server is choosing an arrow to use.
|
||||
Plugins can skip selection of certain arrows and control which is used.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index e693d81be914800073b51acef98ef5f4e607c874..bfc33822ab5ca58d77e11d3cbd140ba6c0374a6e 100644
|
||||
index 0c2c998a22a9328696bef75f48e1a5abd8589fa7..f28e9f06596cea6904b407fa87835f21d07817fa 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2169,18 +2169,29 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2167,18 +2167,29 @@ public abstract class Player extends LivingEntity {
|
||||
return ImmutableList.of(Pose.STANDING, Pose.CROUCHING, Pose.SWIMMING);
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ Co-authored-by: aerulion <aerulion@gmail.com>
|
||||
This event is called when an entity receives knockback by another entity.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 42f8c39fa5f9f31c03d4e7af9fb6b7a842f29aae..d6437a6b6b90ceb6fe7d2375ab2fc9e28b469c9b 100644
|
||||
index 23f233adc1a3910237bb065a41e5d3d074d5bfd0..fad0460ac5d6792384fa46ff9741fee1887e792c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -1909,8 +1909,17 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -83,7 +83,7 @@ index fa1c7d1781a2e2269359fa1860de79e918de7635..854177cb491d602c1f33e3496e01ba8a
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 374a91e712c2a6a8ad87d1047bb07d44eaa9908a..70820b8d95c71ea6df8a5cae16784ed764440a45 100644
|
||||
index 15ad425b9c091ee27965fe166f9021509199aa18..4ae0f36276592e37aeb5f881b713efa76d086f8e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1646,7 +1646,7 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
@ -161,10 +161,10 @@ index 81003ce3f05c6be6f52a92b86a4721235f4ce12a..cae7e3e85c3b911f50f8a06badf695c3
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index bfc33822ab5ca58d77e11d3cbd140ba6c0374a6e..871adf673c536912604ea18f8146e7eead01bde5 100644
|
||||
index f28e9f06596cea6904b407fa87835f21d07817fa..5f59c7436756645a74ea730b026deb25d1571c9c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1277,9 +1277,9 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1275,9 +1275,9 @@ public abstract class Player extends LivingEntity {
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
if (target instanceof LivingEntity) {
|
||||
@ -176,7 +176,7 @@ index bfc33822ab5ca58d77e11d3cbd140ba6c0374a6e..871adf673c536912604ea18f8146e7ee
|
||||
}
|
||||
|
||||
this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
|
||||
@@ -1301,7 +1301,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1299,7 +1299,7 @@ public abstract class Player extends LivingEntity {
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
// CraftBukkit start - Only apply knockback if the damage hits
|
||||
if (entityliving.hurt(this.damageSources().playerAttack(this).sweep(), f4)) {
|
||||
|
@ -7,7 +7,7 @@ Allows you to determine why an inventory was closed, enabling plugin developers
|
||||
to "confirm" things based on if it was player triggered close or not.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 6c6ccdf7fb1cab27af720b2c8ef9d68b4521a20d..d993f6421e17a24bd6c371298ae78c2bc2f8a7ac 100644
|
||||
index e85390265dca2a55d0bb6f8dd4682d5a8a6cf478..518a900888b0ab51646f12e6b43a3cc12de55564 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1474,7 +1474,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -29,12 +29,12 @@ index 6c6ccdf7fb1cab27af720b2c8ef9d68b4521a20d..d993f6421e17a24bd6c371298ae78c2b
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 708d1033306da34844827854edaf8a68ed67a936..0bdb75f733896335b87a19eb4d29024186e2d4d0 100644
|
||||
index eadc58dd6ccec5e2f1604b94709181a0754d9802..6c31597821e087f690941c997096153ed06e9707 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -692,7 +692,7 @@ public class ServerPlayer extends Player {
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Configurable container update tick rate
|
||||
if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
- this.closeContainer();
|
||||
+ this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
|
||||
@ -117,10 +117,10 @@ index 99ba7c82f8a8db9d5841cce18ed5f39439b512b0..5517f873e709b6f3b9206f0ad0212a95
|
||||
|
||||
PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), net.kyori.adventure.text.Component.translatable("multiplayer.player.left", net.kyori.adventure.text.format.NamedTextColor.YELLOW, io.papermc.paper.configuration.GlobalConfiguration.get().messages.useDisplayNameInQuitMessage ? entityplayer.getBukkitEntity().displayName() : io.papermc.paper.adventure.PaperAdventure.asAdventure(entityplayer.getDisplayName()))); // Paper - Adventure
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 871adf673c536912604ea18f8146e7eead01bde5..f9d7ef3b689ce1411b922649f9ee64dca34d3c74 100644
|
||||
index 5f59c7436756645a74ea730b026deb25d1571c9c..fb4cc32f2840098a13981ec4328e7eb6fe4f714b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -265,7 +265,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -263,7 +263,7 @@ public abstract class Player extends LivingEntity {
|
||||
this.updateIsUnderwater();
|
||||
super.tick();
|
||||
if (!this.level().isClientSide && this.containerMenu != null && !this.containerMenu.stillValid(this)) {
|
||||
@ -129,7 +129,7 @@ index 871adf673c536912604ea18f8146e7eead01bde5..f9d7ef3b689ce1411b922649f9ee64dc
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
|
||||
@@ -497,6 +497,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -495,6 +495,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,11 +17,11 @@ index d04d0b9cbf91beb57da7e37e72f8e7c98cf6cf4c..e6e3a7ae08f7346ccbce02b9d3623948
|
||||
Iterator iterator = list.iterator();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 9d2cf866cf4f0c93dea028e3673d9a51615059af..232dfdb70e31485969a972bfad53762edacf8549 100644
|
||||
index 0ce0bdf8de679998a32cf8c6e07be2ed56f10edb..18b6094ecd36ac50fc616e24f6d197352ae78e91 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -777,6 +777,13 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
// Paper end
|
||||
// Paper end - Prevent block entity and entity crashes
|
||||
}
|
||||
}
|
||||
+ // Paper start - Option to prevent armor stands from doing entity lookups
|
||||
|
@ -9,16 +9,16 @@ thread dumps at an interval until the point of crash.
|
||||
This will help diagnose what was going on in that time before the crash.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 34189700b682377426bb70c9684f56115a6ab112..feac302358f627c682c3294fca1ae21c8e57b84b 100644
|
||||
index 3d066e2a985ed46bc73d9856490d4aa692de26f3..46311cff83a7219508f74d862623b3c27eb8abea 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1075,6 +1075,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1023,6 +1023,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.status = this.buildServerStatus();
|
||||
|
||||
// Spigot start
|
||||
+ org.spigotmc.WatchdogThread.hasStarted = true; // Paper
|
||||
Arrays.fill( this.recentTps, 20 );
|
||||
long tickSection = Util.getNanos(), curTime, tickCount = 1; // Paper
|
||||
long tickSection = Util.getMillis(), tickCount = 1;
|
||||
while (this.running) {
|
||||
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
index 5b64c7f2f36bdf03f8a764d6c8d77524a0774ad1..6025b3ce5a4aee45061dfb72a089deff889fe823 100644
|
||||
@ -33,7 +33,7 @@ index 5b64c7f2f36bdf03f8a764d6c8d77524a0774ad1..6025b3ce5a4aee45061dfb72a089deff
|
||||
com.destroystokyo.paper.Metrics.PaperMetrics.startMetrics(); // Paper - start metrics
|
||||
com.destroystokyo.paper.VersionHistoryManager.INSTANCE.getClass(); // Paper - load version history now
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 8c987d3a3042fadee01508ad0a62eb9878e8dd54..b89c1d4067c6cbc0faa58ac8a176ab16e8c83a4e 100644
|
||||
index 0c97374ac2a0839387f3576b77fb9470f773c040..7f8400f452a684a5dd20723ff76312f7d52a670c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -915,6 +915,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -19,17 +19,17 @@ public net.minecraft.world.entity.LivingEntity getDeathSound()Lnet/minecraft/sou
|
||||
public net.minecraft.world.entity.LivingEntity getSoundVolume()F
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 0bdb75f733896335b87a19eb4d29024186e2d4d0..4f1a7c0e4f9ca1706f51096fe9533dc49c460205 100644
|
||||
index 6c31597821e087f690941c997096153ed06e9707..3a56e7a63618939a55694b0cd481a4f708db8614 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -248,6 +248,10 @@ public class ServerPlayer extends Player {
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
+ // Paper start - cancellable death event
|
||||
+ public boolean queueHealthUpdatePacket = false;
|
||||
+ public boolean queueHealthUpdatePacket;
|
||||
+ public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
+ // Paper end
|
||||
+ // Paper end - cancellable death event
|
||||
|
||||
// CraftBukkit start
|
||||
public String displayName;
|
||||
@ -235,7 +235,7 @@ index 9780f8f42caa8bc5b67af85eeb8ab146b2b3a9e9..d22ce89c97107c0c6db3f911329e5332
|
||||
// CraftBukkit start
|
||||
public int getExpReward() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
index 70820b8d95c71ea6df8a5cae16784ed764440a45..7d0ccdd4b144afed8a93256941b3d8618c847f4d 100644
|
||||
index 4ae0f36276592e37aeb5f881b713efa76d086f8e..c4b05c7e339a2ec01ee3f5e4dec0b3493788d8d2 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
||||
@@ -1075,7 +1075,13 @@ public abstract class Mob extends LivingEntity implements Targeting {
|
||||
|
@ -92,10 +92,10 @@ index aa52b271bd556a29f774fde375b713d0d187521b..765e4bc00a0526aab6e263dae7233f63
|
||||
return executorService;
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index feac302358f627c682c3294fca1ae21c8e57b84b..f43459256120b1d9bdc0f0e5f4e299c51bfaa504 100644
|
||||
index 46311cff83a7219508f74d862623b3c27eb8abea..2a41f670c5298fc7cf901af21d8ad280435d7909 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -311,6 +311,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
thread.setUncaughtExceptionHandler((thread1, throwable) -> {
|
||||
MinecraftServer.LOGGER.error("Uncaught exception in server thread", throwable);
|
||||
});
|
||||
|
@ -8,10 +8,10 @@ the updates per world, so that we can re-use the same packet
|
||||
object for every player unless they have per-player time enabled.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f43459256120b1d9bdc0f0e5f4e299c51bfaa504..df04c80feb1f427737e53080b592e39153da18ad 100644
|
||||
index 2a41f670c5298fc7cf901af21d8ad280435d7909..738c2a2acecc35dbd65d922044ab3763dd9644b4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1469,12 +1469,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1409,12 +1409,24 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
MinecraftTimings.timeUpdateTimer.startTiming(); // Spigot // Paper
|
||||
// Send time updates to everyone, it will get the right time from the world the player is in.
|
||||
|
@ -18,10 +18,10 @@ index 0dd48e4098191c8b6e29945d62bc473e9f3a1e77..ae51993e0de706cb62c96795ca9de766
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b89c1d4067c6cbc0faa58ac8a176ab16e8c83a4e..4a180f6e04ba08480024c297dcdc15f625504213 100644
|
||||
index 7f8400f452a684a5dd20723ff76312f7d52a670c..c5f65257b2d4d1fa8ebf9f879e72a88dcc66b5a4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2807,6 +2807,16 @@ public final class CraftServer implements Server {
|
||||
@@ -2796,6 +2796,16 @@ public final class CraftServer implements Server {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
||||
|
@ -20,7 +20,7 @@ this is going to be the best soultion all around.
|
||||
Improvements/suggestions welcome!
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 72478a84e1dca85bb9694ea9816a1acc09c8ff5f..797c1c9db2fabd3f0ca6a37a17a368f63f144eb4 100644
|
||||
index 70e0ec6d33a2f6eaa3768b24d7a17bf30211c2e1..a11d100a3b0462b276c5b48f1fb2e5863dd98b81 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2605,11 +2605,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -93,10 +93,10 @@ index 966db97da239e3712d382d18c2a0c6c111b60ab2..98a26f97749d883f4ca04da27199f499
|
||||
this.dismountVehicle(entity);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index f9d7ef3b689ce1411b922649f9ee64dca34d3c74..fc9eed382c8de51b298102cdcf584bf7e19ea968 100644
|
||||
index fb4cc32f2840098a13981ec4328e7eb6fe4f714b..80fba3abe6f971da951cf5b613ac54364d641a81 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1141,7 +1141,13 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1139,7 +1139,13 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
public void removeVehicle() {
|
||||
|
@ -16,16 +16,16 @@ intent to remove) and replace it with two new methods, clearly named and
|
||||
documented as to their purpose.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 684cebce4bb611e3302d4fe0d26df96ee33dd228..7451883595155fdeb0714fb12b98a0dc33348359 100644
|
||||
index cdde8b79bcf8ad41b4b992a304984f4d3a0e6c89..15101171ed51e4b78fab53b98ea1ace4844a4bf7 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -248,6 +248,7 @@ public class ServerPlayer extends Player {
|
||||
private int containerCounter;
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
+ public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
// Paper start - cancellable death event
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public boolean queueHealthUpdatePacket;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index e927448d7df9a99bf1d5184557ed57b8c32a2773..7a7abe0d87936d853ef32e85bd6a4ebb0dfa0ba7 100644
|
||||
|
@ -53,10 +53,10 @@ index 15a5059994371da4850adcf726034a715b80efba..af7cb518a32a4d550eae833fdd5bb17f
|
||||
event.getPlayer().getServer().getPluginManager().callEvent(event);
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index df04c80feb1f427737e53080b592e39153da18ad..36c74467a4527b9641e8eace03e93cd04381cd08 100644
|
||||
index 738c2a2acecc35dbd65d922044ab3763dd9644b4..f36d843201e47a02bc9323e7045e89e6c892753a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -926,6 +926,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -925,6 +925,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
MinecraftServer.LOGGER.info("Stopping server");
|
||||
|
@ -22,7 +22,7 @@ index 2eddeb8d5239bbfeefbf4d3bd363f1ad083299b6..e2b44b8ddb8afc6e1f7dddadb434c226
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index b818ac80bd9d68f6058e4dc6ee447645083dc177..4cb3d42f88cb50233edd6f46adf5082c2bb732e8 100644
|
||||
index 71b07a08f8f1cc354ad04bff87423d0cde607e92..87062f8558518d996b1afaafcd7d9f8d04117e94 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1442,6 +1442,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -59,7 +59,7 @@ index a7119e1bccf009428e74cd3375bc61555062e408..f4e1fe5e5a12e5a3547a2e0305814ea6
|
||||
});
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 797c1c9db2fabd3f0ca6a37a17a368f63f144eb4..7abdfeacec4787819e2e66d3b8a322b750d203f7 100644
|
||||
index a11d100a3b0462b276c5b48f1fb2e5863dd98b81..8405726e0769a68eada678874441b8f6c184d538 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -237,6 +237,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -70,17 +70,7 @@ index 797c1c9db2fabd3f0ca6a37a17a368f63f144eb4..7abdfeacec4787819e2e66d3b8a322b7
|
||||
|
||||
public com.destroystokyo.paper.loottable.PaperLootableInventoryData lootableData; // Paper
|
||||
private CraftEntity bukkitEntity;
|
||||
@@ -2213,6 +2214,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
nbttagcompound.put("Paper.Origin", this.newDoubleList(origin.getX(), origin.getY(), origin.getZ()));
|
||||
}
|
||||
+ if (spawnReason != null) {
|
||||
+ nbttagcompound.putString("Paper.SpawnReason", spawnReason.name());
|
||||
+ }
|
||||
// Save entity's from mob spawner status
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
|
||||
@@ -2359,6 +2363,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2359,6 +2360,26 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
@ -108,7 +98,7 @@ index 797c1c9db2fabd3f0ca6a37a17a368f63f144eb4..7abdfeacec4787819e2e66d3b8a322b7
|
||||
|
||||
} catch (Throwable throwable) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
index 388a66e37c9f1d9c62e0c8977a2d5b9068c58fe7..1bc11de2144bc8e0a313e753bbfeed571132d9d5 100644
|
||||
index 1b0093a23011f7d1c0da88c0a934d94ad4d6b3e2..ef7da9043f2a6e2041d2a2850aaf19b7c95f706a 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java
|
||||
@@ -189,6 +189,7 @@ public abstract class BaseSpawner {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Server Tick Events
|
||||
Fires event at start and end of a server tick
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 36c74467a4527b9641e8eace03e93cd04381cd08..f3a66cd277a3950b75076fd5f80f159f6eb4dd1c 100644
|
||||
index f36d843201e47a02bc9323e7045e89e6c892753a..2a56a462ca8bd839bb373789b117945dc6372e03 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1348,6 +1348,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1288,6 +1288,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
});
|
||||
isOversleep = false;MinecraftTimings.serverOversleep.stopTiming();
|
||||
// Paper end
|
||||
@ -17,7 +17,7 @@ index 36c74467a4527b9641e8eace03e93cd04381cd08..f3a66cd277a3950b75076fd5f80f159f
|
||||
|
||||
++this.tickCount;
|
||||
this.tickRateManager.tick();
|
||||
@@ -1374,6 +1375,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1314,6 +1315,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.runAllTasks();
|
||||
}
|
||||
// Paper end
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Configurable Keep Spawn Loaded range per world
|
||||
This lets you disable it for some worlds and lower it for others.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index f3a66cd277a3950b75076fd5f80f159f6eb4dd1c..fe6098ffcd63e4bb28c223c5693482b47c6a2331 100644
|
||||
index 2a56a462ca8bd839bb373789b117945dc6372e03..0e7ca77f5b66fcea190386f49b95e9314dede97c 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -768,30 +768,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -767,30 +767,33 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
|
||||
@ -52,7 +52,7 @@ index f3a66cd277a3950b75076fd5f80f159f6eb4dd1c..fe6098ffcd63e4bb28c223c5693482b4
|
||||
|
||||
if (true) {
|
||||
ServerLevel worldserver1 = worldserver;
|
||||
@@ -814,7 +817,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -813,7 +816,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
|
||||
this.executeModerately();
|
||||
// CraftBukkit end
|
||||
@ -62,7 +62,7 @@ index f3a66cd277a3950b75076fd5f80f159f6eb4dd1c..fe6098ffcd63e4bb28c223c5693482b4
|
||||
// this.updateMobSpawningFlags();
|
||||
worldserver.setSpawnSettings(this.isSpawningMonsters(), this.isSpawningAnimals());
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 4cb3d42f88cb50233edd6f46adf5082c2bb732e8..7b7072dc81f745bd03c1e56e669c1b5e26f42d3f 100644
|
||||
index 87062f8558518d996b1afaafcd7d9f8d04117e94..5517a1869e9c7a745aeec3bc55722320e1c605c3 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1879,12 +1879,84 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose the internal current tick
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4a180f6e04ba08480024c297dcdc15f625504213..eba4767efb8ebe373c8f8898d6dd7f9f759d4ce3 100644
|
||||
index c5f65257b2d4d1fa8ebf9f879e72a88dcc66b5a4..ec4b391fa58d9884b97583aad3d6b63af486e94a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2853,5 +2853,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2842,5 +2842,10 @@ public final class CraftServer implements Server {
|
||||
profile.getProperties().putAll(((CraftPlayer) player).getHandle().getGameProfile().getProperties());
|
||||
return new com.destroystokyo.paper.profile.CraftPlayerProfile(profile);
|
||||
}
|
||||
|
@ -13,10 +13,10 @@ Quickly loading the exact world spawn chunk before searching the
|
||||
heightmap resolves the issue without having to load all spawn chunks.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 7abdfeacec4787819e2e66d3b8a322b750d203f7..72b8c527a06f260322430dd274cfae5582cd972b 100644
|
||||
index 8405726e0769a68eada678874441b8f6c184d538..25fd84d4ff80511f41f479ca3c8e73e1edcdf31a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3399,6 +3399,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3396,6 +3396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (flag1) {
|
||||
blockposition1 = ServerLevel.END_SPAWN_POINT;
|
||||
} else {
|
||||
|
@ -5,18 +5,18 @@ Subject: [PATCH] Add option to nerf pigmen from nether portals
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 72b8c527a06f260322430dd274cfae5582cd972b..b40eed864faf11962efc1e0df417074eb8737c6b 100644
|
||||
index 25fd84d4ff80511f41f479ca3c8e73e1edcdf31a..4d0f9ee714ddcd93a5e6c53a81dacbe698507e6e 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -397,6 +397,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -396,6 +396,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public void inactiveTick() { }
|
||||
// Spigot end
|
||||
// Paper start
|
||||
protected int numCollisions = 0; // Paper - Cap entity collisions
|
||||
+ public boolean fromNetherPortal; // Paper - Add option to nerf pigmen from nether portals
|
||||
public boolean spawnedViaMobSpawner; // Paper - Yes this name is similar to above, upstream took the better one
|
||||
// Paper start - Entity origin API
|
||||
@javax.annotation.Nullable
|
||||
private org.bukkit.util.Vector origin;
|
||||
@@ -2221,6 +2222,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2218,6 +2219,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (spawnedViaMobSpawner) {
|
||||
nbttagcompound.putBoolean("Paper.FromMobSpawner", true);
|
||||
}
|
||||
@ -26,7 +26,7 @@ index 72b8c527a06f260322430dd274cfae5582cd972b..b40eed864faf11962efc1e0df417074e
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2363,6 +2367,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2360,6 +2364,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
spawnedViaMobSpawner = nbt.getBoolean("Paper.FromMobSpawner"); // Restore entity's from mob spawner status
|
||||
|
@ -125,7 +125,7 @@ index 72f2e81b9905a0d57ed8e2a88578f62d5235c456..7b58b2d6297800c2dcdbf7539e5ab8e7
|
||||
|
||||
public static void registerCommands(final MinecraftServer server) {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index fe6098ffcd63e4bb28c223c5693482b47c6a2331..a8115ac8e938631448d331b6d12d43a1e9646d68 100644
|
||||
index 0e7ca77f5b66fcea190386f49b95e9314dede97c..fe5041d05f93900a22049a2176cb59d226c263bf 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -252,6 +252,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@ -140,7 +140,7 @@ index fe6098ffcd63e4bb28c223c5693482b47c6a2331..a8115ac8e938631448d331b6d12d43a1
|
||||
@Nullable
|
||||
private KeyPair keyPair;
|
||||
@Nullable
|
||||
@@ -1393,6 +1398,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1333,6 +1338,11 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.smoothedTickTimeMillis = this.smoothedTickTimeMillis * 0.8F + (float) j / (float) TimeUtil.NANOSECONDS_PER_MILLISECOND * 0.19999999F;
|
||||
long l = Util.getNanos();
|
||||
|
||||
@ -152,7 +152,7 @@ index fe6098ffcd63e4bb28c223c5693482b47c6a2331..a8115ac8e938631448d331b6d12d43a1
|
||||
this.logTickTime(l - i);
|
||||
this.profiler.pop();
|
||||
org.spigotmc.WatchdogThread.tick(); // Spigot
|
||||
@@ -2669,4 +2679,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2609,4 +2619,30 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
public static record ServerResourcePackInfo(UUID id, String url, String hash, boolean isRequired, @Nullable Component prompt) {
|
||||
|
||||
}
|
||||
@ -184,23 +184,23 @@ index fe6098ffcd63e4bb28c223c5693482b47c6a2331..a8115ac8e938631448d331b6d12d43a1
|
||||
+ // Paper end - Add tick times API and /mspt command
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index eba4767efb8ebe373c8f8898d6dd7f9f759d4ce3..d1d430886790d0fbed385147ab638a0e73237772 100644
|
||||
index ec4b391fa58d9884b97583aad3d6b63af486e94a..0cedd2ca42ccd4fa60dae500a596aef38401081e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2628,6 +2628,16 @@ public final class CraftServer implements Server {
|
||||
net.minecraft.server.MinecraftServer.getServer().tps15.getAverage()
|
||||
};
|
||||
@@ -2619,6 +2619,16 @@ public final class CraftServer implements Server {
|
||||
return CraftMagicNumbers.INSTANCE;
|
||||
}
|
||||
+
|
||||
|
||||
+ @Override
|
||||
+ public long[] getTickTimes() {
|
||||
+ return getServer().tickTimes5s.getTimes();
|
||||
+ return this.getServer().tickTimes5s.getTimes();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public double getAverageTickTime() {
|
||||
+ return getServer().tickTimes5s.getAverage();
|
||||
+ return this.getServer().tickTimes5s.getAverage();
|
||||
+ }
|
||||
// Paper end
|
||||
|
||||
+
|
||||
// Spigot start
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose MinecraftServer#isRunning
|
||||
This allows for plugins to detect if the server is actually turning off in onDisable rather than just plugins reloading.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index d1d430886790d0fbed385147ab638a0e73237772..edec1e0c931eff59d69890bd48355a0e15b3a001 100644
|
||||
index 0cedd2ca42ccd4fa60dae500a596aef38401081e..8239e6c4771b6e3399e0f2ecd0e26f86ea848a69 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2868,5 +2868,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2857,5 +2857,10 @@ public final class CraftServer implements Server {
|
||||
public int getCurrentTick() {
|
||||
return net.minecraft.server.MinecraftServer.currentTick;
|
||||
}
|
||||
|
@ -10,16 +10,16 @@ When not per player it will use the Vanilla mechanic of one delay per
|
||||
world and the world age for the start day.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 1d7955f8d3bd722bc4524b520e9c6862a4fd52da..e28b4976341157b8dbc7245ee91024fd1e025b09 100644
|
||||
index f55fc8c9738ca5cd7868df69b7e32a23b95a6bce..ecd40e3b19d95d45f58349556a2c8e5f47a37c91 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -249,6 +249,7 @@ public class ServerPlayer extends Player {
|
||||
public boolean wonGame;
|
||||
private int containerUpdateDelay; // Paper
|
||||
private int containerUpdateDelay; // Paper - Configurable container update tick rate
|
||||
public long loginTime; // Paper - Replace OfflinePlayer#getLastPlayed
|
||||
+ public int patrolSpawnDelay; // Paper - Pillager patrol spawn settings and per player options
|
||||
// Paper start - cancellable death event
|
||||
public boolean queueHealthUpdatePacket = false;
|
||||
public boolean queueHealthUpdatePacket;
|
||||
public net.minecraft.network.protocol.game.ClientboundSetHealthPacket queuedHealthUpdatePacket;
|
||||
diff --git a/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PatrolSpawner.java
|
||||
index c7aea059de151cf8ae6e660785e176586bc23ff3..1c4dafdfb3898b5efe06d66792b1b0841ec5724d 100644
|
||||
|
@ -25,7 +25,7 @@ index c96b20cdd87596b6ff73478d262acdf22361858b..397fcc5f3835418bb31998b0b0cdce94
|
||||
EntityType<?> entitytypes = entity.getType();
|
||||
int i = entitytypes.clientTrackingRange() * 16;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 8a7032d909452cec6c4b3e99b02fb00df5cea324..5f384b764aa361d9cd575b9910afea789cb054bc 100644
|
||||
index bc4bac5607abc5146648a79419b28eb8ba1be0b2..faf704d805a1af037d0e8d4dd60a942a43e5b054 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -2478,7 +2478,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -41,7 +41,7 @@ index 8a7032d909452cec6c4b3e99b02fb00df5cea324..5f384b764aa361d9cd575b9910afea78
|
||||
entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
|
||||
entity.inWorld = true; // CraftBukkit - Mark entity as in world
|
||||
entity.valid = true; // CraftBukkit
|
||||
+ ServerLevel.this.getChunkSource().addEntity(entity);
|
||||
// Paper start - Set origin location when the entity is being added to the world
|
||||
+ ServerLevel.this.getChunkSource().addEntity(entity); // Paper - ignore and warn about illegal addEntity calls instead of crashing server
|
||||
// Paper start - Entity origin API
|
||||
if (entity.getOriginVector() == null) {
|
||||
entity.setOrigin(entity.getBukkitEntity().getLocation());
|
||||
|
@ -7,10 +7,10 @@ This fixes a lot of game state issues where packets were delayed for processing
|
||||
due to 1.15's new queue but processed while dead.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index fc9eed382c8de51b298102cdcf584bf7e19ea968..808a784a312438433fba0e65cbfd1afbad19fe86 100644
|
||||
index 80fba3abe6f971da951cf5b613ac54364d641a81..bae09577905084f3e3d845b9cd3eaea9f46899d1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1153,7 +1153,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1151,7 +1151,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
@Override
|
||||
protected boolean isImmobile() {
|
||||
|
@ -5,13 +5,13 @@ Subject: [PATCH] Prevent opening inventories when frozen
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 538fe865ad27796371d11123ce03602719a9be68..2d8642f9a3dfa1a8a014fe773bbee93b86602677 100644
|
||||
index cdce839f310da5f7323b7d27120e7a7a81a52ee9..c58fb0d2937cc5534c4e81210f69cd5b09fa8bd5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -697,7 +697,7 @@ public class ServerPlayer extends Player {
|
||||
containerUpdateDelay = this.level().paperConfig().tickRates.containerUpdate;
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - Configurable container update tick rate
|
||||
- if (!this.level().isClientSide && !this.containerMenu.stillValid(this)) {
|
||||
+ if (!this.level().isClientSide && this.containerMenu != this.inventoryMenu && (this.isImmobile() || !this.containerMenu.stillValid(this))) { // Paper - Prevent opening inventories when frozen
|
||||
this.closeContainer(org.bukkit.event.inventory.InventoryCloseEvent.Reason.CANT_USE); // Paper - Inventory close reason
|
||||
|
@ -87,10 +87,10 @@ index 4be466a21fb1fb936e1eaa6351e30a53c7b5cbb4..5657999a85b9b9dfb48a51170d5fa3d9
|
||||
}
|
||||
// Paper end - Entity#getEntitySpawnReason
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index b40eed864faf11962efc1e0df417074eb8737c6b..71b499843b25f78491ab2f7dad97523b9facd77c 100644
|
||||
index 4d0f9ee714ddcd93a5e6c53a81dacbe698507e6e..7332ef95cd4a9465c55de29de04412a9e2e197d4 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2324,27 +2324,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2321,27 +2321,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add phantom creative and insomniac controls
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
index 170fbb1d80947b9b21c2106497baae5c37bcdc0c..c9c7833755af3c7bef1d40f2ca425cbec59efa68 100644
|
||||
index 3207166061bf9c4d7bf3f38e5a9f7aff23ccd5c1..ee4495b67c46cf1282cdd6ad15b224b0b7b10bfb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java
|
||||
@@ -28,6 +28,7 @@ public final class EntitySelector {
|
||||
@ -15,7 +15,7 @@ index 170fbb1d80947b9b21c2106497baae5c37bcdc0c..c9c7833755af3c7bef1d40f2ca425cbe
|
||||
+ public static Predicate<Player> IS_INSOMNIAC = (player) -> net.minecraft.util.Mth.clamp(((net.minecraft.server.level.ServerPlayer) player).getStats().getValue(net.minecraft.stats.Stats.CUSTOM.get(net.minecraft.stats.Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE) >= 72000; // Paper - Add phantom creative and insomniac controls
|
||||
|
||||
private EntitySelector() {}
|
||||
// Paper start
|
||||
// Paper start - Affects Spawning API
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/monster/Phantom.java b/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
index 658393f451e46a93c5665fe3c580aa395ace68d1..ea980c2fdf01988ba25bffc7f8963d775101bee1 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/monster/Phantom.java
|
||||
|
@ -16,10 +16,10 @@ So even if something NEW comes up, it would be impossible to drop the
|
||||
same item twice because the source was destroyed.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 71b499843b25f78491ab2f7dad97523b9facd77c..d2526510202c17006f22b148e4a1305714a4effd 100644
|
||||
index 7332ef95cd4a9465c55de29de04412a9e2e197d4..b0eba706279b26b68d3bc3fce85ba8781e8ea826 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -2454,11 +2454,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2451,11 +2451,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
} else {
|
||||
// CraftBukkit start - Capture drops for death event
|
||||
if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
|
||||
@ -34,7 +34,7 @@ index 71b499843b25f78491ab2f7dad97523b9facd77c..d2526510202c17006f22b148e4a13057
|
||||
|
||||
entityitem.setDefaultPickUpDelay();
|
||||
// CraftBukkit start
|
||||
@@ -3258,6 +3259,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3255,6 +3256,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@Nullable
|
||||
public Entity teleportTo(ServerLevel worldserver, Vec3 location) {
|
||||
// CraftBukkit end
|
||||
@ -47,7 +47,7 @@ index 71b499843b25f78491ab2f7dad97523b9facd77c..d2526510202c17006f22b148e4a13057
|
||||
if (this.level() instanceof ServerLevel && !this.isRemoved()) {
|
||||
this.level().getProfiler().push("changeDimension");
|
||||
// CraftBukkit start
|
||||
@@ -3284,6 +3291,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3281,6 +3288,11 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit end
|
||||
|
||||
this.level().getProfiler().popPush("reloading");
|
||||
@ -59,7 +59,7 @@ index 71b499843b25f78491ab2f7dad97523b9facd77c..d2526510202c17006f22b148e4a13057
|
||||
Entity entity = this.getType().create(worldserver);
|
||||
|
||||
if (entity != null) {
|
||||
@@ -3301,10 +3313,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3298,10 +3310,6 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// CraftBukkit start - Forward the CraftEntity to the new entity
|
||||
this.getBukkitEntity().setHandle(entity);
|
||||
entity.bukkitEntity = this.getBukkitEntity();
|
||||
@ -70,7 +70,7 @@ index 71b499843b25f78491ab2f7dad97523b9facd77c..d2526510202c17006f22b148e4a13057
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
@@ -3423,7 +3431,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3420,7 +3428,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public boolean canChangeDimensions() {
|
||||
|
@ -42,10 +42,10 @@ index 40ff3090fb17fb0f01a9b52639fb783ea57ce6b6..d39743d9626eb01c942194387dafb110
|
||||
StackTraceElement[] astacktraceelement = exception.getStackTrace();
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a8115ac8e938631448d331b6d12d43a1e9646d68..480f4946658c3cc9c3c5acc1168a182297eb2bd7 100644
|
||||
index fe5041d05f93900a22049a2176cb59d226c263bf..ae7bddabc445dc42394235a3f87b2a3a5c27800a 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -914,6 +914,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -913,6 +913,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
// CraftBukkit start
|
||||
private boolean hasStopped = false;
|
||||
@ -53,7 +53,7 @@ index a8115ac8e938631448d331b6d12d43a1e9646d68..480f4946658c3cc9c3c5acc1168a1822
|
||||
private final Object stopLock = new Object();
|
||||
public final boolean hasStopped() {
|
||||
synchronized (this.stopLock) {
|
||||
@@ -928,6 +929,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -927,6 +928,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.hasStopped) return;
|
||||
this.hasStopped = true;
|
||||
}
|
||||
@ -61,7 +61,7 @@ index a8115ac8e938631448d331b6d12d43a1e9646d68..480f4946658c3cc9c3c5acc1168a1822
|
||||
// CraftBukkit end
|
||||
if (this.metricsRecorder.isRecording()) {
|
||||
this.cancelRecordingMetrics();
|
||||
@@ -1002,6 +1004,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1001,6 +1003,8 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
public void safeShutdown(boolean waitForShutdown, boolean isRestarting) {
|
||||
this.isRestarting = isRestarting;
|
||||
@ -87,7 +87,7 @@ index 04a728a16bb629adbae1cd8586764a6dbc22b5dc..d130f843975236018df4fa2ccc3ca6aa
|
||||
this.connection.disconnect(ServerConfigurationPacketListenerImpl.DISCONNECT_REASON_INVALID_DATA);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 449f6e07c9693a32b9159657baf038a61391d24f..7b15b13fc0e5d22e1ba348fff05502cb33b1d46b 100644
|
||||
index 53eb6cbcdaf07658640d68f1e3c46c9171f0c5b6..0d56ed477561d8f876f4c8f52934688404e3161d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1006,6 +1006,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -768,10 +768,10 @@ index 6667ecc4b7eded4e20a415cef1e1b1179e6710b8..16f9a98b8a939e5ca7e2dc04f87134a7
|
||||
LOOK,
|
||||
JUMP,
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7b15b13fc0e5d22e1ba348fff05502cb33b1d46b..e2f0bb22882b571cca71ea1d82aa12bffdfdb418 100644
|
||||
index 0d56ed477561d8f876f4c8f52934688404e3161d..5952c130ed88be6ccd7863f50a7527c6029ff873 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2881,5 +2881,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2870,5 +2870,11 @@ public final class CraftServer implements Server {
|
||||
public boolean isStopping() {
|
||||
return net.minecraft.server.MinecraftServer.getServer().hasStopped();
|
||||
}
|
||||
|
@ -10,10 +10,10 @@ Adds a 5 second grace period for any async tasks to finish and warns
|
||||
if any are still running after that delay just as reload does.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 480f4946658c3cc9c3c5acc1168a182297eb2bd7..b9dbedd118a9287f659d2e785c3a582e817e4e36 100644
|
||||
index ae7bddabc445dc42394235a3f87b2a3a5c27800a..71a47dd29bb950a9209fd5fe2fb23c96b88eb113 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -941,6 +941,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -940,6 +940,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
// CraftBukkit start
|
||||
if (this.server != null) {
|
||||
this.server.disablePlugins();
|
||||
@ -22,7 +22,7 @@ index 480f4946658c3cc9c3c5acc1168a182297eb2bd7..b9dbedd118a9287f659d2e785c3a582e
|
||||
// CraftBukkit end
|
||||
this.getConnection().stop();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e2f0bb22882b571cca71ea1d82aa12bffdfdb418..41935f3b0d4e8b7bc18d308de964db537afe863b 100644
|
||||
index 5952c130ed88be6ccd7863f50a7527c6029ff873..373145e04a82de818ff8030b669a97bfa479d7d9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1016,6 +1016,31 @@ public final class CraftServer implements Server {
|
||||
|
@ -7,7 +7,7 @@ If the falling block dies during teleportation (entity#move), then we need
|
||||
to detect that by placing a check after the move.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
index ffed5f2295f60416535015a28635975aa2d211dd..bfd8304f4fc2aded1681c7a59cf9d81192e5a3b2 100644
|
||||
index 1b9dfc32ce13dc9ec2fab60750dc1184dbddc5bd..2452c7f0a3ed1faf9b90351bea3389382c677d05 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java
|
||||
@@ -131,6 +131,11 @@ public class FallingBlockEntity extends Entity {
|
||||
@ -22,17 +22,15 @@ index ffed5f2295f60416535015a28635975aa2d211dd..bfd8304f4fc2aded1681c7a59cf9d811
|
||||
if (this.blockState.isAir()) {
|
||||
this.discard();
|
||||
} else {
|
||||
@@ -142,6 +147,13 @@ public class FallingBlockEntity extends Entity {
|
||||
@@ -142,6 +147,11 @@ public class FallingBlockEntity extends Entity {
|
||||
}
|
||||
|
||||
this.move(MoverType.SELF, this.getDeltaMovement());
|
||||
+
|
||||
+ // Paper start - fix sand duping
|
||||
+ if (this.isRemoved()) {
|
||||
+ return;
|
||||
+ }
|
||||
+ // Paper end - fix sand duping
|
||||
+
|
||||
// Paper start - Configurable EntityFallingBlock height nerf
|
||||
// Paper start - Configurable falling blocks height nerf
|
||||
if (this.level().paperConfig().fixes.fallingBlockHeightNerf.test(v -> this.getY() > v)) {
|
||||
if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Ensure Entity position and AABB are never invalid
|
||||
Co-authored-by: Spottedleaf <Spottedleaf@users.noreply.github.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d2526510202c17006f22b148e4a1305714a4effd..a6fc2a67027b749b9f87110aa15b339bdc58a72b 100644
|
||||
index b0eba706279b26b68d3bc3fce85ba8781e8ea826..11198bc084400d613545f511600810f02e4f3ffb 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -691,8 +691,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -20,7 +20,7 @@ index d2526510202c17006f22b148e4a1305714a4effd..a6fc2a67027b749b9f87110aa15b339b
|
||||
}
|
||||
|
||||
protected AABB makeBoundingBox() {
|
||||
@@ -4195,7 +4195,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4192,7 +4192,29 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return this.getZ((2.0D * this.random.nextDouble() - 1.0D) * widthScale);
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ index d2526510202c17006f22b148e4a1305714a4effd..a6fc2a67027b749b9f87110aa15b339b
|
||||
// Paper start - rewrite chunk system
|
||||
if (this.updatingSectionStatus) {
|
||||
LOGGER.error("Refusing to update position for entity " + this + " to position " + new Vec3(x, y, z) + " since it is processing a section status update", new Throwable());
|
||||
@@ -4219,6 +4241,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4216,6 +4238,12 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
this.levelCallback.onMove();
|
||||
}
|
||||
|
||||
|
@ -8,10 +8,10 @@ makes it so that the server keeps the last difficulty used instead
|
||||
of restoring the server.properties every single load.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index b9dbedd118a9287f659d2e785c3a582e817e4e36..e824ac0c487ab42c68cbf1a6f7c24d4b689809c3 100644
|
||||
index 71a47dd29bb950a9209fd5fe2fb23c96b88eb113..0e3e68ec5cd568c9fc89555597c167acb6563cee 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -825,7 +825,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -824,7 +824,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (worldserver.getWorld().getKeepSpawnInMemory()) worldloadlistener.stop(); // Paper - Configurable Keep Spawn Loaded range per world
|
||||
// CraftBukkit start
|
||||
// this.updateMobSpawningFlags();
|
||||
@ -20,7 +20,7 @@ index b9dbedd118a9287f659d2e785c3a582e817e4e36..e824ac0c487ab42c68cbf1a6f7c24d4b
|
||||
|
||||
this.forceTicks = false;
|
||||
// CraftBukkit end
|
||||
@@ -1759,11 +1759,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1699,11 +1699,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index b9dbedd118a9287f659d2e785c3a582e817e4e36..e824ac0c487ab42c68cbf1a6f7c24d4b
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1777,7 +1780,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1717,7 +1720,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
@ -76,7 +76,7 @@ index 249944e48d3e07cc5dd412f58f39a3abdbe446b1..5ecf65315b42cd07dcd69a10c445b1f0
|
||||
|
||||
@Override
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 5c9a6fe2f2d67ff4e27c691ebc97e7a50d62fc22..4ce4a620e07ed30a28716adc4076fc5efbcf9b62 100644
|
||||
index 0a3c36e2bdaa6db35f409e728d04c0feb1e5f9b2..3a0335609310a5997b0625e31ed3192f5f4865ec 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1205,7 +1205,7 @@ public class ServerPlayer extends Player {
|
||||
@ -102,7 +102,7 @@ index 2502b8145da151a63dc769c4e717d53d651203c3..2f8715e200b9b8ae4c4b70ddd7cdc336
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 41935f3b0d4e8b7bc18d308de964db537afe863b..8bc0f2a7a4a5af73a4a0b693b91c6bbbf7c6e2d1 100644
|
||||
index 373145e04a82de818ff8030b669a97bfa479d7d9..9665f70394e9124be5bcaea6099d458255632472 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -955,8 +955,8 @@ public final class CraftServer implements Server {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] incremental chunk and player saving
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index e824ac0c487ab42c68cbf1a6f7c24d4b689809c3..7d265471685e34b434ab25bee14854f6f261837b 100644
|
||||
index 0e3e68ec5cd568c9fc89555597c167acb6563cee..ca005f3c60e58a2ac3e391c9107023e982f33ffe 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -898,7 +898,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -897,7 +897,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
|
||||
try {
|
||||
this.isSaving = true;
|
||||
@ -17,7 +17,7 @@ index e824ac0c487ab42c68cbf1a6f7c24d4b689809c3..7d265471685e34b434ab25bee14854f6
|
||||
flag3 = this.saveAllChunks(suppressLogs, flush, force);
|
||||
} finally {
|
||||
this.isSaving = false;
|
||||
@@ -1372,16 +1372,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1312,16 +1312,28 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
--this.ticksUntilAutosave;
|
||||
@ -76,7 +76,7 @@ index 5bea335653d3cd45354dc67b160a6bf5ce907f41..35f463e5237d12e42f7a8b8c177af323
|
||||
public void close() throws IOException {
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5f384b764aa361d9cd575b9910afea789cb054bc..dcc411b3c7d5e5a675c8e21adef25e821ffd7cdd 100644
|
||||
index faf704d805a1af037d0e8d4dd60a942a43e5b054..90fae050445fbebe44ec5ef77fdcac65b48f1f9d 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1283,6 +1283,37 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -118,7 +118,7 @@ index 5f384b764aa361d9cd575b9910afea789cb054bc..dcc411b3c7d5e5a675c8e21adef25e82
|
||||
// Paper start - rewrite chunk system - add close param
|
||||
this.save(progressListener, flush, savingDisabled, false);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 4ce4a620e07ed30a28716adc4076fc5efbcf9b62..897fa2857f070a976cc95695d7009f663a6bc89d 100644
|
||||
index 3a0335609310a5997b0625e31ed3192f5f4865ec..c449b40c2252829c5f5fa0978b3f9a41336d6318 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -190,6 +190,7 @@ import org.bukkit.inventory.MainHand;
|
||||
|
@ -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 7d265471685e34b434ab25bee14854f6f261837b..80b67f8e1a44db078a0ca7382a6c774529ac6976 100644
|
||||
index ca005f3c60e58a2ac3e391c9107023e982f33ffe..78df27da35b8c30d1de189aaac0710c94e7112f9 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2071,6 +2071,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2011,6 +2011,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.getPlayerList().reloadResources();
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
|
@ -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 ac2380e43639f661358b63eef77cbc7b408a0180..b5fc9879a17b681b1801be96f1e57ea2b56870a9 100644
|
||||
index 838004fc124bd5f7b46dbfa9d69d3fde6e990623..4def6868bc0a51d408f67b4de13c85b2eed76e13 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4462,4 +4462,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4459,4 +4459,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
void accept(Entity entity, double x, double y, double z);
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ 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 b5fc9879a17b681b1801be96f1e57ea2b56870a9..fcb928696e676fe0749b1bc4b1aa433985767f5b 100644
|
||||
index 4def6868bc0a51d408f67b4de13c85b2eed76e13..7f5efeef47e4f31106e4a0069feea7f82aa89f88 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4467,5 +4467,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4464,5 +4464,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
public static int nextEntityId() {
|
||||
return ENTITY_COUNTER.incrementAndGet();
|
||||
}
|
||||
|
@ -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 80b67f8e1a44db078a0ca7382a6c774529ac6976..589feabf9ad471462aa7fb46f179b5de9455ff65 100644
|
||||
index 78df27da35b8c30d1de189aaac0710c94e7112f9..e60e5f94cd05d71b29414f2a911ac4ce9d8f7412 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2154,13 +2154,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2094,13 +2094,14 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (this.isEnforceWhitelist()) {
|
||||
PlayerList playerlist = source.getServer().getPlayerList();
|
||||
UserWhiteList whitelist = playerlist.getWhiteList();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Expose LivingEntity hurt direction
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 808a784a312438433fba0e65cbfd1afbad19fe86..b4d1caa4c853ce4b88d53fb6f69ad437d3dcb381 100644
|
||||
index bae09577905084f3e3d845b9cd3eaea9f46899d1..10caa677309c5a8191830c98597468079e784459 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -178,7 +178,7 @@ public abstract class Player extends LivingEntity {
|
||||
@ -14,9 +14,9 @@ index 808a784a312438433fba0e65cbfd1afbad19fe86..b4d1caa4c853ce4b88d53fb6f69ad437
|
||||
public FishingHook fishing;
|
||||
- protected float hurtDir;
|
||||
+ public float hurtDir; // Paper - protected -> public
|
||||
// Paper start
|
||||
public boolean affectsSpawning = true;
|
||||
// Paper end
|
||||
public boolean affectsSpawning = true; // Paper - Affects Spawning API
|
||||
|
||||
// CraftBukkit start
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
index 93644aefd2e6c97eca2735812b2b7b4bd039cfb5..40f848d117c1a4f4fc2f11861c5f142071d56977 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
|
||||
|
@ -28,10 +28,10 @@ index 05ac41e136da43284fb24a6b698ebd36318278fb..3c4ac79c094dc2fff7de94150a34b7bf
|
||||
|
||||
public Vec3 decode(long x, long y, long z) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index a1cf6f17313f4f861f3c5c6ebcaafc85d9102b55..3877544229bc8a4e6e475060c4edca17c64ff739 100644
|
||||
index b9c919c466d6591492ede8a53df673114c50c1d9..18438f5c92840bd07e7ef0c2203d4ec943cb3161 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -4238,6 +4238,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -4235,6 +4235,16 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
return;
|
||||
}
|
||||
// Paper end - rewrite chunk system
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add ServerResourcesReloadedEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 589feabf9ad471462aa7fb46f179b5de9455ff65..1aa73c3934c754fb9a4e09e8ac9c7f96d608ceb5 100644
|
||||
index e60e5f94cd05d71b29414f2a911ac4ce9d8f7412..5429906d0d793a45d7cedc2c14cae9d3e0ebb5e2 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2039,7 +2039,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1979,7 +1979,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
return this.functionManager;
|
||||
}
|
||||
|
||||
@ -22,7 +22,7 @@ index 589feabf9ad471462aa7fb46f179b5de9455ff65..1aa73c3934c754fb9a4e09e8ac9c7f96
|
||||
RegistryAccess.Frozen iregistrycustom_dimension = this.registries.getAccessForLoading(RegistryLayer.RELOADABLE);
|
||||
CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
|
||||
Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
|
||||
@@ -2072,6 +2078,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2012,6 +2018,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.functionManager.replaceLibrary(this.resources.managers.getFunctionLibrary());
|
||||
this.structureTemplateManager.onResourceManagerReload(this.resources.resourceManager);
|
||||
org.bukkit.craftbukkit.block.data.CraftBlockData.reloadCache(); // Paper - cache block data strings; they can be defined by datapacks so refresh it here
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add EntityMoveEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 1aa73c3934c754fb9a4e09e8ac9c7f96d608ceb5..849161e11d547445d9bd10ac54bcd994a62aab06 100644
|
||||
index 5429906d0d793a45d7cedc2c14cae9d3e0ebb5e2..7857a385aef33fa3bc9bfe01223016c0eb879112 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1529,6 +1529,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1469,6 +1469,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
while (iterator.hasNext()) {
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
worldserver.hasPhysicsEvent = org.bukkit.event.block.BlockPhysicsEvent.getHandlerList().getRegisteredListeners().length > 0; // Paper - BlockPhysicsEvent
|
||||
@ -17,7 +17,7 @@ index 1aa73c3934c754fb9a4e09e8ac9c7f96d608ceb5..849161e11d547445d9bd10ac54bcd994
|
||||
this.profiler.push(() -> {
|
||||
return worldserver + " " + worldserver.dimension().location();
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 5020d671c7bbaf4277c300f3688c770b6a565129..f69fae303770b3ccace8e7d421b762504a7cb5dc 100644
|
||||
index e6216892f5bbc22dfde1eebfea33709e2eea841c..a24c782dfdf47868fdd8d494f0af1024fdc6ebe5 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -222,6 +222,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] forced whitelist: use configurable kick message
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 849161e11d547445d9bd10ac54bcd994a62aab06..22ffae1e5b0ea77b9c9330f521e31af77fe0d276 100644
|
||||
index 7857a385aef33fa3bc9bfe01223016c0eb879112..d4c1b31eb016bb6f39d3a399fb07f3cee40d6391 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2170,7 +2170,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2110,7 +2110,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerDeepSleepEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index b4d1caa4c853ce4b88d53fb6f69ad437d3dcb381..d6960cfe647f7ad8c2279b30d8af8a0e11be829f 100644
|
||||
index 10caa677309c5a8191830c98597468079e784459..caa71993f3ee344151a3e053ba527b868c13251b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -248,6 +248,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -246,6 +246,11 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (this.isSleeping()) {
|
||||
++this.sleepCounter;
|
||||
|
@ -92,7 +92,7 @@ index 0000000000000000000000000000000000000000..cf4374493c11057451a62a655514415c
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 59935e2557ece2890cf0fc62096a01ef2c52e384..e776a28e9b7d817bde2ce57eb05bd0caed7c2b20 100644
|
||||
index b5b2e729c57d0b73c433b0a9f9e673fc96c313d6..6e297adce9b20112b566acbdbad8c0197818b9bc 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -301,6 +301,7 @@ public final class CraftServer implements Server {
|
||||
@ -111,7 +111,7 @@ index 59935e2557ece2890cf0fc62096a01ef2c52e384..e776a28e9b7d817bde2ce57eb05bd0ca
|
||||
}
|
||||
|
||||
public boolean getCommandBlockOverride(String command) {
|
||||
@@ -2949,5 +2951,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2938,5 +2940,11 @@ public final class CraftServer implements Server {
|
||||
public com.destroystokyo.paper.entity.ai.MobGoals getMobGoals() {
|
||||
return mobGoals;
|
||||
}
|
||||
|
@ -267,10 +267,10 @@ index 1cad3585ca122a465572b16d4ecbb7231e87c7de..b0a0909fa9501dfacfbe70dc4118062d
|
||||
Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
|
||||
WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dimensionOptionsRegistry, eraseCache);
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 22ffae1e5b0ea77b9c9330f521e31af77fe0d276..ad6a0f1a1a9ed11760098b700e8f305faf066fcd 100644
|
||||
index d4c1b31eb016bb6f39d3a399fb07f3cee40d6391..046ace2307e0196d4b1dbd90714d89e92e0b5ee4 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -583,11 +583,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -582,11 +582,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
worlddata = new PrimaryLevelData(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
|
||||
}
|
||||
worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
|
||||
@ -283,7 +283,7 @@ index 22ffae1e5b0ea77b9c9330f521e31af77fe0d276..ad6a0f1a1a9ed11760098b700e8f305f
|
||||
|
||||
PrimaryLevelData iworlddataserver = worlddata;
|
||||
boolean flag = worlddata.isDebugWorld();
|
||||
@@ -602,6 +598,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -601,6 +597,13 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
|
||||
@ -298,7 +298,7 @@ index 22ffae1e5b0ea77b9c9330f521e31af77fe0d276..ad6a0f1a1a9ed11760098b700e8f305f
|
||||
|
||||
if (dimensionKey == LevelStem.OVERWORLD) {
|
||||
diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java
|
||||
index 859f515813240030b3598a2152dd41d4fb8828ad..c4086b17db7624489a8873ee321e7707078e5e0b 100644
|
||||
index 4117817f3be6a22754a7b948348bf159f4278264..6324aa26d0aac0e5e8cd55231720d5715a4b28fe 100644
|
||||
--- a/src/main/java/net/minecraft/world/level/Level.java
|
||||
+++ b/src/main/java/net/minecraft/world/level/Level.java
|
||||
@@ -179,6 +179,15 @@ public abstract class Level implements LevelAccessor, AutoCloseable {
|
||||
@ -352,7 +352,7 @@ index e9cfbee008c1dda2eeac55196d490984fa62ab09..eeccc924dbba6f860245611eb943c921
|
||||
return this.regionCache.getAndMoveToFirst(ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ()));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index e776a28e9b7d817bde2ce57eb05bd0caed7c2b20..980bf1f65db95533b757a757dcfda3d6970fcc8b 100644
|
||||
index 6e297adce9b20112b566acbdbad8c0197818b9bc..3e2704b652f9bf12169b068505af6a46ecd2fcab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1251,9 +1251,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -48,10 +48,10 @@ index 96814e626a95e4e3c2f4df1a0339d37bb02f2e61..ba12919c3f9aec34a9e64993b143ae92
|
||||
|
||||
public boolean shouldDisconnect() {
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ad6a0f1a1a9ed11760098b700e8f305faf066fcd..6f7a55bc2379f28e17b7e3500959972bbff9830d 100644
|
||||
index 046ace2307e0196d4b1dbd90714d89e92e0b5ee4..0fd9e6f740ce4224144f80027b7aa611bafc0827 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -2173,7 +2173,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -2113,7 +2113,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerPlayer entityplayer = (ServerPlayer) iterator.next();
|
||||
|
||||
if (!whitelist.isWhiteListed(entityplayer.getGameProfile()) && !this.getPlayerList().isOp(entityplayer.getGameProfile())) { // Paper - Fix kicking ops when whitelist is reloaded (MC-171420)
|
||||
|
@ -11,7 +11,7 @@ Move the tick logic into the post tick, where portaling was
|
||||
designed to happen in the first place.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d2c2dd79cc6f484306bd1ab523cb4d9283131d1b..002979f629798a8d39013c3a905f9b356abd115c 100644
|
||||
index 99861651b918baafc1ca7d1fd17f37213272953b..5f8144b847e0fb62bd8db48c035b33c0fa9ed5d8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -485,6 +485,36 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -51,7 +51,7 @@ index d2c2dd79cc6f484306bd1ab523cb4d9283131d1b..002979f629798a8d39013c3a905f9b35
|
||||
|
||||
public Entity(EntityType<?> type, Level world) {
|
||||
this.id = Entity.ENTITY_COUNTER.incrementAndGet();
|
||||
@@ -2833,6 +2863,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2830,6 +2860,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
this.processPortalCooldown();
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Fix PlayerDropItemEvent using wrong item
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index d1d7f4c3963986031ea26562549ee15c8232a5a9..64b31447847d3b40ba00c4e6708d68113f2ef2bd 100644
|
||||
index 0a7589ef5e9ac21e0d3cb077f19cd8b99fb8e00f..3f0c5ccc53663ae006ad09b4eba7f372e9caf357 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -2387,7 +2387,7 @@ public class ServerPlayer extends Player {
|
||||
@ -18,10 +18,10 @@ index d1d7f4c3963986031ea26562549ee15c8232a5a9..64b31447847d3b40ba00c4e6708d6811
|
||||
|
||||
this.awardStat(Stats.DROP);
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index d6960cfe647f7ad8c2279b30d8af8a0e11be829f..7899b55fd6f4099241d23be750669f7a9863cf0c 100644
|
||||
index caa71993f3ee344151a3e053ba527b868c13251b..b113c886b81d9ac77f16aa5acf7e1d9e61854b9f 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -725,6 +725,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -723,6 +723,11 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
double d0 = this.getEyeY() - 0.30000001192092896D;
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Optimize indirect passenger iteration
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 002979f629798a8d39013c3a905f9b356abd115c..22620662491547c2d689e5a703d80bfd723eaa77 100644
|
||||
index 5f8144b847e0fb62bd8db48c035b33c0fa9ed5d8..bf9499f076e4eabc69d45d95705964daa56a570c 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3878,20 +3878,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3875,20 +3875,34 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
private Stream<Entity> getIndirectPassengersStream() {
|
||||
@ -43,7 +43,7 @@ index 002979f629798a8d39013c3a905f9b356abd115c..22620662491547c2d689e5a703d80bfd
|
||||
return () -> {
|
||||
return this.getIndirectPassengersStream().iterator();
|
||||
};
|
||||
@@ -3914,6 +3928,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3911,6 +3925,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
// Paper end - rewrite chunk system
|
||||
|
||||
public boolean hasExactlyOnePlayerPassenger() {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add back EntityPortalExitEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 22620662491547c2d689e5a703d80bfd723eaa77..e5f265d71fe10fe1c9cb1ec95958f0c42063e51c 100644
|
||||
index bf9499f076e4eabc69d45d95705964daa56a570c..5755c836024de4c8c25b026baa47c193a2df2a0b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3327,6 +3327,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3324,6 +3324,28 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
} else {
|
||||
// CraftBukkit start
|
||||
worldserver = shapedetectorshape.world;
|
||||
@ -37,7 +37,7 @@ index 22620662491547c2d689e5a703d80bfd723eaa77..e5f265d71fe10fe1c9cb1ec95958f0c4
|
||||
if (worldserver == this.level) {
|
||||
// SPIGOT-6782: Just move the entity if a plugin changed the world to the one the entity is already in
|
||||
this.moveTo(shapedetectorshape.pos.x, shapedetectorshape.pos.y, shapedetectorshape.pos.z, shapedetectorshape.yRot, shapedetectorshape.xRot);
|
||||
@@ -3346,8 +3368,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3343,8 +3365,8 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
|
||||
if (entity != null) {
|
||||
entity.restoreFrom(this);
|
||||
|
@ -28,10 +28,10 @@ index df8c88bfa749e02f633350446101dcce05db7ac1..ed1277fad60992344b94f8a939febaca
|
||||
+ // Paper end - add critical damage API
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 7899b55fd6f4099241d23be750669f7a9863cf0c..11cc72f764913de577ecd6293e5316ae8c2c679c 100644
|
||||
index b113c886b81d9ac77f16aa5acf7e1d9e61854b9f..2c15a39d19d392e8aa2f5d70bf1bab9816fc186a 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -1255,7 +1255,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1253,7 +1253,7 @@ public abstract class Player extends LivingEntity {
|
||||
flag1 = true;
|
||||
}
|
||||
|
||||
@ -40,7 +40,7 @@ index 7899b55fd6f4099241d23be750669f7a9863cf0c..11cc72f764913de577ecd6293e5316ae
|
||||
|
||||
flag2 = flag2 && !this.level().paperConfig().entities.behavior.disablePlayerCrits; // Paper - Toggleable player crits
|
||||
flag2 = flag2 && !this.isSprinting();
|
||||
@@ -1295,7 +1295,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1293,7 +1293,7 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
Vec3 vec3d = target.getDeltaMovement();
|
||||
@ -49,7 +49,7 @@ index 7899b55fd6f4099241d23be750669f7a9863cf0c..11cc72f764913de577ecd6293e5316ae
|
||||
|
||||
if (flag5) {
|
||||
if (i > 0) {
|
||||
@@ -1323,7 +1323,7 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -1321,7 +1321,7 @@ public abstract class Player extends LivingEntity {
|
||||
|
||||
if (entityliving != this && entityliving != target && !this.isAlliedTo((Entity) entityliving) && (!(entityliving instanceof ArmorStand) || !((ArmorStand) entityliving).isMarker()) && this.distanceToSqr((Entity) entityliving) < 9.0D) {
|
||||
// CraftBukkit start - Only apply knockback if the damage hits
|
||||
|
@ -9,7 +9,7 @@ chunk through it. This should also be OK from a leak prevention/
|
||||
state desync POV because the TE is getting unloaded anyways.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
index 669c9e43ee76ce2502ed49965aae2703b922f3b5..e6a3f377762db8f2f58cb6851b8f713ce591b29f 100644
|
||||
index 43f190d5e3805f7260128b1e32c904d5aa67fd64..487b5620361acd54fd36b8996235fc5be053bd09 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
||||
@@ -1540,9 +1540,13 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
||||
@ -28,7 +28,7 @@ index 669c9e43ee76ce2502ed49965aae2703b922f3b5..e6a3f377762db8f2f58cb6851b8f713c
|
||||
}
|
||||
// Spigot End
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
index 770f99014f3cccbbc666f0aa8530dfb545ced7b6..bb313280236fb5c7dd2713a21edd3694e01a4fd1 100644
|
||||
index 475ae48f553c902a6635b56faea60d81dba1b0f4..ef51bcd19c2e0a4ba89a26df4b4a21094213937a 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java
|
||||
@@ -1626,6 +1626,18 @@ public class ServerPlayer extends Player {
|
||||
@ -51,10 +51,10 @@ index 770f99014f3cccbbc666f0aa8530dfb545ced7b6..bb313280236fb5c7dd2713a21edd3694
|
||||
@Override
|
||||
public void doCloseContainer() {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 11cc72f764913de577ecd6293e5316ae8c2c679c..712249fa1c1ce9af0dd07e8705bf944ac57842b5 100644
|
||||
index 2c15a39d19d392e8aa2f5d70bf1bab9816fc186a..c6a4252979da274ec5c3c6d95548c18e12977c3b 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -508,6 +508,11 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -506,6 +506,11 @@ public abstract class Player extends LivingEntity {
|
||||
this.containerMenu = this.inventoryMenu;
|
||||
}
|
||||
// Paper end - Inventory close reason
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Forward CraftEntity in teleport command
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index 1b9b3e8b2a85c6e921ec665c95061f2d3e3f678d..d07e8305939e9bcf19578de8e7996f98af2a89ba 100644
|
||||
index ef4c3c7329f9d1172118ead69c959f788500906b..463887d7db1c43a24cea7ec8cc48a260be0f33f8 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -3299,6 +3299,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3296,6 +3296,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
|
||||
public void restoreFrom(Entity original) {
|
||||
@ -22,7 +22,7 @@ index 1b9b3e8b2a85c6e921ec665c95061f2d3e3f678d..d07e8305939e9bcf19578de8e7996f98
|
||||
CompoundTag nbttagcompound = original.saveWithoutId(new CompoundTag());
|
||||
|
||||
nbttagcompound.remove("Dimension");
|
||||
@@ -3389,10 +3396,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -3386,10 +3393,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
}
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
@ -39,10 +39,10 @@ index a4d2ddbb9cee1682fc5d91e90d2fd0b74a47aa3c..e67bcde933d8d64ca1d9d18b938f1189
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
index 712249fa1c1ce9af0dd07e8705bf944ac57842b5..ff070dbb6c9fa525b484e4eb9ef58caad9f0f016 100644
|
||||
index c6a4252979da274ec5c3c6d95548c18e12977c3b..2b68edde9fa03aa04793d3a44dd6edbdbeaf6722 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/player/Player.java
|
||||
@@ -2332,9 +2332,23 @@ public abstract class Player extends LivingEntity {
|
||||
@@ -2330,9 +2330,23 @@ public abstract class Player extends LivingEntity {
|
||||
}
|
||||
|
||||
public static boolean isValidUsername(String name) {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 6f7a55bc2379f28e17b7e3500959972bbff9830d..a6c515e5bba6f359da5d7547947033546c1e853f 100644
|
||||
index 0fd9e6f740ce4224144f80027b7aa611bafc0827..30b017e730b48f395642231a8a60abd73ee46fc3 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -593,7 +593,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -592,7 +592,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
|
||||
LevelStem worlddimension = (LevelStem) dimensions.get(dimensionKey);
|
||||
|
||||
@ -18,7 +18,7 @@ index 6f7a55bc2379f28e17b7e3500959972bbff9830d..a6c515e5bba6f359da5d754794703354
|
||||
biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 492867fb2bf9a94f8fd5fac7d02f7d1538edcf21..aa4b4504c95826ed7b0dd6dae8388e2280bd1a23 100644
|
||||
index 4517d82ea55e919f8a5ce16fde2d401053892fac..3356ebe129757b073c82de59cf67743a96526794 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1258,7 +1258,7 @@ public final class CraftServer implements Server {
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Freeze Tick Lock API
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
index d07e8305939e9bcf19578de8e7996f98af2a89ba..db8d83dee46d325c0c07c5320a20302e431c5fcc 100644
|
||||
index 463887d7db1c43a24cea7ec8cc48a260be0f33f8..9080d797463dee45587ac9b812da16b931d1e410 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
||||
@@ -404,6 +404,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@ -25,7 +25,7 @@ index d07e8305939e9bcf19578de8e7996f98af2a89ba..db8d83dee46d325c0c07c5320a20302e
|
||||
this.setTicksFrozen(0);
|
||||
this.level().levelEvent((Player) null, 1009, this.blockPosition, 1);
|
||||
}
|
||||
@@ -2281,6 +2282,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2278,6 +2279,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (fromNetherPortal) {
|
||||
nbttagcompound.putBoolean("Paper.FromNetherPortal", true);
|
||||
}
|
||||
@ -35,7 +35,7 @@ index d07e8305939e9bcf19578de8e7996f98af2a89ba..db8d83dee46d325c0c07c5320a20302e
|
||||
// Paper end
|
||||
return nbttagcompound;
|
||||
} catch (Throwable throwable) {
|
||||
@@ -2425,6 +2429,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
@@ -2422,6 +2426,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
||||
if (spawnReason == null) {
|
||||
spawnReason = org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT;
|
||||
}
|
||||
|
@ -9,10 +9,10 @@ This might result in chunks loading far slower in the nether,
|
||||
for example.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index a6c515e5bba6f359da5d7547947033546c1e853f..846f5e341bc5bc3d286b1511dd87f54499b202d0 100644
|
||||
index 30b017e730b48f395642231a8a60abd73ee46fc3..ab108b28393b38ab666e6ada5663306fc8053402 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1290,6 +1290,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1230,6 +1230,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
if (super.pollTask()) {
|
||||
return true;
|
||||
} else {
|
||||
@ -20,7 +20,7 @@ index a6c515e5bba6f359da5d7547947033546c1e853f..846f5e341bc5bc3d286b1511dd87f544
|
||||
if (this.tickRateManager.isSprinting() || this.haveTime()) {
|
||||
Iterator iterator = this.getAllLevels().iterator();
|
||||
|
||||
@@ -1297,12 +1298,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -1237,12 +1238,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
ServerLevel worldserver = (ServerLevel) iterator.next();
|
||||
|
||||
if (worldserver.getChunkSource().pollTask()) {
|
||||
|
@ -10,10 +10,10 @@ just looking at the LevelStem key, look at the DimensionType key which
|
||||
is one level below that. Defaults to off to keep vanilla behavior.
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 846f5e341bc5bc3d286b1511dd87f54499b202d0..7a81101b17a39ad8f7b44453c26c3afda33ae94e 100644
|
||||
index ab108b28393b38ab666e6ada5663306fc8053402..94241450e43ef4528889b8c102f3f7a5524f4b1b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -620,7 +620,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -619,7 +619,15 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
this.commandStorage = new CommandStorage(worldpersistentdata);
|
||||
} else {
|
||||
ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(11);
|
||||
|
@ -7,10 +7,10 @@ Some parts of legacy conversion will need the overworld
|
||||
to get the legacy structure data storage
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index 7a81101b17a39ad8f7b44453c26c3afda33ae94e..5a1c19f7964f282217097d94c0a9e3cc376f70fd 100644
|
||||
index 94241450e43ef4528889b8c102f3f7a5524f4b1b..77b7c6be67068763d556cebdb2ca7f696ce3c950 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -632,9 +632,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -631,9 +631,10 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
}
|
||||
|
||||
worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
|
||||
@ -23,7 +23,7 @@ index 7a81101b17a39ad8f7b44453c26c3afda33ae94e..5a1c19f7964f282217097d94c0a9e3cc
|
||||
|
||||
if (worlddata.getCustomBossEvents() != null) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7233fd7a789e72b9fa978f9c23086e8a23270426..2ef62cc94b8884b4e7e70f9ca926a0c6cd82e321 100644
|
||||
index d31bbbdee3610c16c156e7fb9ca884d773e90317..aba1755b198ea85823b514d535c9fd8864c10fab 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1288,10 +1288,11 @@ public final class CraftServer implements Server {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user