Fixed Minecart dupe glitch
This commit is contained in:
parent
058398cd2d
commit
4b70322112
|
|
@ -29,7 +29,7 @@ public class CarryOn {
|
|||
public static CarryOn instance;
|
||||
|
||||
public static final String MODID = "carryon";
|
||||
public static final String VERSION = "1.5";
|
||||
public static final String VERSION = "1.5.1";
|
||||
public static final String NAME = "Carry On";
|
||||
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
|
||||
public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn");
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
|||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import tschipp.carryon.CarryOn;
|
||||
import tschipp.carryon.client.keybinds.CarryOnKeybinds;
|
||||
import tschipp.carryon.common.handler.PickupHandler;
|
||||
|
|
@ -87,6 +89,14 @@ public class ItemEntityEvents
|
|||
{
|
||||
if (ItemEntity.storeEntityData(entity, world, stack))
|
||||
{
|
||||
if(entity.hasCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null))
|
||||
{
|
||||
IItemHandler handler = entity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
|
||||
for(int i = 0; i < handler.getSlots(); i++)
|
||||
{
|
||||
handler.extractItem(i, 64, false);
|
||||
}
|
||||
}
|
||||
CarryOn.network.sendTo(new CarrySlotPacket(player.inventory.currentItem), (EntityPlayerMP) player);
|
||||
entity.setDead();
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, stack);
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"modid" : "carryon",
|
||||
"name" : "Carry On",
|
||||
"version" : "1.5", "mcversion" : "1.11.2",
|
||||
"version" : "1.5.1", "mcversion" : "1.11.2",
|
||||
"url" : "",
|
||||
"credits" : "Tschipp, Purplicious_Cow, cy4n",
|
||||
"authorList" : ["Tschipp, Purplicious_Cow, cy4n"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user