Merge branch 'master' into 1.12
This commit is contained in:
commit
da3e2b42ea
|
|
@ -28,7 +28,7 @@ public class CarryOn {
|
||||||
public static CarryOn instance;
|
public static CarryOn instance;
|
||||||
|
|
||||||
public static final String MODID = "carryon";
|
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 NAME = "Carry On";
|
||||||
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
|
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
|
||||||
public static final Logger LOGGER = LogManager.getFormatterLogger("CarryOn");
|
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.Event.Result;
|
||||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.items.CapabilityItemHandler;
|
||||||
|
import net.minecraftforge.items.IItemHandler;
|
||||||
import tschipp.carryon.CarryOn;
|
import tschipp.carryon.CarryOn;
|
||||||
import tschipp.carryon.client.keybinds.CarryOnKeybinds;
|
import tschipp.carryon.client.keybinds.CarryOnKeybinds;
|
||||||
import tschipp.carryon.common.handler.PickupHandler;
|
import tschipp.carryon.common.handler.PickupHandler;
|
||||||
|
|
@ -87,6 +89,14 @@ public class ItemEntityEvents
|
||||||
{
|
{
|
||||||
if (ItemEntity.storeEntityData(entity, world, stack))
|
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);
|
CarryOn.network.sendTo(new CarrySlotPacket(player.inventory.currentItem), (EntityPlayerMP) player);
|
||||||
entity.setDead();
|
entity.setDead();
|
||||||
player.setHeldItem(EnumHand.MAIN_HAND, stack);
|
player.setHeldItem(EnumHand.MAIN_HAND, stack);
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
"modid" : "carryon",
|
"modid" : "carryon",
|
||||||
"name" : "Carry On",
|
"name" : "Carry On",
|
||||||
"version" : "1.5", "mcversion" : "1.12",
|
"version" : "1.5.1", "mcversion" : "1.12",
|
||||||
"url" : "",
|
"url" : "",
|
||||||
"credits" : "Tschipp, Purplicious_Cow, cy4n",
|
"credits" : "Tschipp, Purplicious_Cow, cy4n",
|
||||||
"authorList" : ["Tschipp, Purplicious_Cow, cy4n"],
|
"authorList" : ["Tschipp, Purplicious_Cow, cy4n"],
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user