2016-03-03 02:43:58 +01:00
|
|
|
--- a/net/minecraft/server/EntityTippedArrow.java
|
|
|
|
+++ b/net/minecraft/server/EntityTippedArrow.java
|
2016-12-20 21:00:00 +01:00
|
|
|
@@ -116,6 +116,25 @@
|
2016-03-03 02:43:58 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
+ // CraftBukkit start accessor methods
|
|
|
|
+ public void refreshEffects() {
|
2016-06-09 03:43:49 +02:00
|
|
|
+ this.getDataWatcher().set(EntityTippedArrow.f, Integer.valueOf(PotionUtil.a((Collection) PotionUtil.a(this.potionRegistry, (Collection) this.effects))));
|
2016-03-03 02:43:58 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public String getType() {
|
2016-06-09 03:43:49 +02:00
|
|
|
+ return ((MinecraftKey) PotionRegistry.a.b(this.potionRegistry)).toString();
|
2016-03-03 02:43:58 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setType(String string) {
|
2016-06-09 03:43:49 +02:00
|
|
|
+ this.potionRegistry = PotionRegistry.a.get(new MinecraftKey(string));
|
|
|
|
+ this.datawatcher.set(EntityTippedArrow.f, Integer.valueOf(PotionUtil.a((Collection) PotionUtil.a(this.potionRegistry, (Collection) this.effects))));
|
2016-03-03 02:43:58 +01:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public boolean isTipped() {
|
2016-11-17 02:41:03 +01:00
|
|
|
+ return !(this.effects.isEmpty() && this.potionRegistry == Potions.EMPTY);
|
2016-03-03 02:43:58 +01:00
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
+
|
2016-12-20 21:00:00 +01:00
|
|
|
public int o() {
|
2016-03-03 02:43:58 +01:00
|
|
|
return ((Integer) this.datawatcher.get(EntityTippedArrow.f)).intValue();
|
|
|
|
}
|