Raden charm (wind) crash
doushio9967 opened this issue ยท 1 comments
MC1.7.10 Forge .1614, AMT2 2.8m
Setting "Hard Mode Wind Charm" to anything but 0 will make it crash in 73085_a (tryUseItem) on the last remaining use of the charm.
crash-log:
https://gist.github.com/doushio9967/fcbc74555b93bc8d45cdd5b18ff65ce5
public boolean tryUseItem(EntityPlayer p_73085_1_, World p_73085_2_, ItemStack p_73085_3_)
{
int i = p_73085_3_.stackSize;
int j = p_73085_3_.getItemDamage();
ItemStack itemstack1 = p_73085_3_.useItemRightClick(p_73085_2_, p_73085_1_);
/*^== item/magic/ItemPrincessClam#152 returns null so itemstack1 is now unusable */
if (itemstack1 == p_73085_3_ && (itemstack1 == null || itemstack1.stackSize == i
&& itemstack1.getMaxItemUseDuration() <= 0 && itemstack1.getItemDamage() == j))
{
return false;
}
else {
p_73085_1_.inventory.mainInventory[p_73085_1_.inventory.currentItem] = itemstack1;
if (this.isCreative()) {
itemstack1.stackSize = i;
/*^== trying to change a null - crash! */
if (itemstack1.isItemStackDamageable())
{
itemstack1.setItemDamage(j);
}
}
if (itemstack1.stackSize == 0)
{
[...]