@@ -1,10 +1,12 @@
|
||||
--- a/net/minecraft/server/MobEffectList.java
|
||||
+++ b/net/minecraft/server/MobEffectList.java
|
||||
@@ -7,6 +7,11 @@
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
--- a/net/minecraft/world/effect/MobEffectList.java
|
||||
+++ b/net/minecraft/world/effect/MobEffectList.java
|
||||
@@ -19,6 +19,13 @@
|
||||
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||
import net.minecraft.world.entity.player.EntityHuman;
|
||||
|
||||
+// CraftBukkit start
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth;
|
||||
+import net.minecraft.server.level.EntityPlayer;
|
||||
+import org.bukkit.craftbukkit.event.CraftEventFactory;
|
||||
+import org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason;
|
||||
+// CraftBukkit end
|
||||
@@ -12,7 +14,7 @@
|
||||
public class MobEffectList {
|
||||
|
||||
private final Map<AttributeBase, AttributeModifier> a = Maps.newHashMap();
|
||||
@@ -21,7 +26,7 @@
|
||||
@@ -33,7 +40,7 @@
|
||||
}
|
||||
|
||||
public static int getId(MobEffectList mobeffectlist) {
|
||||
@@ -21,7 +23,7 @@
|
||||
}
|
||||
|
||||
protected MobEffectList(MobEffectInfo mobeffectinfo, int i) {
|
||||
@@ -32,26 +37,37 @@
|
||||
@@ -44,26 +51,37 @@
|
||||
public void tick(EntityLiving entityliving, int i) {
|
||||
if (this == MobEffects.REGENERATION) {
|
||||
if (entityliving.getHealth() < entityliving.getMaxHealth()) {
|
||||
@@ -64,7 +66,7 @@
|
||||
}
|
||||
|
||||
}
|
||||
@@ -72,7 +88,7 @@
|
||||
@@ -84,7 +102,7 @@
|
||||
}
|
||||
} else {
|
||||
j = (int) (d0 * (double) (4 << i) + 0.5D);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/net/minecraft/server/MobEffects.java
|
||||
+++ b/net/minecraft/server/MobEffects.java
|
||||
@@ -57,6 +57,14 @@
|
||||
--- a/net/minecraft/world/effect/MobEffects.java
|
||||
+++ b/net/minecraft/world/effect/MobEffects.java
|
||||
@@ -65,6 +65,14 @@
|
||||
});
|
||||
public static final MobEffectList HERO_OF_THE_VILLAGE = a(32, "hero_of_the_village", new MobEffectList(MobEffectInfo.BENEFICIAL, 4521796));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user