Another compilation fix

More patch tweaks for compilation errors. onItemUseTick takes an entity now, cos skellies use stuff too
This commit is contained in:
cpw 2016-03-08 16:30:00 -05:00
parent fffbc0f078
commit a44d76652b
3 changed files with 12 additions and 13 deletions

View file

@ -190,7 +190,7 @@
super.onUpdate(); super.onUpdate();
this.func_184608_ct(); this.func_184608_ct();
@@ -2351,6 +2384,41 @@ @@ -2351,6 +2384,40 @@
this.potionsNeedUpdate = true; this.potionsNeedUpdate = true;
} }
@ -200,18 +200,17 @@
+ */ + */
+ public void curePotionEffects(ItemStack curativeItem) + public void curePotionEffects(ItemStack curativeItem)
+ { + {
+ Iterator<Integer> potionKey = activePotionsMap.keySet().iterator();
+ if (worldObj.isRemote) return; + if (worldObj.isRemote) return;
+ Iterator<PotionEffect> iterator = this.activePotionsMap.values().iterator();
+ +
+ while (potionKey.hasNext()) + while (iterator.hasNext())
+ { + {
+ Integer key = potionKey.next(); + PotionEffect effect = iterator.next();
+ PotionEffect effect = (PotionEffect)activePotionsMap.get(key);
+ +
+ if (effect.isCurativeItem(curativeItem)) + if (effect.isCurativeItem(curativeItem))
+ { + {
+ potionKey.remove();
+ onFinishedPotionEffect(effect); + onFinishedPotionEffect(effect);
+ iterator.remove();
+ this.potionsNeedUpdate = true; + this.potionsNeedUpdate = true;
+ } + }
+ } + }
@ -232,7 +231,7 @@
public abstract EnumHandSide func_184591_cq(); public abstract EnumHandSide func_184591_cq();
public boolean func_184587_cr() public boolean func_184587_cr()
@@ -2371,6 +2439,14 @@ @@ -2371,6 +2438,14 @@
if (itemstack == this.field_184627_bm) if (itemstack == this.field_184627_bm)
{ {
@ -247,7 +246,7 @@
if (this.func_184605_cv() <= 25 && this.func_184605_cv() % 4 == 0) if (this.func_184605_cv() <= 25 && this.func_184605_cv() % 4 == 0)
{ {
this.func_184584_a(this.field_184627_bm, 5); this.func_184584_a(this.field_184627_bm, 5);
@@ -2380,6 +2456,7 @@ @@ -2380,6 +2455,7 @@
{ {
this.onItemUseFinish(); this.onItemUseFinish();
} }
@ -255,7 +254,7 @@
} }
else else
{ {
@@ -2394,8 +2471,10 @@ @@ -2394,8 +2470,10 @@
if (itemstack != null && !this.func_184587_cr()) if (itemstack != null && !this.func_184587_cr())
{ {
@ -267,7 +266,7 @@
if (!this.worldObj.isRemote) if (!this.worldObj.isRemote)
{ {
@@ -2478,6 +2557,8 @@ @@ -2478,6 +2556,8 @@
this.func_184584_a(this.field_184627_bm, 16); this.func_184584_a(this.field_184627_bm, 16);
ItemStack itemstack = this.field_184627_bm.onItemUseFinish(this.worldObj, this); ItemStack itemstack = this.field_184627_bm.onItemUseFinish(this.worldObj, this);
@ -276,7 +275,7 @@
if (itemstack != null && itemstack.stackSize == 0) if (itemstack != null && itemstack.stackSize == 0)
{ {
itemstack = null; itemstack = null;
@@ -2508,6 +2589,8 @@ @@ -2508,6 +2588,8 @@
if (this.field_184627_bm != null) if (this.field_184627_bm != null)
{ {
this.field_184627_bm.onPlayerStoppedUsing(this.worldObj, this, this.func_184605_cv()); this.field_184627_bm.onPlayerStoppedUsing(this.worldObj, this, this.func_184605_cv());

View file

@ -159,7 +159,7 @@
+ * @param player The Player using the item + * @param player The Player using the item
+ * @param count The amount of time in tick the item has been used for continuously + * @param count The amount of time in tick the item has been used for continuously
+ */ + */
+ public void onUsingTick(ItemStack stack, EntityPlayer player, int count) + public void onUsingTick(ItemStack stack, EntityLivingBase player, int count)
+ { + {
+ } + }
+ +

View file

@ -354,7 +354,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
@Subscribe @Subscribe
public void serverStarting(FMLServerStartingEvent evt) public void serverStarting(FMLServerStartingEvent evt)
{ {
evt.registerServerCommand(new ForgeCommand(evt.getServer())); evt.registerServerCommand(new ForgeCommand());
} }
@Override @Override
public NBTTagCompound getDataForWriting(SaveHandler handler, WorldInfo info) public NBTTagCompound getDataForWriting(SaveHandler handler, WorldInfo info)