Disable re-equip animation.
This commit is contained in:
@@ -88,6 +88,11 @@ public class ItemFilter extends ItemBase {
|
||||
RenderUtils.addCombinedFluidsToTooltip(tooltip, false, fluids.getFilteredFluids());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static int getCompare(ItemStack stack) {
|
||||
return (stack.hasTagCompound() && stack.getTagCompound().hasKey(NBT_COMPARE)) ? stack.getTagCompound().getInteger(NBT_COMPARE) : (IComparer.COMPARE_DAMAGE | IComparer.COMPARE_NBT);
|
||||
}
|
||||
|
@@ -122,16 +122,8 @@ public abstract class ItemNetworkItem extends ItemEnergyItem implements INetwork
|
||||
|
||||
@Override
|
||||
public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) {
|
||||
if (oldStack.getItem() == newStack.getItem()) {
|
||||
if (isValid(oldStack) && isValid(newStack)) {
|
||||
if (getX(oldStack) == getX(newStack) && getY(oldStack) == getY(newStack) && getZ(oldStack) == getZ(newStack) && getDimensionId(oldStack) == getDimensionId(newStack)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return super.shouldCauseReequipAnimation(oldStack, newStack, slotChanged);
|
||||
}
|
||||
|
||||
public boolean isValid(ItemStack stack) {
|
||||
return stack.hasTagCompound()
|
||||
|
Reference in New Issue
Block a user