mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 09:57:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@e16fefb [ci skip] add 'accepted' to Done project category (#9429) PaperMC/Paper@171ba7c Move Log4j plugins to own source set (#9428) PaperMC/Paper@4356758 Call missing BlockDispenseEvents (#8518) PaperMC/Paper@c0936a7 Updated Upstream (Bukkit/CraftBukkit/Spigot) (#9440) PaperMC/Paper@12c9700 Fix ThrownEggHatchEvent#setHatching (#9448)
This commit is contained in:
@@ -5,10 +5,10 @@ Subject: [PATCH] Config MobEffect by world
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/effect/MobEffect.java b/src/main/java/net/minecraft/world/effect/MobEffect.java
|
||||
index bcce17f884b57e619749351b7b2047f0a5f9be71..878f3da0067f89f47141f41c733bef67f0987929 100644
|
||||
index 53cc6befb752affcfec65e18365f6d369448d407..01850fc596a85974287ff6750427186d21acac41 100644
|
||||
--- a/src/main/java/net/minecraft/world/effect/MobEffect.java
|
||||
+++ b/src/main/java/net/minecraft/world/effect/MobEffect.java
|
||||
@@ -60,16 +60,16 @@ public class MobEffect {
|
||||
@@ -59,16 +59,16 @@ public class MobEffect {
|
||||
public void applyEffectTick(LivingEntity entity, int amplifier) {
|
||||
if (this == MobEffects.REGENERATION) {
|
||||
if (entity.getHealth() < entity.getMaxHealth()) {
|
||||
@@ -30,15 +30,15 @@ index bcce17f884b57e619749351b7b2047f0a5f9be71..878f3da0067f89f47141f41c733bef67
|
||||
} else if (this == MobEffects.SATURATION && entity instanceof Player) {
|
||||
if (!entity.level().isClientSide) {
|
||||
// CraftBukkit start
|
||||
@@ -79,7 +79,7 @@ public class MobEffect {
|
||||
@@ -76,7 +76,7 @@ public class MobEffect {
|
||||
int oldFoodLevel = entityhuman.getFoodData().foodLevel;
|
||||
org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, amplifier + 1 + oldFoodLevel);
|
||||
|
||||
if (!event.isCancelled()) {
|
||||
- entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 1.0F);
|
||||
+ entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, entity.level().purpurConfig.humanSaturationRegenAmount); // Purpur
|
||||
}
|
||||
|
||||
((ServerPlayer) entityhuman).connection.send(new ClientboundSetHealthPacket(((ServerPlayer) entityhuman).getBukkitEntity().getScaledHealth(), entityhuman.getFoodData().foodLevel, entityhuman.getFoodData().saturationLevel));
|
||||
((CraftPlayer) entityhuman.getBukkitEntity()).sendHealthUpdate();
|
||||
diff --git a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java b/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
index 3f4631c2107145248a1fff538b1bf8fa9d4483d7..782279ff7a53d185d5de58f35e3328e487808ba2 100644
|
||||
--- a/src/main/java/org/purpurmc/purpur/PurpurWorldConfig.java
|
||||
|
||||
Reference in New Issue
Block a user