Fix drying racks/oreberries etc. not syncing inventory on pickup

This commit is contained in:
Bernhard Bonigl committed 2014-12-30 10:58:48 +01:00
1 parent c46e6e0bc2
commit 8c34b3ea71
1 file changed
+3 -1
@@ -1,6 +1,7 @@
package tconstruct.library.tools;
import cofh.api.energy.IEnergyContainerItem;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.Event.Result;
import java.util.*;
@@ -612,7 +613,8 @@ public class AbilityHelper
// if it got picked up, we're playing the sound
else {
player.worldObj.playSoundAtEntity(player, "random.pop", 0.2F, ((TConstruct.random.nextFloat() - TConstruct.random.nextFloat()) * 0.7F + 1.0F) * 2.0F);
player.inventory.markDirty();
if(player instanceof EntityPlayerMP)
player.inventoryContainer.detectAndSendChanges();
}
}