PaperMC/paper-server/nms-patches/EntityAreaEffectCloud.patch
CraftBukkit/Spigot 104519f08f SPIGOT-1638 / SPIGOT-1673: Rework Potions API
By: t00thpick1 <t00thpick1dirko@gmail.com>
2016-03-02 20:43:58 -05:00

25 lines
842 B
Diff

--- a/net/minecraft/server/EntityAreaEffectCloud.java
+++ b/net/minecraft/server/EntityAreaEffectCloud.java
@@ -91,6 +91,22 @@
}
+ // CraftBukkit start accessor methods
+ public void refreshEffects() {
+ if (!this.au) {
+ this.getDataWatcher().set(EntityAreaEffectCloud.b, Integer.valueOf(PotionUtil.a((Collection) PotionUtil.a(this.e, (Collection) this.effects)))); // PAIL: rename
+ }
+ }
+
+ public String getType() {
+ return ((MinecraftKey) PotionRegistry.a.b(this.e)).toString(); // PAIL: rename
+ }
+
+ public void setType(String string) {
+ a(PotionRegistry.a.get(new MinecraftKey(string))); // PAIL: rename
+ }
+ // CraftBukkit end
+
public int getColor() {
return ((Integer) this.getDataWatcher().get(EntityAreaEffectCloud.b)).intValue();
}