Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Block
- public class MachineArcFurnace extends BlockBase {
- public static final PropertyDirection FACING = BlockHorizontal.FACING;
- private static final PropertyBool ACTIVE = PropertyBool.create("burning");
- public MachineArcFurnace() {
- super("arc_furnace", Material.IRON);
- setSoundType(SoundType.METAL);
- this.setDefaultState(this.blockState.getBaseState().withProperty(FACING, EnumFacing.NORTH).withProperty(ACTIVE, false));
- }
- public ItemStack getItem(World worldIn, BlockPos pos, IBlockState state) {
- return new ItemStack(ExkvaBlocks.arcFurnace);
- }
- @Override
- public Item getItemDropped(IBlockState state, Random rand, int fortune) {
- return Item.getItemFromBlock(ExkvaBlocks.arcFurnace);
- }
- @Override
- public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
- super.breakBlock(worldIn, pos, state);
- }
- @Override
- public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
- if(!worldIn.isRemote) {
- playerIn.openGui(Exkva.INSTANCE, Exkva.GUI_ARC_FURNACE, worldIn, pos.getX(), pos.getY(), pos.getZ());
- }
- return true;
- }
- @Override
- public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) {
- if(!worldIn.isRemote) {
- IBlockState north, south, east, west;
- north = worldIn.getBlockState(pos.north());
- south = worldIn.getBlockState(pos.south());
- east = worldIn.getBlockState(pos.east());
- west = worldIn.getBlockState(pos.west());
- EnumFacing face = (EnumFacing) state.getValue(FACING);
- if (face == EnumFacing.NORTH && north.isFullBlock() && south.isFullBlock()) {
- face = EnumFacing.SOUTH;
- } else if (face == EnumFacing.SOUTH && south.isFullBlock() && north.isFullBlock()) {
- face = EnumFacing.NORTH;
- } else if (face == EnumFacing.WEST && west.isFullBlock() && east.isFullBlock()) {
- face = EnumFacing.EAST;
- } else if (face == EnumFacing.EAST && east.isFullBlock() && west.isFullBlock()) {
- face = EnumFacing.WEST;
- }
- worldIn.setBlockState(pos, state.withProperty(FACING, face), 2);
- }
- }
- public static void setState(boolean active, World worldIn, BlockPos pos) {
- IBlockState state = worldIn.getBlockState(pos);
- TileEntity tileEntity = worldIn.getTileEntity(pos);
- // if(active) {
- // worldIn.setBlockState(pos, ExkvaBlocks.arcFurnace.getDefaultState().withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, true), 3);
- // } else worldIn.setBlockState(pos, ExkvaBlocks.arcFurnace.getDefaultState().withProperty(FACING, state.getValue(FACING)).withProperty(ACTIVE, false), 3);
- if(tileEntity != null) {
- tileEntity.validate();
- worldIn.setTileEntity(pos, tileEntity);
- }
- }
- @Override
- public boolean hasTileEntity(IBlockState state) {
- return true;
- }
- @Override
- public TileEntity createTileEntity(World world, IBlockState state) {
- return new TileEntityArcFurnace();
- }
- @Override
- public IBlockState getStateForPlacement(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
- return this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite());
- }
- @Override
- public void onBlockPlacedBy(World worldIn, BlockPos pos, IBlockState state, EntityLivingBase placer, ItemStack stack) {
- worldIn.setBlockState(pos, this.getDefaultState().withProperty(FACING, placer.getHorizontalFacing().getOpposite()), 2);
- }
- // @Override
- // public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
- // TileEntityArcFurnace tileEntityArcFurnace = (TileEntityArcFurnace) worldIn.getTileEntity(pos);
- // InventoryHelper.dropInventoryItems(worldIn, pos, tileEntityArcFurnace);
- // super.breakBlock(worldIn, pos, state);
- // }
- @Override
- public EnumBlockRenderType getRenderType(IBlockState state) {
- return EnumBlockRenderType.MODEL;
- }
- @Override
- public IBlockState withRotation(IBlockState state, Rotation rot) {
- return state.withProperty(FACING, rot.rotate((EnumFacing) state.getValue(FACING)));
- }
- @Override
- public IBlockState withMirror(IBlockState state, Mirror mirrorIn) {
- return state.withRotation(mirrorIn.toRotation((EnumFacing) state.getValue(FACING)));
- }
- @Override
- protected BlockStateContainer createBlockState() {
- return new BlockStateContainer(this, new IProperty[] {ACTIVE, FACING});
- }
- @Override
- public IBlockState getStateFromMeta(int meta) {
- EnumFacing facing = EnumFacing.getFront(meta);
- if(facing.getAxis() == EnumFacing.Axis.Y) {
- facing = EnumFacing.NORTH;
- }
- return this.getDefaultState().withProperty(FACING, facing);
- }
- @Override
- public int getMetaFromState(IBlockState state) {
- return ((EnumFacing) state.getValue(FACING)).getIndex();
- }
- }
- //Container
- public class ContainerArcFurnace extends Container {
- private final TileEntityArcFurnace tileentity;
- private int cookTime, totalCookTime, burnTime, currentBurnTime;
- public ContainerArcFurnace(InventoryPlayer player, TileEntityArcFurnace tileentity) {
- this.tileentity = tileentity;
- IItemHandler handler = tileentity.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, null);
- this.addSlotToContainer(new SlotItemHandler(handler, 0, 25, 23)); //input1
- this.addSlotToContainer(new SlotItemHandler(handler, 1, 50, 23)); //input2
- this.addSlotToContainer(new SlotItemHandler(handler, 2, 37, 45)); //input3
- this.addSlotToContainer(new SlotItemHandler(handler, 3, 90, 58)); //fuel
- this.addSlotToContainer(new SlotItemHandler(handler, 4, 133, 33)); //output
- for(int y = 0; y < 3; y++) {
- for(int x = 0; x < 9; x++) {
- this.addSlotToContainer(new Slot(player, x + y*9 + 9, 8 + x*18, 84 + y*18));
- }
- }
- for(int x = 0; x < 9; x++) {
- this.addSlotToContainer(new Slot(player, x, 8 + x * 18, 142));
- }
- }
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- for(int i = 0; i < this.listeners.size(); ++i) {
- IContainerListener listener = (IContainerListener)this.listeners.get(i);
- if(this.cookTime != this.tileentity.getField(2)) { listener.sendWindowProperty(this, 2, this.tileentity.getField(2)); }
- if(this.burnTime != this.tileentity.getField(0)) { listener.sendWindowProperty(this, 0, this.tileentity.getField(0)); }
- if(this.currentBurnTime != this.tileentity.getField(1)) { listener.sendWindowProperty(this, 1, this.tileentity.getField(1)); }
- if(this.totalCookTime != this.tileentity.getField(3)) { listener.sendWindowProperty(this, 3, this.tileentity.getField(3)); }
- }
- this.cookTime = this.tileentity.getField(2);
- this.burnTime = this.tileentity.getField(0);
- this.currentBurnTime = this.tileentity.getField(1);
- this.totalCookTime = this.tileentity.getField(3);
- }
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int id, int data) {
- this.tileentity.setField(id, data);
- }
- @Override
- public boolean canInteractWith(EntityPlayer playerIn) {
- return this.tileentity.isUsableByPlayer(playerIn);
- }
- @Override
- public ItemStack transferStackInSlot(EntityPlayer playerIn, int index) {
- ItemStack stack = ItemStack.EMPTY;
- Slot slot = (Slot)this.inventorySlots.get(index);
- if(slot != null && slot.getHasStack()) {
- ItemStack stack1 = slot.getStack();
- stack = stack1.copy();
- if(index == 3) {
- if(!this.mergeItemStack(stack1, 4, 40, true)) return ItemStack.EMPTY;
- slot.onSlotChange(stack1, stack);
- }
- else if(index != 2 && index != 1 && index != 0) {
- Slot slot1 = (Slot) this.inventorySlots.get(index + 1);
- Slot slot2 = (Slot) this.inventorySlots.get(index + 2);
- if(!RecipeArcFurnace.getInstance().getResult(stack1, slot1.getStack(), slot2.getStack()).isEmpty()) {
- if(!this.mergeItemStack(stack1, 0, 2, false)) {
- return ItemStack.EMPTY;
- }
- else if(TileEntityArcFurnace.isItemFuel(stack1)) {
- if(!this.mergeItemStack(stack1, 2, 3, false)) return ItemStack.EMPTY;
- }
- else if(TileEntityArcFurnace.isItemFuel(stack1)) {
- if(!this.mergeItemStack(stack1, 2, 3, false)) return ItemStack.EMPTY;
- }
- else if(TileEntityArcFurnace.isItemFuel(stack1)) {
- if(!this.mergeItemStack(stack1, 2, 3, false)) return ItemStack.EMPTY;
- }
- else if(index >= 4 && index < 31) {
- if(!this.mergeItemStack(stack1, 31, 40, false)) return ItemStack.EMPTY;
- }
- else if(index >= 31 && index < 40 && !this.mergeItemStack(stack1, 4, 31, false)) {
- return ItemStack.EMPTY;
- }
- }
- }
- else if(!this.mergeItemStack(stack1, 4, 40, false)) {
- return ItemStack.EMPTY;
- }
- if(stack1.isEmpty()) {
- slot.putStack(ItemStack.EMPTY);
- }
- else {
- slot.onSlotChanged();
- }
- if(stack1.getCount() == stack.getCount()) return ItemStack.EMPTY;
- slot.onTake(playerIn, stack1);
- }
- return stack;
- }
- //TileEntity
- public class TileEntityArcFurnace extends TileEntity implements ITickable, ISidedInventory {
- private NonNullList<ItemStack> inventory;
- private static final int[] TOP = new int[] { 3 };
- private static final int[] SIDE_RIGHT = new int[] { 0 };
- private static final int[] BACK = new int[] { 2 };
- private static final int[] SIDE_LEFT = new int[] { 1 };
- private static final int[] BOTTOM = new int[] { 4 };
- private static final int IN1 = 0;
- private static final int IN2 = 1;
- private static final int IN3 = 2;
- private static final int FUEL = 3;
- private static final int OUT = 4;
- private int furnaceBurnTime;
- private int currentItemBurnTime;
- private int cookTime;
- private int totalCookTime;
- private String customName;
- IItemHandler handlerTop;
- IItemHandler handlerRight;
- IItemHandler handlerBack;
- IItemHandler handlerLeft;
- IItemHandler handlerBottom;
- public TileEntityArcFurnace() {
- this.inventory = NonNullList.withSize(5, ItemStack.EMPTY);
- this.handlerTop = new SidedInvWrapper(this, EnumFacing.UP);
- this.handlerRight = new SidedInvWrapper(this, EnumFacing.WEST);
- this.handlerBack = new SidedInvWrapper(this, EnumFacing.SOUTH);
- this.handlerLeft = new SidedInvWrapper(this, EnumFacing.EAST);
- this.handlerBottom = new SidedInvWrapper(this, EnumFacing.DOWN);
- }
- @Override
- public int getSizeInventory() {
- return this.inventory.size();
- }
- @Override
- public boolean isEmpty() {
- for(ItemStack stack : this.inventory) {
- if(!stack.isEmpty()) {
- return false;
- }
- }
- return true;
- }
- @Override
- public ItemStack getStackInSlot(int index) {
- return (ItemStack) this.inventory.get(index);
- }
- @Override
- public ItemStack decrStackSize(int index, int count) {
- return ItemStackHelper.getAndSplit(this.inventory, index, count);
- }
- @Override
- public ItemStack removeStackFromSlot(int index) {
- return ItemStackHelper.getAndRemove(this.inventory, index);
- }
- @Override
- public void setInventorySlotContents(int index, ItemStack stack) {
- ItemStack current = (ItemStack) this.inventory.get(index);
- boolean flag = !stack.isEmpty() && stack.isItemEqual(current) && ItemStack.areItemStackTagsEqual(stack, current);
- this.inventory.set(index, stack);
- if(stack.getCount() > this.getInventoryStackLimit()) { stack.setCount(this.getInventoryStackLimit()); }
- if(index == 0 && !flag) {
- ItemStack in2 = this.inventory.get(index + 1);
- ItemStack in3 = this.inventory.get(index + 2);
- this.totalCookTime = this.getCookTime(stack, in2, in3);
- this.cookTime = 0;
- this.markDirty();
- }
- }
- @Override
- public String getName() {
- return this.hasCustomName() ? this.customName : "container.arc_furnace";
- }
- @Override
- public boolean hasCustomName() {
- return this.customName != null && !this.customName.isEmpty();
- }
- public void setCustomName(String name) { this.customName = name; }
- public void readFromNBT(NBTTagCompound compound) {
- super.readFromNBT(compound);
- this.inventory = NonNullList.withSize(this.getSizeInventory(), ItemStack.EMPTY);
- ItemStackHelper.loadAllItems(compound, this.inventory);
- this.furnaceBurnTime = compound.getInteger("BurnTime");
- this.cookTime = compound.getInteger("CookTime");
- this.totalCookTime = compound.getInteger("CookTimeTotal");
- this.currentItemBurnTime = getItemBurnTime((ItemStack)this.inventory.get(1));
- if (compound.hasKey("CustomName", 8)) {
- this.customName = compound.getString("CustomName");
- }
- }
- public NBTTagCompound writeToNBT(NBTTagCompound compound) {
- super.writeToNBT(compound);
- compound.setInteger("BurnTime", (short)this.furnaceBurnTime);
- compound.setInteger("CookTime", (short)this.cookTime);
- compound.setInteger("CookTimeTotal", (short)this.totalCookTime);
- ItemStackHelper.saveAllItems(compound, this.inventory);
- if (this.hasCustomName()) {
- compound.setString("CustomName", this.customName);
- }
- return compound;
- }
- @Override
- public int getInventoryStackLimit() {
- return 64;
- }
- public boolean isBurning() {
- return this.furnaceBurnTime > 0;
- }
- @SideOnly(Side.CLIENT)
- public static boolean isBurning(IInventory inventory) {
- return inventory.getField(0) > 0;
- }
- @Override
- public void update() {
- boolean flag = this.isBurning();
- boolean flag1 = false;
- if (this.isBurning()) {
- --this.furnaceBurnTime;
- }
- if (!this.world.isRemote) {
- ItemStack fuel = (ItemStack)this.inventory.get(FUEL);
- if (this.isBurning() || !fuel.isEmpty() && !((ItemStack)this.inventory.get(IN1)).isEmpty() || !((ItemStack)this.inventory.get(IN2)).isEmpty() || !((ItemStack)this.inventory.get(IN3)).isEmpty()) {
- if (!this.isBurning() && this.canSmelt()) {
- this.furnaceBurnTime = getItemBurnTime(fuel);
- this.currentItemBurnTime = this.furnaceBurnTime;
- if (this.isBurning()) {
- flag1 = true;
- if (!fuel.isEmpty()) {
- Item item = fuel.getItem();
- fuel.shrink(1);
- if (fuel.isEmpty()) {
- ItemStack item1 = item.getContainerItem(fuel);
- this.inventory.set(FUEL, item1);
- }
- }
- }
- }
- if (this.isBurning() && this.canSmelt()) {
- ++this.cookTime;
- if (this.cookTime == this.totalCookTime) {
- this.cookTime = 0;
- this.totalCookTime = this.getCookTime((ItemStack)this.inventory.get(IN1), (ItemStack)this.inventory.get(IN2), (ItemStack)this.inventory.get(IN3));
- this.smeltItem();
- flag1 = true;
- }
- } else {
- this.cookTime = 0;
- }
- } else if (!this.isBurning() && this.cookTime > 0) {
- this.cookTime = MathHelper.clamp(this.cookTime - 2, 0, this.totalCookTime);
- }
- if (flag != this.isBurning()) {
- flag1 = true;
- BlockFurnace.setState(this.isBurning(), this.world, this.pos);
- }
- }
- if (flag1) {
- this.markDirty();
- }
- }
- public int getCookTime(ItemStack in1, ItemStack in2, ItemStack in3) { return 200; }
- private boolean canSmelt() {
- ItemStack[] in = { inventory.get(IN1), inventory.get(IN2), inventory.get(IN3)};
- for(ItemStack s : in) {
- if(s.isEmpty()) {
- return false;
- }
- }
- ItemStack res = RecipeArcFurnace.getInstance().getResult(in[0], in[1], in[2]);
- if(res.isEmpty()) { return false; }
- else {
- ItemStack out = inventory.get(OUT);
- if(out.isEmpty()) { return true; }
- else if(!out.isItemEqual(res)) { return false; }
- else if(out.getCount() + res.getCount() <= this.getInventoryStackLimit() && out.getCount() + res.getCount() <= out.getMaxStackSize()) { return true; }
- else { return out.getCount() + res.getCount() <= res.getMaxStackSize(); }
- }
- }
- public void smeltItem() {
- if(this.canSmelt()) {
- ItemStack[] in = { inventory.get(IN1), inventory.get(IN2), inventory.get(IN3)};
- ItemStack res = RecipeArcFurnace.getInstance().getResult(in[0], in[1], in[2]);
- ItemStack out = inventory.get(4);
- if(out.isEmpty()) {
- this.inventory.set(4, res.copy());
- } else if(out.getItem() == res.getItem()) {
- out.grow(res.getCount());
- }
- for(ItemStack i : in) {
- i.shrink(1);
- }
- }
- }
- public static int getItemBurnTime(ItemStack stack) {
- if (stack.isEmpty()) {
- return 0;
- } else {
- int burnTime = ForgeEventFactory.getItemBurnTime(stack);
- if (burnTime >= 0) {
- return burnTime;
- } else {
- Item item = stack.getItem();
- if (item == Item.getItemFromBlock(Blocks.WOODEN_SLAB)) {
- return 150;
- } else if (item == Item.getItemFromBlock(Blocks.WOOL)) {
- return 100;
- } else if (item == Item.getItemFromBlock(Blocks.CARPET)) {
- return 67;
- } else if (item == Item.getItemFromBlock(Blocks.LADDER)) {
- return 300;
- } else if (item == Item.getItemFromBlock(Blocks.WOODEN_BUTTON)) {
- return 100;
- } else if (Block.getBlockFromItem(item).getDefaultState().getMaterial() == Material.WOOD) {
- return 300;
- } else if (item == Item.getItemFromBlock(Blocks.COAL_BLOCK)) {
- return 16000;
- } else if (item instanceof ItemTool && "WOOD".equals(((ItemTool)item).getToolMaterialName())) {
- return 200;
- } else if (item instanceof ItemSword && "WOOD".equals(((ItemSword)item).getToolMaterialName())) {
- return 200;
- } else if (item instanceof ItemHoe && "WOOD".equals(((ItemHoe)item).getMaterialName())) {
- return 200;
- } else if (item == Items.STICK) {
- return 100;
- } else if (item != Items.BOW && item != Items.FISHING_ROD) {
- if (item == Items.SIGN) {
- return 200;
- } else if (item == Items.COAL) {
- return 1600;
- } else if (item == Items.LAVA_BUCKET) {
- return 20000;
- } else if (item != Item.getItemFromBlock(Blocks.SAPLING) && item != Items.BOWL) {
- if (item == Items.BLAZE_ROD) {
- return 2400;
- } else if (item instanceof ItemDoor && item != Items.IRON_DOOR) {
- return 200;
- } else {
- return item instanceof ItemBoat ? 400 : 0;
- }
- } else {
- return 100;
- }
- } else {
- return 300;
- }
- }
- }
- }
- public static boolean isItemFuel(ItemStack stack) {
- return getItemBurnTime(stack) > 0;
- }
- @Override
- public boolean isUsableByPlayer(EntityPlayer player) {
- if (this.world.getTileEntity(this.pos) != this) {
- return false;
- } else {
- return player.getDistanceSq((double)this.pos.getX() + 0.5D, (double)this.pos.getY() + 0.5D, (double)this.pos.getZ() + 0.5D) <= 64.0D;
- }
- }
- @Override
- public void openInventory(EntityPlayer entityPlayer) {
- }
- @Override
- public void closeInventory(EntityPlayer entityPlayer) {
- }
- @Override
- public boolean isItemValidForSlot(int index, ItemStack stack) {
- if(index == 4) {
- return false;
- } else if(index != 3) {
- return true;
- } else {
- return isItemFuel(stack);
- }
- }
- @Override
- public int[] getSlotsForFace(EnumFacing side) {
- if(side == EnumFacing.UP) {
- return TOP;
- } else if(side == EnumFacing.WEST) {
- return SIDE_RIGHT;
- } else if(side == EnumFacing.SOUTH) {
- return BACK;
- } else if(side == EnumFacing.EAST) {
- return SIDE_LEFT;
- } else if(side != EnumFacing.NORTH) {
- return BOTTOM;
- } else {
- return TOP;
- }
- }
- @Override
- public boolean canInsertItem(int index, ItemStack stack, EnumFacing enumFacing) {
- return this.isItemValidForSlot(index, stack);
- }
- @Override
- public boolean canExtractItem(int i, ItemStack itemStack, EnumFacing enumFacing) {
- return false;
- }
- public String getGuiID() {
- return "exkva:arc_furnace";
- }
- @Override
- public int getField(int id) {
- switch(id) {
- case 0:
- return this.furnaceBurnTime;
- case 1:
- return this.currentItemBurnTime;
- case 2:
- return this.cookTime;
- case 3:
- return this.totalCookTime;
- default:
- return 0;
- }
- }
- @Override
- public void setField(int id, int value) {
- switch(id) {
- case 0:
- this.furnaceBurnTime = value;
- break;
- case 1:
- this.currentItemBurnTime = value;
- break;
- case 2:
- this.cookTime = value;
- break;
- case 3:
- this.totalCookTime = value;
- }
- }
- @Override
- public int getFieldCount() {
- return 4;
- }
- @Override
- public void clear() {
- this.inventory.clear();
- }
- }
- //Stacktrace, error
- [15:39:11] [Server thread/FATAL] [minecraft/MinecraftServer]: Error executing task
- java.util.concurrent.ExecutionException: java.lang.NullPointerException
- at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_181]
- at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_181]
- at net.minecraft.util.Util.runTask(Util.java:54) [Util.class:?]
- at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:798) [MinecraftServer.class:?]
- at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) [MinecraftServer.class:?]
- at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) [IntegratedServer.class:?]
- at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
- at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
- Caused by: java.lang.NullPointerException
- at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:79) ~[SlotItemHandler.class:?]
- at net.minecraft.inventory.Container.getInventory(Container.java:75) ~[Container.class:?]
- at net.minecraft.inventory.Container.addListener(Container.java:61) ~[Container.class:?]
- at net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:101) ~[FMLNetworkHandler.class:?]
- at net.minecraft.entity.player.EntityPlayer.openGui(EntityPlayer.java:2809) ~[EntityPlayer.class:?]
- at exokem.exkva.objects.machines.MachineArcFurnace.onBlockActivated(MachineArcFurnace.java:55) ~[MachineArcFurnace.class:?]
- at net.minecraft.server.management.PlayerInteractionManager.processRightClickBlock(PlayerInteractionManager.java:475) ~[PlayerInteractionManager.class:?]
- at net.minecraft.network.NetHandlerPlayServer.processTryUseItemOnBlock(NetHandlerPlayServer.java:769) ~[NetHandlerPlayServer.class:?]
- at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:68) ~[CPacketPlayerTryUseItemOnBlock.class:?]
- at net.minecraft.network.play.client.CPacketPlayerTryUseItemOnBlock.processPacket(CPacketPlayerTryUseItemOnBlock.java:13) ~[CPacketPlayerTryUseItemOnBlock.class:?]
- at net.minecraft.network.PacketThreadUtil$1.run(PacketThreadUtil.java:21) ~[PacketThreadUtil$1.class:?]
- at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_181]
- at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_181]
- at net.minecraft.util.Util.runTask(Util.java:53) ~[Util.class:?]
- ... 5 more
- [15:39:11] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
- net.minecraft.util.ReportedException: Ticking player
- at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:848) ~[MinecraftServer.class:?]
- at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:743) ~[MinecraftServer.class:?]
- at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:192) ~[IntegratedServer.class:?]
- at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:592) [MinecraftServer.class:?]
- at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]
- Caused by: java.lang.NullPointerException
- at net.minecraftforge.items.SlotItemHandler.getStack(SlotItemHandler.java:79) ~[SlotItemHandler.class:?]
- at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:97) ~[Container.class:?]
- at exokem.exkva.objects.containers.ContainerArcFurnace.detectAndSendChanges(ContainerArcFurnace.java:44) ~[ContainerArcFurnace.class:?]
- at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:365) ~[EntityPlayerMP.class:?]
- at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2171) ~[World.class:?]
- at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:871) ~[WorldServer.class:?]
- at net.minecraft.world.World.updateEntity(World.java:2130) ~[World.class:?]
- at net.minecraft.world.WorldServer.tickPlayers(WorldServer.java:672) ~[WorldServer.class:?]
- at net.minecraft.world.World.updateEntities(World.java:1906) ~[World.class:?]
- at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:643) ~[WorldServer.class:?]
- at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:842) ~[MinecraftServer.class:?]
- ... 4 more
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement