Different Fixes, 1.11
This commit is contained in:
parent
650f9b5a67
commit
90fe9544a0
|
|
@ -34,7 +34,7 @@ public class CarryOn {
|
|||
public static CarryOn instance;
|
||||
|
||||
public static final String MODID = "carryon";
|
||||
public static final String VERSION = "1.7.1";
|
||||
public static final String VERSION = "1.8";
|
||||
public static final String NAME = "Carry On";
|
||||
public static final String ACCEPTED_VERSIONS = "[1.11,1.12)";
|
||||
public static final String UPDATE_JSON = "https://gist.githubusercontent.com/Tschipp/dccadee7c90d7a34e6e76a35d9d6fa2e/raw/";
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import net.minecraftforge.client.event.GuiOpenEvent;
|
|||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
||||
|
|
@ -33,6 +34,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
|||
import tschipp.carryon.common.handler.RegistrationHandler;
|
||||
import tschipp.carryon.common.helper.ScriptParseHelper;
|
||||
import tschipp.carryon.common.item.ItemEntity;
|
||||
import tschipp.carryon.common.item.ItemTile;
|
||||
import tschipp.carryon.common.scripting.CarryOnOverride;
|
||||
import tschipp.carryon.common.scripting.ScriptChecker;
|
||||
|
||||
|
|
@ -64,21 +66,23 @@ public class RenderEntityEvents
|
|||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onGuiOpen(GuiOpenEvent event)
|
||||
public void onGuiInit(InitGuiEvent.Pre event)
|
||||
{
|
||||
if (event.getGui() != null)
|
||||
{
|
||||
boolean inventory = event.getGui() instanceof GuiContainer;
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
|
||||
if (player != null)
|
||||
if (player != null && inventory)
|
||||
{
|
||||
ItemStack stack = player.getHeldItem(EnumHand.MAIN_HAND);
|
||||
|
||||
if (inventory && !stack.isEmpty() && stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack))
|
||||
if (!stack.isEmpty() && stack.getItem() == RegistrationHandler.itemEntity && ItemEntity.hasEntityData(stack))
|
||||
{
|
||||
event.setCanceled(true);
|
||||
Minecraft.getMinecraft().player.closeScreen();
|
||||
Minecraft.getMinecraft().currentScreen = null;
|
||||
Minecraft.getMinecraft().setIngameFocus();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import net.minecraft.client.renderer.OpenGlHelper;
|
|||
import net.minecraft.client.renderer.block.model.IBakedModel;
|
||||
import net.minecraft.client.renderer.entity.RenderManager;
|
||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.client.renderer.texture.TextureMap;
|
||||
import net.minecraft.client.resources.DefaultPlayerSkin;
|
||||
import net.minecraft.client.settings.GameSettings;
|
||||
|
|
@ -31,13 +30,11 @@ import net.minecraft.util.EnumHand;
|
|||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.GuiOpenEvent;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent.InitGuiEvent;
|
||||
import net.minecraftforge.client.event.MouseEvent;
|
||||
import net.minecraftforge.client.event.RenderHandEvent;
|
||||
import net.minecraftforge.client.event.RenderPlayerEvent;
|
||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.InputEvent;
|
||||
|
|
@ -115,21 +112,23 @@ public class RenderEvents
|
|||
*/
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onGuiOpen(GuiOpenEvent event)
|
||||
public void onGuiInit(InitGuiEvent.Pre event)
|
||||
{
|
||||
if (event.getGui() != null)
|
||||
{
|
||||
boolean inventory = event.getGui() instanceof GuiContainer;
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
|
||||
if (player != null)
|
||||
if (player != null && inventory)
|
||||
{
|
||||
ItemStack stack = player.getHeldItem(EnumHand.MAIN_HAND);
|
||||
|
||||
if (inventory && !stack.isEmpty() && stack.getItem() == RegistrationHandler.itemTile && ItemTile.hasTileData(stack))
|
||||
if (!stack.isEmpty() && stack.getItem() == RegistrationHandler.itemTile && ItemTile.hasTileData(stack))
|
||||
{
|
||||
event.setCanceled(true);
|
||||
Minecraft.getMinecraft().player.closeScreen();
|
||||
Minecraft.getMinecraft().currentScreen = null;
|
||||
Minecraft.getMinecraft().setIngameFocus();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
package tschipp.carryon.client.model;
|
||||
|
||||
import net.minecraft.client.model.ModelPlayer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelPlayerCarrying extends ModelPlayer
|
||||
{
|
||||
|
||||
public ModelPlayerCarrying(float modelSize, boolean smallArmsIn)
|
||||
{
|
||||
super(modelSize, smallArmsIn);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRotationAngles(float limbSwing, float limbSwingAmount, float ageInTicks, float netHeadYaw, float headPitch, float scaleFactor, Entity entityIn)
|
||||
{
|
||||
super.setRotationAngles(limbSwing, limbSwingAmount, ageInTicks, netHeadYaw, headPitch, scaleFactor, entityIn);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -52,6 +52,7 @@ public class CommonProxy
|
|||
e.printStackTrace();
|
||||
}
|
||||
RegistrationHandler.regOverrideList();
|
||||
RegistrationHandler.regCaps();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
|
|
|||
|
|
@ -0,0 +1,16 @@
|
|||
package tschipp.carryon.common.capabilities;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public interface IPosition {
|
||||
|
||||
public BlockPos getPos();
|
||||
|
||||
public void setPos(BlockPos pos);
|
||||
|
||||
public boolean isBlockActivated();
|
||||
|
||||
public void setBlockActivated(boolean b);
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
package tschipp.carryon.common.capabilities;
|
||||
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.CapabilityInject;
|
||||
import net.minecraftforge.common.capabilities.ICapabilitySerializable;
|
||||
|
||||
public class PositionProvider implements ICapabilitySerializable {
|
||||
|
||||
@CapabilityInject(IPosition.class)
|
||||
public static final Capability<IPosition> POSITION_CAPABILITY = null;
|
||||
|
||||
private IPosition instance = POSITION_CAPABILITY.getDefaultInstance();
|
||||
|
||||
|
||||
@Override
|
||||
public boolean hasCapability(Capability<?> capability, EnumFacing facing) {
|
||||
return capability == POSITION_CAPABILITY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T> T getCapability(Capability<T> capability, EnumFacing facing) {
|
||||
return capability == POSITION_CAPABILITY ? POSITION_CAPABILITY.cast(instance) : null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NBTBase serializeNBT() {
|
||||
return POSITION_CAPABILITY.getStorage().writeNBT(POSITION_CAPABILITY, instance, null);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void deserializeNBT(NBTBase nbt) {
|
||||
POSITION_CAPABILITY.getStorage().readNBT(POSITION_CAPABILITY, instance, null, nbt);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,41 @@
|
|||
package tschipp.carryon.common.capabilities;
|
||||
|
||||
import net.minecraft.nbt.NBTBase;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.common.capabilities.Capability.IStorage;
|
||||
|
||||
public class PositionStorage implements IStorage<IPosition> {
|
||||
|
||||
@Override
|
||||
public NBTBase writeNBT(Capability<IPosition> capability, IPosition instance, EnumFacing side) {
|
||||
|
||||
NBTTagCompound tag = new NBTTagCompound();
|
||||
|
||||
tag.setBoolean("blockActivated", instance.isBlockActivated());
|
||||
tag.setInteger("x", instance.getPos().getX());
|
||||
tag.setInteger("y", instance.getPos().getY());
|
||||
tag.setInteger("z", instance.getPos().getZ());
|
||||
|
||||
return tag;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readNBT(Capability<IPosition> capability, IPosition instance, EnumFacing side, NBTBase nbt) {
|
||||
|
||||
NBTTagCompound tag = (NBTTagCompound) nbt;
|
||||
|
||||
int x = tag.getInteger("x");
|
||||
int y = tag.getInteger("y");
|
||||
int z = tag.getInteger("z");
|
||||
|
||||
BlockPos pos = new BlockPos(x,y,z);
|
||||
|
||||
instance.setPos(pos);
|
||||
instance.setBlockActivated(tag.getBoolean("blockActivated"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
package tschipp.carryon.common.capabilities;
|
||||
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
||||
public class TEPosition implements IPosition {
|
||||
|
||||
private BlockPos pos = new BlockPos(0, 0, 0);
|
||||
private boolean blockActivated = false;
|
||||
|
||||
@Override
|
||||
public BlockPos getPos()
|
||||
{
|
||||
return pos;
|
||||
}
|
||||
@Override
|
||||
public void setPos(BlockPos pos)
|
||||
{
|
||||
this.pos = pos;
|
||||
}
|
||||
@Override
|
||||
public boolean isBlockActivated()
|
||||
{
|
||||
return blockActivated;
|
||||
}
|
||||
@Override
|
||||
public void setBlockActivated(boolean b)
|
||||
{
|
||||
this.blockActivated = b;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,91 @@
|
|||
package tschipp.carryon.common.capabilities.event;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiContainer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerContainerEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent.PlayerTickEvent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import tschipp.carryon.common.capabilities.IPosition;
|
||||
import tschipp.carryon.common.capabilities.PositionProvider;
|
||||
|
||||
public class PositionClientEvents
|
||||
{
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onGui(GuiScreenEvent.DrawScreenEvent event)
|
||||
{
|
||||
if (event.getGui() != null)
|
||||
{
|
||||
EntityPlayer player = Minecraft.getMinecraft().player;
|
||||
boolean inventory = event.getGui() instanceof GuiContainer;
|
||||
|
||||
if (player != null && inventory)
|
||||
{
|
||||
if(player.hasCapability(PositionProvider.POSITION_CAPABILITY, null))
|
||||
{
|
||||
IPosition cap = player.getCapability(PositionProvider.POSITION_CAPABILITY, null);
|
||||
if(cap.isBlockActivated())
|
||||
{
|
||||
World world = player.world;
|
||||
BlockPos pos = cap.getPos();
|
||||
if(world != null)
|
||||
{
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if(te == null)
|
||||
{
|
||||
// player.openContainer = null;
|
||||
Minecraft.getMinecraft().currentScreen = null;
|
||||
Minecraft.getMinecraft().setIngameFocus();
|
||||
cap.setBlockActivated(false);
|
||||
cap.setPos(new BlockPos(0,0,0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onGuiClose(PlayerContainerEvent.Close event)
|
||||
{
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
if(player.hasCapability(PositionProvider.POSITION_CAPABILITY, null))
|
||||
{
|
||||
IPosition cap = player.getCapability(PositionProvider.POSITION_CAPABILITY, null);
|
||||
cap.setBlockActivated(false);
|
||||
cap.setPos(new BlockPos(0,0,0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
public void onPlayerTick(PlayerTickEvent event)
|
||||
{
|
||||
if (event.side == Side.CLIENT)
|
||||
{
|
||||
EntityPlayer player = event.player;
|
||||
if (player.hasCapability(PositionProvider.POSITION_CAPABILITY, null))
|
||||
{
|
||||
IPosition cap = player.getCapability(PositionProvider.POSITION_CAPABILITY, null);
|
||||
if (cap.isBlockActivated() && Minecraft.getMinecraft().currentScreen == null)
|
||||
{
|
||||
cap.setBlockActivated(false);
|
||||
cap.setPos(new BlockPos(0, 0, 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
package tschipp.carryon.common.capabilities.event;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.event.AttachCapabilitiesEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import tschipp.carryon.CarryOn;
|
||||
import tschipp.carryon.common.capabilities.IPosition;
|
||||
import tschipp.carryon.common.capabilities.PositionProvider;
|
||||
|
||||
public class PositionCommonEvents
|
||||
{
|
||||
|
||||
@SubscribeEvent
|
||||
public void onAttachCaps(AttachCapabilitiesEvent<Entity> event)
|
||||
{
|
||||
if (event.getObject() instanceof EntityPlayer)
|
||||
{
|
||||
event.addCapability(new ResourceLocation(CarryOn.MODID, "position"), new PositionProvider());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@SubscribeEvent
|
||||
public void onBlockRight(PlayerInteractEvent.RightClickBlock event)
|
||||
{
|
||||
BlockPos pos = event.getPos();
|
||||
World world = event.getWorld();
|
||||
EntityPlayer player = event.getEntityPlayer();
|
||||
|
||||
if (event.isCanceled())
|
||||
return;
|
||||
|
||||
if (player == null)
|
||||
return;
|
||||
|
||||
if (player instanceof FakePlayer)
|
||||
return;
|
||||
|
||||
TileEntity te = world.getTileEntity(pos);
|
||||
if (te != null)
|
||||
{
|
||||
if (player.hasCapability(PositionProvider.POSITION_CAPABILITY, null))
|
||||
{
|
||||
IPosition cap = player.getCapability(PositionProvider.POSITION_CAPABILITY, null);
|
||||
cap.setBlockActivated(true);
|
||||
cap.setPos(pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -123,6 +123,10 @@ public class Configs {
|
|||
"embers:field_chart",
|
||||
"embers:inferno_forge",
|
||||
"storagedrawers:framingtable",
|
||||
"skyresources:*",
|
||||
"lootbags:*",
|
||||
"exsartagine:*",
|
||||
|
||||
};
|
||||
|
||||
@Config.RequiresMcRestart()
|
||||
|
|
@ -133,6 +137,11 @@ public class Configs {
|
|||
"minecraft:ender_dragon",
|
||||
"minecraft:ghast",
|
||||
"minecraft:shulker",
|
||||
"minecraft:leash_knot",
|
||||
"minecraft:armor_stand",
|
||||
"minecraft:item_frame",
|
||||
"minecraft:painting",
|
||||
"minecraft:shulker_bullet",
|
||||
"animania:textures/entity/pigs/hamster_tarou.png",
|
||||
"animania:hamster",
|
||||
"animania:ferret*",
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import net.minecraft.block.material.Material;
|
|||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.passive.EntityAnimal;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.entity.player.EntityPlayerMP;
|
||||
import net.minecraft.item.Item;
|
||||
|
|
@ -16,9 +17,9 @@ import net.minecraftforge.event.entity.EntityJoinWorldEvent;
|
|||
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.fml.common.eventhandler.Event.Result;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraftforge.fml.common.eventhandler.EventPriority;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.network.NetworkRegistry.TargetPoint;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
import tschipp.carryon.CarryOn;
|
||||
|
|
@ -88,6 +89,9 @@ public class ItemEntityEvents
|
|||
|
||||
if (entity.hurtResistantTime == 0)
|
||||
{
|
||||
if(entity instanceof EntityAnimal)
|
||||
((EntityAnimal) entity).clearLeashed(true, true);
|
||||
|
||||
if (PickupHandler.canPlayerPickUpEntity(player, entity))
|
||||
{
|
||||
if (ItemEntity.storeEntityData(entity, world, stack))
|
||||
|
|
|
|||
|
|
@ -218,6 +218,7 @@ public class ItemEvents
|
|||
{
|
||||
player.setHeldItem(EnumHand.MAIN_HAND, ItemStack.EMPTY);
|
||||
EntityItem item = new EntityItem(player.world, player.posX, player.posY, player.posZ, stack);
|
||||
CarryOn.network.sendToAllAround(new CarrySlotPacket(9, player.getEntityId()), new TargetPoint(player.world.provider.getDimension(), player.posX, player.posY, player.posZ, 256));
|
||||
player.world.spawnEntity(item);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,15 @@ import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.common.capabilities.CapabilityManager;
|
||||
import tschipp.carryon.CarryOn;
|
||||
import tschipp.carryon.client.event.RenderEntityEvents;
|
||||
import tschipp.carryon.client.event.RenderEvents;
|
||||
import tschipp.carryon.common.capabilities.IPosition;
|
||||
import tschipp.carryon.common.capabilities.PositionStorage;
|
||||
import tschipp.carryon.common.capabilities.TEPosition;
|
||||
import tschipp.carryon.common.capabilities.event.PositionClientEvents;
|
||||
import tschipp.carryon.common.capabilities.event.PositionCommonEvents;
|
||||
import tschipp.carryon.common.event.ItemEntityEvents;
|
||||
import tschipp.carryon.common.event.ItemEvents;
|
||||
import tschipp.carryon.common.item.ItemEntity;
|
||||
|
|
@ -33,12 +39,14 @@ public class RegistrationHandler
|
|||
{
|
||||
MinecraftForge.EVENT_BUS.register(new ItemEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new ItemEntityEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new PositionCommonEvents());
|
||||
}
|
||||
|
||||
public static void regClientEvents()
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new RenderEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new RenderEntityEvents());
|
||||
MinecraftForge.EVENT_BUS.register(new PositionClientEvents());
|
||||
}
|
||||
|
||||
public static void regOverrideList()
|
||||
|
|
@ -48,6 +56,9 @@ public class RegistrationHandler
|
|||
ListHandler.initForbiddenTiles();
|
||||
}
|
||||
|
||||
|
||||
public static void regCaps()
|
||||
{
|
||||
CapabilityManager.INSTANCE.register(IPosition.class, new PositionStorage(), TEPosition::new);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ public class ItemTile extends Item
|
|||
{
|
||||
e.printStackTrace();
|
||||
|
||||
if (world.isRemote)
|
||||
if (world != null && world.isRemote)
|
||||
{
|
||||
CarryOn.LOGGER.info("Block: " + ItemTile.getBlock(stack));
|
||||
CarryOn.LOGGER.info("BlockState: " + ItemTile.getBlockState(stack));
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
{
|
||||
"modid" : "carryon",
|
||||
"name" : "Carry On",
|
||||
"version" : "1.7.1", "mcversion" : "1.11.2",
|
||||
"version" : "1.8", "mcversion" : "1.11.2",
|
||||
"url" : "",
|
||||
"credits" : "Tschipp, Purplicious_Cow, cy4n",
|
||||
"authorList" : ["Tschipp, Purplicious_Cow, cy4n"],
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user