mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-06-23 10:47:47 +02:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@7b66699b 26.2-rc-2 PaperMC/Paper@bb676e22 actual 26.2-rc-2 PaperMC/Paper@a737972b Fix isAllowedInPeaceful call PaperMC/Paper@c35810c3 Update deps to match Vanilla PaperMC/Paper@e5643cd4 Update Vex#getSummoner return type PaperMC/Paper@e00936a3 [ci/skip] update log4j for the api PaperMC/Paper@eb5df78f fix wither spawning parity and remove openSign var PaperMC/Paper@d1aca9a6 Apply most remaining feature patches
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
@@ -165,6 +_,7 @@
|
||||
SlotProvider,
|
||||
DebugValueSource,
|
||||
TypedInstance<EntityType<?>> {
|
||||
TypedInstance<EntityType<?>>, ca.spottedleaf.moonrise.patches.chunk_system.entity.ChunkSystemEntity, ca.spottedleaf.moonrise.patches.entity_tracker.EntityTrackerEntity { // Paper - rewrite chunk system // Paper - optimise entity tracker
|
||||
+ public static javax.script.ScriptEngine scriptEngine = new javax.script.ScriptEngineManager().getEngineByName("rhino"); // Purpur - Configurable entity base attributes
|
||||
// CraftBukkit start
|
||||
private static final int CURRENT_LEVEL = 2;
|
||||
static boolean isLevelAtLeast(ValueInput input, int level) {
|
||||
@@ -341,8 +_,9 @@
|
||||
@@ -297,8 +_,9 @@
|
||||
public double xOld;
|
||||
public double yOld;
|
||||
public double zOld;
|
||||
@@ -19,7 +19,7 @@
|
||||
public int tickCount;
|
||||
private int remainingFireTicks;
|
||||
private final EntityFluidInteraction fluidInteraction = new EntityFluidInteraction(Set.of(FluidTags.WATER, FluidTags.LAVA));
|
||||
@@ -375,8 +_,8 @@
|
||||
@@ -331,8 +_,8 @@
|
||||
public @Nullable PortalProcessor portalProcess;
|
||||
public int portalCooldown;
|
||||
private boolean invulnerable;
|
||||
@@ -30,7 +30,7 @@
|
||||
private boolean hasGlowingTag;
|
||||
private final Set<String> tags = new io.papermc.paper.util.SizeLimitedSet<>(new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<>(), MAX_ENTITY_TAG_COUNT); // Paper - fully limit tag size - replace set impl
|
||||
private final double[] pistonDeltas = new double[]{0.0, 0.0, 0.0};
|
||||
@@ -427,6 +_,7 @@
|
||||
@@ -382,6 +_,7 @@
|
||||
private final int despawnTime; // Paper - entity despawn time limit
|
||||
public int totalEntityAge; // Paper - age-like counter for all entities
|
||||
public final io.papermc.paper.entity.activation.ActivationType activationType = io.papermc.paper.entity.activation.ActivationType.activationTypeFor(this); // Paper - EAR 2/tracking ranges
|
||||
@@ -38,9 +38,9 @@
|
||||
// Paper start - EAR 2
|
||||
public final boolean defaultActivationState;
|
||||
public long activatedTick = Integer.MIN_VALUE;
|
||||
@@ -444,11 +_,23 @@
|
||||
@@ -549,11 +_,23 @@
|
||||
}
|
||||
// Paper end
|
||||
// Paper end - optimise entity tracker
|
||||
|
||||
+ // Purpur start - Add canSaveToDisk to Entity
|
||||
+ public boolean canSaveToDisk() {
|
||||
@@ -62,7 +62,7 @@
|
||||
this.position = Vec3.ZERO;
|
||||
this.blockPosition = BlockPos.ZERO;
|
||||
this.chunkPosition = ChunkPos.ZERO;
|
||||
@@ -850,6 +_,7 @@
|
||||
@@ -955,6 +_,7 @@
|
||||
&& this.level.paperConfig().environment.netherCeilingVoidDamageHeight.test(v -> this.getY() >= v)
|
||||
&& (!(this instanceof Player player) || !player.getAbilities().invulnerable))) {
|
||||
// Paper end - Configurable nether ceiling damage
|
||||
@@ -70,7 +70,7 @@
|
||||
this.onBelowWorld();
|
||||
}
|
||||
}
|
||||
@@ -1945,7 +_,7 @@
|
||||
@@ -2092,7 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean fireImmune() {
|
||||
@@ -79,7 +79,7 @@
|
||||
}
|
||||
|
||||
public boolean causeFallDamage(final double fallDistance, final float damageModifier, final DamageSource damageSource) {
|
||||
@@ -2531,7 +_,7 @@
|
||||
@@ -2682,7 +_,7 @@
|
||||
output.putBoolean("Bukkit.invisible", this.persistentInvisibility);
|
||||
}
|
||||
// SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
|
||||
@@ -88,7 +88,7 @@
|
||||
output.putInt("Bukkit.MaxAirSupply", this.getMaxAirSupply());
|
||||
}
|
||||
output.putInt("Spigot.ticksLived", this.totalEntityAge); // Paper
|
||||
@@ -2617,6 +_,11 @@
|
||||
@@ -2768,6 +_,11 @@
|
||||
output.putBoolean("Paper.FreezeLock", true);
|
||||
}
|
||||
// Paper end
|
||||
@@ -100,7 +100,7 @@
|
||||
} catch (Throwable t) {
|
||||
CrashReport report = CrashReport.forThrowable(t, "Saving entity NBT");
|
||||
CrashReportCategory category = report.addCategory("Entity being saved");
|
||||
@@ -2740,6 +_,9 @@
|
||||
@@ -2891,6 +_,9 @@
|
||||
}
|
||||
freezeLocked = input.getBooleanOr("Paper.FreezeLock", false);
|
||||
// Paper end
|
||||
@@ -110,7 +110,7 @@
|
||||
} catch (Throwable t) {
|
||||
CrashReport report = CrashReport.forThrowable(t, "Loading entity NBT");
|
||||
CrashReportCategory category = report.addCategory("Entity being loaded");
|
||||
@@ -2916,6 +_,7 @@
|
||||
@@ -3156,6 +_,7 @@
|
||||
if (this.isAlive() && this instanceof Leashable leashable) {
|
||||
if (leashable.getLeashHolder() == player) {
|
||||
if (!this.level().isClientSide()) {
|
||||
@@ -118,7 +118,7 @@
|
||||
// Paper start - EntityUnleashEvent
|
||||
if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerUnleashEntityEvent(
|
||||
leashable, player, hand, !player.hasInfiniteMaterials(), true
|
||||
@@ -3323,15 +_,18 @@
|
||||
@@ -3563,15 +_,18 @@
|
||||
return Vec3.directionFromRotation(this.getRotationVector());
|
||||
}
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4065,7 +_,7 @@
|
||||
@@ -4311,7 +_,7 @@
|
||||
}
|
||||
|
||||
public boolean canUsePortal(final boolean ignorePassenger) {
|
||||
@@ -147,7 +147,7 @@
|
||||
}
|
||||
|
||||
public boolean canTeleport(final Level from, final Level to) {
|
||||
@@ -4615,6 +_,12 @@
|
||||
@@ -4863,6 +_,12 @@
|
||||
return Mth.lerp(partial, this.yRotO, this.yRot);
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@
|
||||
public boolean touchingUnloadedChunk() {
|
||||
AABB box = this.getBoundingBox().inflate(1.0);
|
||||
int x0 = Mth.floor(box.minX);
|
||||
@@ -4909,7 +_,7 @@
|
||||
@@ -5166,7 +_,7 @@
|
||||
}
|
||||
|
||||
public float maxUpStep() {
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
if (damage < 0.0F) {
|
||||
damage = 0.0F;
|
||||
}
|
||||
@@ -1724,10 +_,10 @@
|
||||
@@ -1722,10 +_,10 @@
|
||||
protected @Nullable Player resolvePlayerResponsibleForDamage(final DamageSource source) {
|
||||
Entity sourceEntity = source.getEntity();
|
||||
if (sourceEntity instanceof Player playerSource) {
|
||||
@@ -118,7 +118,7 @@
|
||||
} else {
|
||||
this.lastHurtByPlayer = null;
|
||||
this.lastHurtByPlayerMemoryTime = 0;
|
||||
@@ -1779,6 +_,17 @@
|
||||
@@ -1777,6 +_,17 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -136,23 +136,18 @@
|
||||
final org.bukkit.inventory.EquipmentSlot handSlot = (usedHand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(usedHand) : null;
|
||||
final EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
|
||||
event.setCancelled(protectionItem == null);
|
||||
@@ -1956,6 +_,7 @@
|
||||
@@ -1930,8 +_,10 @@
|
||||
protected void dropAllDeathLoot(final ServerLevel level, final DamageSource source) {
|
||||
boolean playerKilled = this.lastHurtByPlayerMemoryTime > 0;
|
||||
this.dropEquipment(level); // CraftBukkit - from below
|
||||
if (this.shouldDropLoot(level)) {
|
||||
+ if (!(source.is(net.minecraft.world.damagesource.DamageTypes.CRAMMING) && level().purpurConfig.disableDropsOnCrammingDeath)) { // Purpur - Disable loot drops on death by cramming
|
||||
this.dropFromLootTable(level, source, playerKilled);
|
||||
// Paper start
|
||||
final boolean prev = this.clearEquipmentSlots;
|
||||
@@ -1964,6 +_,7 @@
|
||||
// Paper end
|
||||
this.dropCustomDeathLoot(level, source, playerKilled);
|
||||
this.clearEquipmentSlots = prev; // Paper
|
||||
+ } // Purpur - Disable loot drops on death by cramming
|
||||
+ }
|
||||
}
|
||||
|
||||
// CraftBukkit start - Call death event // Paper start - call advancement triggers with correct entity equipment
|
||||
@@ -3323,6 +_,7 @@
|
||||
this.dropEquipment(level);
|
||||
@@ -3280,6 +_,7 @@
|
||||
float dmg = (float)(diff * 10.0 - 3.0);
|
||||
if (dmg > 0.0F) {
|
||||
this.playSound(this.getFallDamageSound((int)dmg), 1.0F, 1.0F);
|
||||
@@ -160,7 +155,7 @@
|
||||
this.hurt(this.damageSources().flyIntoWall(), dmg);
|
||||
}
|
||||
}
|
||||
@@ -4816,6 +_,12 @@
|
||||
@@ -4773,6 +_,12 @@
|
||||
? slot == EquipmentSlot.MAINHAND && this.canUseSlot(EquipmentSlot.MAINHAND)
|
||||
: slot == equippable.slot() && this.canUseSlot(equippable.slot()) && equippable.canBeEquippedBy(this.typeHolder());
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
// Paper start - allow changing despawnInPeaceful
|
||||
this.despawnInPeacefulOverride = readDespawnInPeacefulOverride(input);
|
||||
}
|
||||
@@ -1289,7 +_,7 @@
|
||||
@@ -1287,7 +_,7 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
return groupData;
|
||||
}
|
||||
|
||||
@@ -1646,6 +_,7 @@
|
||||
@@ -1644,6 +_,7 @@
|
||||
}
|
||||
|
||||
this.postPiercingAttack();
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
+++ b/net/minecraft/world/entity/ai/behavior/AcquirePoi.java
|
||||
@@ -95,7 +_,7 @@
|
||||
return true;
|
||||
@@ -96,7 +_,7 @@
|
||||
};
|
||||
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = poiManager.findAllClosestFirstWithType(
|
||||
- poiType, cacheTest, body.blockPosition(), SCAN_RANGE, PoiManager.Occupancy.HAS_SPACE
|
||||
+ poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, PoiManager.Occupancy.HAS_SPACE // Purpur - Configurable villager search radius
|
||||
)
|
||||
.limit(5L)
|
||||
.filter(px -> validPoi.test(level, (BlockPos)px.getSecond()))
|
||||
// Paper start - optimise POI searches
|
||||
java.util.List<Pair<Holder<PoiType>, BlockPos>> poiPositionsRaw = new java.util.ArrayList<>();
|
||||
- ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), SCAN_RANGE, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw);
|
||||
+ ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.findNearestPoiPositions(poiManager, poiType, cacheTest, body.blockPosition(), level.purpurConfig.villagerAcquirePoiSearchRadius, Double.MAX_VALUE, PoiManager.Occupancy.HAS_SPACE, ca.spottedleaf.moonrise.patches.poi_lookup.PoiAccess.LOAD_FOR_SEARCHING, 5, poiPositionsRaw); // Purpur - Configurable villager search radius
|
||||
Set<Pair<Holder<PoiType>, BlockPos>> poiPositions = new java.util.HashSet<>(poiPositionsRaw.size());
|
||||
for (Pair<Holder<PoiType>, BlockPos> pair : poiPositionsRaw) {
|
||||
if (validPoi.test(level, pair.getSecond())) {
|
||||
|
||||
@@ -20,10 +20,10 @@
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -722,6 +_,29 @@
|
||||
return slot == EquipmentSlot.MAINHAND;
|
||||
@@ -715,6 +_,29 @@
|
||||
private boolean trusts(final LivingEntity entity) {
|
||||
return this.getTrustedEntities().anyMatch(trusted -> trusted.matches(entity));
|
||||
}
|
||||
// Paper end
|
||||
+
|
||||
+ // Purpur start - Tulips change fox type
|
||||
+ @Override
|
||||
@@ -49,4 +49,4 @@
|
||||
+ // Purpur end - Tulips change fox type
|
||||
|
||||
@Override
|
||||
// Paper start - Cancellable death event
|
||||
// Paper start - Fix MC-153010 (dropCustomDeathLoot is only called when shouldDropLoot = true)
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
+++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
|
||||
@@ -968,6 +_,7 @@
|
||||
@@ -615,7 +_,7 @@
|
||||
}
|
||||
|
||||
int xpCount = 500;
|
||||
- if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) {
|
||||
+ if (this.dragonFight != null && (level().purpurConfig.enderDragonAlwaysDropsFullExp || !this.dragonFight.hasPreviouslyKilledDragon())) { // Purpur - Ender dragon always drop full exp
|
||||
xpCount = 12000;
|
||||
}
|
||||
xpCount = this.expToDrop; // CraftBukkit - SPIGOT-2420: Moved up to #getExpReward method
|
||||
@@ -960,6 +_,7 @@
|
||||
|
||||
@Override
|
||||
protected boolean canRide(final Entity vehicle) {
|
||||
@@ -8,12 +17,3 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1003,7 +_,7 @@
|
||||
boolean shouldDrop = level.getGameRules().get(GameRules.MOB_DROPS);
|
||||
int xpCount = 500;
|
||||
|
||||
- if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) {
|
||||
+ if (this.dragonFight != null && (level().purpurConfig.enderDragonAlwaysDropsFullExp || !this.dragonFight.hasPreviouslyKilledDragon())) { // Purpur - Ender dragon always drop full exp
|
||||
xpCount = 12000;
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
}
|
||||
|
||||
public ArmorStand(final Level level, final double x, final double y, final double z) {
|
||||
@@ -547,6 +_,7 @@
|
||||
@@ -550,6 +_,7 @@
|
||||
// Paper start - Allow ArmorStands not to tick
|
||||
@Override
|
||||
public void tick() {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
|
||||
@@ -182,6 +_,11 @@
|
||||
@@ -183,6 +_,11 @@
|
||||
public static boolean checkPiglinSpawnRules(
|
||||
final EntityType<Piglin> type, final LevelAccessor level, final EntitySpawnReason spawnReason, final BlockPos pos, final RandomSource random
|
||||
) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
+++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
|
||||
@@ -664,14 +_,24 @@
|
||||
@@ -660,14 +_,24 @@
|
||||
}
|
||||
|
||||
public static boolean isWearingSafeArmor(final LivingEntity livingEntity) {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
--- a/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/net/minecraft/world/item/ItemStack.java
|
||||
@@ -452,6 +_,7 @@
|
||||
@@ -456,6 +_,7 @@
|
||||
// revert back all captured blocks
|
||||
for (org.bukkit.block.BlockState blockstate : blocks) {
|
||||
((org.bukkit.craftbukkit.block.CraftBlockState) blockstate).revertPlace(true); // poi updates needs to be skipped since the poi were never registered as part of the capture
|
||||
+ ((org.bukkit.craftbukkit.block.CraftBlock) blockstate.getBlock()).getBlockState().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
|
||||
for (org.bukkit.craftbukkit.block.CraftBlockState snapshot : capturedBlockStates) {
|
||||
snapshot.revertPlace(true); // poi updates needs to be skipped since the poi were never registered as part of the capture
|
||||
+ snapshot.getBlock().getBlockState().getBlock().forgetPlacer(); // Purpur - Store placer on Block when placed
|
||||
}
|
||||
|
||||
SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
|
||||
@@ -475,6 +_,7 @@
|
||||
} else {
|
||||
// Change the stack to its new contents if it hasn't been tampered with.
|
||||
@@ -477,6 +_,7 @@
|
||||
if (!(block.getBlock() instanceof net.minecraft.world.level.block.BaseEntityBlock)) { // Containers get placed automatically
|
||||
block.onPlace(level, newPos, oldBlock, true, context);
|
||||
}
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
level.notifyAndUpdatePhysics(newPos, null, oldBlock, block, level.getBlockState(newPos), updateFlags, net.minecraft.world.level.block.Block.UPDATE_LIMIT); // send null chunk as chunk.k() returns false by this point
|
||||
}
|
||||
@@ -579,6 +_,26 @@
|
||||
@@ -566,6 +_,26 @@
|
||||
return this.isDamageableItem() && this.getDamageValue() > 0;
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
public int getDamageValue() {
|
||||
return Mth.clamp(this.getOrDefault(DataComponents.DAMAGE, 0), 0, this.getMaxDamage());
|
||||
}
|
||||
@@ -1237,6 +_,12 @@
|
||||
@@ -1230,6 +_,12 @@
|
||||
public boolean isEnchanted() {
|
||||
return !this.getOrDefault(DataComponents.ENCHANTMENTS, ItemEnchantments.EMPTY).isEmpty();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/EntityGetter.java
|
||||
+++ b/net/minecraft/world/level/EntityGetter.java
|
||||
@@ -142,7 +_,7 @@
|
||||
@@ -183,7 +_,7 @@
|
||||
|
||||
default boolean hasNearbyAlivePlayer(final double x, final double y, final double z, final double range) {
|
||||
for (Player player : this.players()) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/Level.java
|
||||
+++ b/net/minecraft/world/level/Level.java
|
||||
@@ -171,10 +_,54 @@
|
||||
@@ -172,10 +_,54 @@
|
||||
}
|
||||
// Paper end - add paper world config
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
public CraftWorld getWorld() {
|
||||
return this.world;
|
||||
}
|
||||
@@ -220,6 +_,8 @@
|
||||
@@ -853,6 +_,8 @@
|
||||
final org.bukkit.NamespacedKey worldKey = CraftNamespacedKey.fromMinecraft(dimension.identifier()); // Paper
|
||||
this.spigotConfig = new org.spigotmc.SpigotWorldConfig(bukkitName, worldKey); // Spigot
|
||||
this.paperConfig = paperWorldConfigCreator.apply(this.spigotConfig); // Paper - create paper world config
|
||||
@@ -64,8 +64,8 @@
|
||||
this.generator = generator;
|
||||
this.world = new CraftWorld((ServerLevel) this, worldKey, biomeProvider, environment);
|
||||
|
||||
@@ -1505,4 +_,14 @@
|
||||
return ret;
|
||||
@@ -2203,4 +_,14 @@
|
||||
return this.moonrise$getEntityLookup().getEntityCount(); // Paper - rewrite chunk system
|
||||
}
|
||||
// Paper end - allow patching this logic
|
||||
+
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/NaturalSpawner.java
|
||||
+++ b/net/minecraft/world/level/NaturalSpawner.java
|
||||
@@ -213,7 +_,7 @@
|
||||
@@ -286,7 +_,7 @@
|
||||
pos.set(x, yStart, z);
|
||||
double xx = x + 0.5;
|
||||
double zz = z + 0.5;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
--- a/net/minecraft/world/level/ServerExplosion.java
|
||||
+++ b/net/minecraft/world/level/ServerExplosion.java
|
||||
@@ -341,6 +_,23 @@
|
||||
}
|
||||
|
||||
public int explode() {
|
||||
@@ -631,6 +_,23 @@
|
||||
this.directMappedBlockCache = new ca.spottedleaf.moonrise.patches.collisions.ExplosionBlockCache[BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH * BLOCK_EXPLOSION_CACHE_WIDTH];
|
||||
this.mutablePos = new BlockPos.MutableBlockPos();
|
||||
// Paper end - collision optimisations
|
||||
+ // Purpur start - add PreExplodeEvents
|
||||
+ if (this.source != null) {
|
||||
+ org.bukkit.Location location = new org.bukkit.Location(this.level.getWorld(), this.center.x, this.center.y, this.center.z);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/WitherSkullBlock.java
|
||||
+++ b/net/minecraft/world/level/block/WitherSkullBlock.java
|
||||
@@ -69,6 +_,7 @@
|
||||
@@ -68,6 +_,7 @@
|
||||
);
|
||||
witherBoss.yBodyRot = match.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F;
|
||||
witherBoss.makeInvulnerable();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
+++ b/net/minecraft/world/level/block/entity/BlockEntity.java
|
||||
@@ -106,6 +_,10 @@
|
||||
@@ -107,6 +_,10 @@
|
||||
input.read("PublicBukkitValues", CompoundTag.CODEC)
|
||||
.ifPresent(this.persistentDataContainer::putAll);
|
||||
// Paper end - read persistent data container
|
||||
@@ -11,7 +11,7 @@
|
||||
}
|
||||
|
||||
public final void loadWithComponents(final ValueInput input) {
|
||||
@@ -123,6 +_,11 @@
|
||||
@@ -124,6 +_,11 @@
|
||||
output.store("PublicBukkitValues", CompoundTag.CODEC, this.persistentDataContainer.toTagCompound());
|
||||
}
|
||||
// CraftBukkit end
|
||||
@@ -23,7 +23,7 @@
|
||||
}
|
||||
|
||||
public final CompoundTag saveWithFullMetadata(final HolderLookup.Provider registries) {
|
||||
@@ -388,4 +_,16 @@
|
||||
@@ -390,4 +_,16 @@
|
||||
return this.blockEntity.getNameForReporting() + "@" + this.blockEntity.getBlockPos();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
+++ b/net/minecraft/world/level/chunk/storage/EntityStorage.java
|
||||
@@ -94,6 +_,7 @@
|
||||
ListTag entities = new ListTag();
|
||||
final java.util.Map<net.minecraft.world.entity.EntityType<?>, Integer> savedEntityCounts = new java.util.HashMap<>(); // Paper - Entity load/save limit per chunk
|
||||
chunk.getEntities().forEach(e -> {
|
||||
TagValueOutput output = TagValueOutput.createWithContext(reporter.forChild(e.problemPath()), e.registryAccess());
|
||||
+ if (!e.canSaveToDisk()) return; // Purpur - Add canSaveToDisk to Entity
|
||||
if (e.save(output)) {
|
||||
CompoundTag result = output.buildResult();
|
||||
entities.add(result);
|
||||
// Paper start - Entity load/save limit per chunk
|
||||
final EntityType<?> entityType = e.getType();
|
||||
final int saveLimit = this.level.paperConfig().chunks.entityPerChunkSaveLimit.getOrDefault(entityType, -1);
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
+++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
|
||||
@@ -309,7 +_,7 @@
|
||||
|
||||
// Paper start
|
||||
private static void printOversizedLog(String msg, Path file, int x, int z) {
|
||||
- LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - DO NOT REPORT THIS TO PAPER - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4);
|
||||
+ LOGGER.error("{} ({} - {},{}) Go clean it up to remove this message. /minecraft:tp {} 128 {} - DO NOT REPORT THIS TO PURPUR - You may ask for help on Discord, but do not file an issue. These error messages can not be removed.", msg, file.toString().replaceAll(".+[\\\\/]", ""), x, z, x << 4, z << 4); // Purpur - Rebrand
|
||||
}
|
||||
|
||||
private static CompoundTag readOversizedChunk(RegionFile regionfile, ChunkPos chunkCoordinate) throws IOException {
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/world/level/material/FlowingFluid.java
|
||||
+++ b/net/minecraft/world/level/material/FlowingFluid.java
|
||||
@@ -192,7 +_,7 @@
|
||||
@@ -234,7 +_,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
BlockState belowState = level.getBlockState(mutablePos.setWithOffset(pos, Direction.DOWN));
|
||||
FluidState belowFluid = belowState.getFluidState();
|
||||
if (belowState.isSolid() || this.isSourceBlockOfThisType(belowFluid)) {
|
||||
@@ -280,6 +_,12 @@
|
||||
@@ -320,6 +_,12 @@
|
||||
}
|
||||
|
||||
protected abstract boolean canConvertToSource(ServerLevel level);
|
||||
|
||||
Reference in New Issue
Block a user