Fix conjured items not disappearing in offhand (actually fixes #493)
This commit is contained in:
@@ -4,6 +4,7 @@ import com.google.common.collect.Multimap;
|
||||
import electroblob.wizardry.registry.Spells;
|
||||
import electroblob.wizardry.spell.Spell;
|
||||
import electroblob.wizardry.util.EntityUtils;
|
||||
import electroblob.wizardry.util.InventoryUtils;
|
||||
import electroblob.wizardry.util.MagicDamage;
|
||||
import electroblob.wizardry.util.MagicDamage.DamageType;
|
||||
import net.minecraft.entity.Entity;
|
||||
@@ -81,7 +82,7 @@ public class ItemFlamingAxe extends ItemAxe implements IConjuredItem {
|
||||
@Override
|
||||
public void onUpdate(ItemStack stack, World world, Entity entity, int slot, boolean selected){
|
||||
int damage = stack.getItemDamage();
|
||||
if(damage > stack.getMaxDamage()) entity.replaceItemInInventory(slot, ItemStack.EMPTY);
|
||||
if(damage > stack.getMaxDamage()) InventoryUtils.replaceItemInInventory(entity, slot, stack, ItemStack.EMPTY);
|
||||
stack.setItemDamage(damage + 1);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user