mirror of
https://github.com/Winds-Studio/Leaf.git
synced 2025-12-24 01:19:25 +00:00
318 lines
22 KiB
Diff
318 lines
22 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Dreeam <61569423+Dreeam-qwq@users.noreply.github.com>
|
|
Date: Mon, 29 Apr 2024 14:18:58 -0400
|
|
Subject: [PATCH] Fix Pufferfish and Purpur patches
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
index 1f4b3412396b1c5d142c0ad9123cacc2f225494b..561426280dff2af8015fec3108a8b8514d994679 100644
|
|
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
|
@@ -293,7 +293,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public static final int TICK_TIME = 1000000000 / MinecraftServer.TPS;
|
|
private static final int SAMPLE_INTERVAL = 20; // Paper - improve server tick loop
|
|
@Deprecated(forRemoval = true) // Paper
|
|
- public final double[] recentTps = new double[ 3 ];
|
|
+ public final double[] recentTps = new double[ 4 ]; // Purpur
|
|
// Spigot end
|
|
public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations; // Paper - add paper configuration files
|
|
public final GaleConfigurations galeConfigurations; // Gale - Gale configuration
|
|
@@ -306,7 +306,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
public volatile boolean abnormalExit = false; // Paper
|
|
public static final long SERVER_INIT = System.nanoTime(); // Paper - Lag compensation
|
|
|
|
- public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("MobSpawning"); // Pufferfish - optimize mob spawning
|
|
+ public gg.pufferfish.pufferfish.util.AsyncExecutor mobSpawnExecutor = new gg.pufferfish.pufferfish.util.AsyncExecutor("pufferfish-async-mob-spawning"); // Pufferfish - optimize mob spawning // Leaf - Unify thread name
|
|
|
|
public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
|
|
AtomicReference<S> atomicreference = new AtomicReference();
|
|
@@ -977,6 +977,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
LOGGER.error("[UPnP] Failed to close port {}", this.getPort());
|
|
}
|
|
}
|
|
+ // Purpur end
|
|
// CraftBukkit start
|
|
if (this.server != null) {
|
|
this.server.disablePlugins();
|
|
@@ -1231,9 +1232,12 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
|
tps15.add(currentTps, diff);
|
|
|
|
// Backwards compat with bad plugins
|
|
- this.recentTps[0] = tps1.getAverage();
|
|
- this.recentTps[1] = tps5.getAverage();
|
|
- this.recentTps[2] = tps15.getAverage();
|
|
+ // Purpur start
|
|
+ this.recentTps[0] = tps5s.getAverage();
|
|
+ this.recentTps[1] = tps1.getAverage();
|
|
+ this.recentTps[2] = tps5.getAverage();
|
|
+ this.recentTps[3] = tps15.getAverage();
|
|
+ // Purpur end
|
|
lagging = recentTps[0] < org.purpurmc.purpur.PurpurConfig.laggingThreshold; // Purpur
|
|
tickSection = currentTime;
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/server/gui/StatsComponent.java b/src/main/java/net/minecraft/server/gui/StatsComponent.java
|
|
index 096c89bd01cec2abd151bf6fffc4847d1bcd548f..cd0a8a6a1be75cab8bbb8ee3ac17bb732b9e7108 100644
|
|
--- a/src/main/java/net/minecraft/server/gui/StatsComponent.java
|
|
+++ b/src/main/java/net/minecraft/server/gui/StatsComponent.java
|
|
@@ -45,7 +45,7 @@ public class StatsComponent extends JComponent {
|
|
this.msgs[1] = "Avg tick: "
|
|
+ DECIMAL_FORMAT.format((double)this.server.getAverageTickTimeNanos() / (double)TimeUtil.NANOSECONDS_PER_MILLISECOND)
|
|
+ " ms";
|
|
- this.msgs[2] = "TPS from last 1m, 5m, 15m: " + String.join(", ", tpsAvg);
|
|
+ this.msgs[2] = "TPS from last 5s, 1m, 5m, 15m: " + String.join(", ", tpsAvg); // Purpur
|
|
// Paper end - Improve ServerGUI
|
|
this.values[this.vp++ & 0xFF] = (int)(l * 100L / Runtime.getRuntime().maxMemory());
|
|
this.repaint();
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerChunkCache.java b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
index af4fe64e190e73dcc5f2495d0b533547d8f57f1d..1af3a2c078dc802aca2297d188c5ac068e073d26 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerChunkCache.java
|
|
@@ -540,7 +540,7 @@ public class ServerChunkCache extends ChunkSource {
|
|
//this.lastSpawnState = spawnercreature_d; // Pufferfish - this is managed asynchronously
|
|
// Gale start - MultiPaper - skip unnecessary mob spawning computations
|
|
} else {
|
|
- spawnercreature_d = null;
|
|
+ lastSpawnState = null; // Leaf - Pufferfish - Optimize mob spawning
|
|
}
|
|
// Gale end - MultiPaper - skip unnecessary mob spawning computations
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
index b9d9ef327753272a537bebccc54d9fbc16ed3bdc..f8d11853af6bfc08d1bd8a0f537fd5760bfc04be 100644
|
|
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
|
|
@@ -843,7 +843,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
|
|
int i = this.getGameRules().getInt(GameRules.RULE_PLAYERS_SLEEPING_PERCENTAGE);
|
|
long j;
|
|
|
|
- if (this.purpurConfig.playersSkipNight && this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) {
|
|
+ if (this.purpurConfig.playersSkipNight && this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) { // Purpur
|
|
// CraftBukkit start
|
|
j = this.levelData.getDayTime() + 24000L;
|
|
TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (j - j % 24000L) - this.getDayTime());
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
index a1fae61c8d238b06915037eacec2cb0943e8d996..47928af7b85543fe74ad7272286df4e8b1921426 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -568,13 +568,29 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
}
|
|
|
|
// Purpur start - copied from Mob
|
|
+ // Gale start - JettPack - optimize sun burn tick - cache eye blockpos
|
|
+ private BlockPos cached_eye_blockpos;
|
|
+ private int cached_position_hashcode;
|
|
+ // Gale end - JettPack - optimize sun burn tick - cache eye blockpos
|
|
+
|
|
public boolean isSunBurnTick() {
|
|
if (this.level().isDay() && !this.level().isClientSide) {
|
|
- float f = this.getLightLevelDependentMagicValue();
|
|
- BlockPos blockposition = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
|
+ // Gale start - JettPack - optimize sun burn tick - optimizations and cache eye blockpos
|
|
+ int positionHashCode = this.position.hashCode();
|
|
+ if (this.cached_position_hashcode != positionHashCode) {
|
|
+ this.cached_eye_blockpos = BlockPos.containing(this.getX(), this.getEyeY(), this.getZ());
|
|
+ this.cached_position_hashcode = positionHashCode;
|
|
+ }
|
|
+
|
|
+ float f = this.getLightLevelDependentMagicValue(cached_eye_blockpos); // Pass BlockPos to getBrightness
|
|
+
|
|
+ // Check brightness first
|
|
+ if (f <= 0.5F) return false;
|
|
+ if (this.random.nextFloat() * 30.0F >= (f - 0.4F) * 2.0F) return false;
|
|
+ // Gale end - JettPack - optimize sun burn tick - optimizations and cache eye blockpos
|
|
boolean flag = this.isInWaterRainOrBubble() || this.isInPowderSnow || this.wasInPowderSnow;
|
|
|
|
- if (f > 0.5F && this.random.nextFloat() * 30.0F < (f - 0.4F) * 2.0F && !flag && this.level().canSeeSky(blockposition)) {
|
|
+ if (!flag && this.level().canSeeSky(this.cached_eye_blockpos)) { // Gale - JettPack - optimize sun burn tick - optimizations and cache eye blockpos
|
|
return true;
|
|
}
|
|
}
|
|
@@ -891,7 +907,7 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
|
public void tick() {
|
|
// Pufferfish start - entity TTL
|
|
if (type != EntityType.PLAYER && type.ttl >= 0 && this.tickCount >= type.ttl) {
|
|
- discard();
|
|
+ discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Purpur
|
|
return;
|
|
}
|
|
// Pufferfish end - entity TTL
|
|
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
index d06c5d16d312187b6a53c8995d524c0ec2d9f921..d55d869f0a389d58d001e59e26b1b5912b5c94a8 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
|
@@ -1068,17 +1068,19 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
|
if (entity != null) {
|
|
EntityType<?> entitytypes = entity.getType();
|
|
|
|
+ // Gale start - Petal - reduce skull ItemStack lookups for reduced visibility
|
|
// Purpur start
|
|
- if (entitytypes == EntityType.SKELETON && itemstack.is(Items.SKELETON_SKULL)) {
|
|
+ if (entitytypes == EntityType.SKELETON && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.SKELETON_SKULL)) {
|
|
d0 *= entity.level().purpurConfig.skeletonHeadVisibilityPercent;
|
|
- } else if (entitytypes == EntityType.ZOMBIE && itemstack.is(Items.ZOMBIE_HEAD)) {
|
|
+ } else if (entitytypes == EntityType.ZOMBIE && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.ZOMBIE_HEAD)) {
|
|
d0 *= entity.level().purpurConfig.zombieHeadVisibilityPercent;
|
|
- } else if (entitytypes == EntityType.CREEPER && itemstack.is(Items.CREEPER_HEAD)) {
|
|
+ } else if (entitytypes == EntityType.CREEPER && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.CREEPER_HEAD)) {
|
|
d0 *= entity.level().purpurConfig.creeperHeadVisibilityPercent;
|
|
- } else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && itemstack.is(Items.PIGLIN_HEAD)) {
|
|
+ } else if ((entitytypes == EntityType.PIGLIN || entitytypes == EntityType.PIGLIN_BRUTE) && this.getItemBySlot(EquipmentSlot.HEAD).is(Items.PIGLIN_HEAD)) {
|
|
d0 *= entity.level().purpurConfig.piglinHeadVisibilityPercent;
|
|
}
|
|
// Purpur end
|
|
+ // Gale end - Petal - reduce skull ItemStack lookups for reduced visibility
|
|
|
|
// Purpur start
|
|
if (entity instanceof LivingEntity entityliving) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Mob.java b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
index 446237ffe4f40cf287c57c28a9866dfea39ed1bb..3a153b7f1092c2d4ac6e0115f611d60907619a40 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Mob.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Mob.java
|
|
@@ -747,7 +747,7 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
|
@Override
|
|
public void aiStep() {
|
|
super.aiStep();
|
|
- if (!this.level().isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && (this.level().purpurConfig.entitiesPickUpLootBypassMobGriefing || this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) {
|
|
+ if (!this.level().isClientSide && this.canPickUpLoot() && this.isAlive() && !this.dead && (this.level().purpurConfig.entitiesPickUpLootBypassMobGriefing || this.level().getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // Purpur
|
|
Vec3i baseblockposition = this.getPickupReach();
|
|
List<ItemEntity> list = this.level().getEntitiesOfClass(ItemEntity.class, this.getBoundingBox().inflate((double) baseblockposition.getX(), (double) baseblockposition.getY(), (double) baseblockposition.getZ()));
|
|
Iterator iterator = list.iterator();
|
|
@@ -1860,11 +1860,6 @@ public abstract class Mob extends LivingEntity implements EquipmentUser, Targeti
|
|
return flag;
|
|
}
|
|
|
|
- // Gale start - JettPack - optimize sun burn tick - cache eye blockpos
|
|
- private BlockPos cached_eye_blockpos;
|
|
- private int cached_position_hashcode;
|
|
- // Gale end - JettPack - optimize sun burn tick - cache eye blockpos
|
|
-
|
|
public boolean isSunBurnTick() {
|
|
return super.isSunBurnTick();
|
|
}
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
|
index 7db823e9edd70808c5629f0a7efd84fe40f42dd9..833858eacaf5ba788cb9f08a939379f0ff04b2cb 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TradeWithVillager.java
|
|
@@ -20,6 +20,7 @@ import org.jetbrains.annotations.Nullable;
|
|
public class TradeWithVillager extends Behavior<Villager> {
|
|
// Gale start - optimize villager data storage
|
|
private static final Item[] WHEAT_SINGLETON_ARRAY = {Items.WHEAT};
|
|
+ private static final Item[] NETHER_WART_SINGLETON_ARRAY = {Items.NETHER_WART}; // Leaf - sync with Gale's Optimize-villager-data-storage.patch
|
|
private @NotNull Item @Nullable [] trades = null;
|
|
// Gale end - optimize villager data storage
|
|
|
|
@@ -65,7 +66,7 @@ public class TradeWithVillager extends Behavior<Villager> {
|
|
|
|
// Purpur start
|
|
if (world.purpurConfig.villagerClericsFarmWarts && world.purpurConfig.villagerClericFarmersThrowWarts && entity.getVillagerData().getProfession() == VillagerProfession.CLERIC && entity.getInventory().countItem(Items.NETHER_WART) > Items.NETHER_WART.getDefaultMaxStackSize() / 2) {
|
|
- throwHalfStack(entity, ImmutableSet.of(Items.NETHER_WART), villager);
|
|
+ throwHalfStack(entity, NETHER_WART_SINGLETON_ARRAY, villager); // Leaf - sync with Gale's Optimize-villager-data-storage.patch
|
|
}
|
|
// Purpur end
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
|
index 9419f230910d0338fc4ac6e2e7b749ee7d5ee362..2fe25397526c77c3b6b5e96d71d3681c6e26a54e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/ai/sensing/SecondaryPoiSensor.java
|
|
@@ -24,19 +24,15 @@ public class SecondaryPoiSensor extends Sensor<Villager> {
|
|
|
|
@Override
|
|
protected void doTick(ServerLevel world, Villager entity) {
|
|
- // Gale start - Lithium - skip secondary POI sensor if absent
|
|
- var secondaryPoi = entity.getVillagerData().getProfession().secondaryPoi();
|
|
- if (secondaryPoi == null) { // Gale - optimize villager data storage
|
|
- entity.getBrain().eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
|
- return;
|
|
- }
|
|
- // Gale end - Lithium - skip secondary POI sensor if absent
|
|
// Purpur start - make sure clerics don't wander to soul sand when the option is off
|
|
Brain<?> brain = entity.getBrain();
|
|
- if (!world.purpurConfig.villagerClericsFarmWarts && entity.getVillagerData().getProfession() == net.minecraft.world.entity.npc.VillagerProfession.CLERIC) {
|
|
+ // Gale start - Lithium - skip secondary POI sensor if absent
|
|
+ var secondaryPoi = entity.getVillagerData().getProfession().secondaryPoi();
|
|
+ if (secondaryPoi == null || (!world.purpurConfig.villagerClericsFarmWarts && entity.getVillagerData().getProfession() == net.minecraft.world.entity.npc.VillagerProfession.CLERIC)) { // Gale - optimize villager data storage
|
|
brain.eraseMemory(MemoryModuleType.SECONDARY_JOB_SITE);
|
|
return;
|
|
}
|
|
+ // Gale end - Lithium - skip secondary POI sensor if absent
|
|
// Purpur end
|
|
ResourceKey<Level> resourceKey = world.dimension();
|
|
BlockPos blockPos = entity.blockPosition();
|
|
diff --git a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
index 92521cbedcf89a855f10a3401933acaf84bc3f98..0bd72f76a65b6248f4e700877b2bda702f9590df 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/ArmorStand.java
|
|
@@ -680,7 +680,7 @@ public class ArmorStand extends LivingEntity {
|
|
|
|
@Override
|
|
public void tick() {
|
|
- maxUpStep = level().purpurConfig.armorstandStepHeight;
|
|
+ maxUpStep = level().purpurConfig.armorstandStepHeight; // Purpur
|
|
// Paper start - Allow ArmorStands not to tick
|
|
if (!this.canTick) {
|
|
if (this.noTickPoseDirty) {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/monster/Blaze.java b/src/main/java/net/minecraft/world/entity/monster/Blaze.java
|
|
index 27db17e19dd95e99f7bd67747eba3c3072b48ed5..4c87fa47a97a75a270a0f1332ee6aea69f9cf9c5 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/monster/Blaze.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/monster/Blaze.java
|
|
@@ -72,7 +72,6 @@ public class Blaze extends Monster {
|
|
setDeltaMovement(mot.scale(0.9D));
|
|
}
|
|
}
|
|
- // Purpur end
|
|
|
|
@Override
|
|
public void initAttributes() {
|
|
@@ -83,6 +82,7 @@ public class Blaze extends Monster {
|
|
protected boolean isAlwaysExperienceDropper() {
|
|
return this.level().purpurConfig.blazeAlwaysDropExp;
|
|
}
|
|
+ // Purpur end
|
|
|
|
@Override
|
|
protected void registerGoals() {
|
|
diff --git a/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java b/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
|
index 8f36f113e8eb3236ce53ad9cce320c3d6253d248..ebe79d9ad2934b53085c8a720fdfca0a6eda05ca 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/npc/VillagerProfession.java
|
|
@@ -31,7 +31,7 @@ public record VillagerProfession(
|
|
public static final VillagerProfession ARMORER = register("armorer", PoiTypes.ARMORER, SoundEvents.VILLAGER_WORK_ARMORER);
|
|
public static final VillagerProfession BUTCHER = register("butcher", PoiTypes.BUTCHER, SoundEvents.VILLAGER_WORK_BUTCHER);
|
|
public static final VillagerProfession CARTOGRAPHER = register("cartographer", PoiTypes.CARTOGRAPHER, SoundEvents.VILLAGER_WORK_CARTOGRAPHER);
|
|
- public static final VillagerProfession CLERIC = register("cleric", PoiTypes.CLERIC, ImmutableSet.of(Items.NETHER_WART), ImmutableSet.of(Blocks.SOUL_SAND), SoundEvents.VILLAGER_WORK_CLERIC); // Purpur
|
|
+ public static final VillagerProfession CLERIC = register("cleric", PoiTypes.CLERIC, new Item[] {Items.NETHER_WART}, Blocks.SOUL_SAND, SoundEvents.VILLAGER_WORK_CLERIC); // Purpur // Leaf - sync with Gale's Optimize-villager-data-storage.patch
|
|
public static final VillagerProfession FARMER = register(
|
|
"farmer",
|
|
PoiTypes.FARMER,
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
index 330d6badfbd096e4aec873dcb419df7975cb60a3..abb950417bf5db30f37e50605e897150bba67352 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java
|
|
@@ -71,7 +71,7 @@ public abstract class Projectile extends Entity implements TraceableEntity {
|
|
int maxChunkLoadsPerProjectile = maxProjectileChunkLoadsConfig.perProjectile.max;
|
|
if (maxChunkLoadsPerProjectile >= 0 && this.chunksLoadedByProjectile >= maxChunkLoadsPerProjectile) {
|
|
if (maxProjectileChunkLoadsConfig.perProjectile.removeFromWorldAfterReachLimit) {
|
|
- this.discard();
|
|
+ this.discard(org.bukkit.event.entity.EntityRemoveEvent.Cause.DISCARD); // Purpur
|
|
} else if (maxProjectileChunkLoadsConfig.perProjectile.resetMovementAfterReachLimit) {
|
|
this.setDeltaMovement(0, this.getDeltaMovement().y, 0);
|
|
}
|
|
diff --git a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
index 75af21644eaf78abdebd722b671f3c47aa083a25..21d71db5ef632ae685c0a852fda54b8d6be183ee 100644
|
|
--- a/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
+++ b/src/main/java/org/galemc/gale/version/AbstractPaperVersionFetcher.java
|
|
@@ -101,10 +101,10 @@ public abstract class AbstractPaperVersionFetcher implements VersionFetcher {
|
|
// Gale end - branding changes - version fetcher
|
|
|
|
return switch (distance) {
|
|
- case DISTANCE_ERROR -> text("Error obtaining version information", NamedTextColor.YELLOW);
|
|
- case 0 -> text("You are running the latest version", NamedTextColor.GREEN);
|
|
- case DISTANCE_UNKNOWN -> text("Unknown version", NamedTextColor.YELLOW);
|
|
- default -> text("You are " + distance + " version(s) behind", NamedTextColor.YELLOW)
|
|
+ case DISTANCE_ERROR -> text("* Error obtaining version information", NamedTextColor.RED); // Purpur
|
|
+ case 0 -> text("* You are running the latest version", NamedTextColor.GREEN); // Purpur
|
|
+ case DISTANCE_UNKNOWN -> text("* Unknown version", NamedTextColor.YELLOW); // Purpur
|
|
+ default -> text("* You are " + distance + " version(s) behind", NamedTextColor.YELLOW) // Purpur
|
|
.append(Component.newline())
|
|
.append(text("Download the new version at: ")
|
|
.append(text(this.downloadPage, NamedTextColor.GOLD) // Gale - branding changes - version fetcher
|