Implement getColor / setColor for TippedArrow

By: Matthew <stteg@hotmail.com>
This commit is contained in:
CraftBukkit/Spigot
2017-04-26 20:28:27 -04:00
parent 596875c55b
commit 7baa3d8ac1
2 changed files with 20 additions and 2 deletions

View File

@@ -1,9 +1,10 @@
--- a/net/minecraft/server/EntityTippedArrow.java
+++ b/net/minecraft/server/EntityTippedArrow.java
@@ -116,6 +116,25 @@
@@ -116,11 +116,30 @@
}
}
- public int o() {
+ // CraftBukkit start accessor methods
+ public void refreshEffects() {
+ this.getDataWatcher().set(EntityTippedArrow.f, Integer.valueOf(PotionUtil.a((Collection) PotionUtil.a(this.potionRegistry, (Collection) this.effects))));
@@ -23,6 +24,12 @@
+ }
+ // CraftBukkit end
+
public int o() {
+ public int o() { // PAIL: rename getColor
return ((Integer) this.datawatcher.get(EntityTippedArrow.f)).intValue();
}
- private void d(int i) {
+ public void d(int i) { // PAIL: private -> public, rename setColor
this.at = true;
this.datawatcher.set(EntityTippedArrow.f, Integer.valueOf(i));
}