Advertisement
Guest User

Untitled

a guest
Jan 6th, 2016
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 9.57 KB | None | 0 0
  1. Error:
  2.  
  3. ---- Minecraft Crash Report ----
  4. // Sorry :(
  5.  
  6. Time: 6.1.2016 15:34
  7. Description: Ticking entity
  8.  
  9. java.lang.ArrayIndexOutOfBoundsException: 9
  10.     at com.nitrodev.constructio.blocks.TileConstructor.getStackInSlot(TileConstructor.java:19)
  11.     at net.minecraft.inventory.Slot.getStack(Slot.java:81)
  12.     at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:84)
  13.     at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263)
  14.     at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2009)
  15.     at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:724)
  16.     at net.minecraft.world.World.updateEntity(World.java:1974)
  17.     at net.minecraft.world.World.updateEntities(World.java:1803)
  18.     at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:559)
  19.     at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:771)
  20.     at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:675)
  21.     at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159)
  22.     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:542)
  23.     at java.lang.Thread.run(Thread.java:745)
  24.  
  25.  
  26. A detailed walkthrough of the error, its code path and all known details is as follows:
  27. ---------------------------------------------------------------------------------------
  28.  
  29. -- Head --
  30. Stacktrace:
  31.     at com.nitrodev.constructio.blocks.TileConstructor.getStackInSlot(TileConstructor.java:19)
  32.     at net.minecraft.inventory.Slot.getStack(Slot.java:81)
  33.     at net.minecraft.inventory.Container.detectAndSendChanges(Container.java:84)
  34.     at net.minecraft.entity.player.EntityPlayerMP.onUpdate(EntityPlayerMP.java:263)
  35.     at net.minecraft.world.World.updateEntityWithOptionalForce(World.java:2009)
  36.     at net.minecraft.world.WorldServer.updateEntityWithOptionalForce(WorldServer.java:724)
  37.     at net.minecraft.world.World.updateEntity(World.java:1974)
  38.  
  39. -- Entity being ticked --
  40. Details:
  41.     Entity Type: null (net.minecraft.entity.player.EntityPlayerMP)
  42.     Entity ID: 258
  43.     Entity Name: Player419
  44.     Entity's Exact location: 182,53, 61,00, 242,30
  45.     Entity's Block location: 182,00,61,00,242,00 - World: (182,61,242), Chunk: (at 6,3,2 in 11,15; contains blocks 176,0,240 to 191,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
  46.     Entity's Momentum: 0,00, -0,08, 0,00
  47.     Entity's Rider: ~~ERROR~~ NullPointerException: null
  48.     Entity's Vehicle: ~~ERROR~~ NullPointerException: null
  49. Stacktrace:
  50.     at net.minecraft.world.World.updateEntities(World.java:1803)
  51.     at net.minecraft.world.WorldServer.updateEntities(WorldServer.java:559)
  52.  
  53. -- Affected level --
  54. Details:
  55.     Level name: Testing
  56.     All players: 1 total; [EntityPlayerMP['Player419'/258, l='Testing', x=182,53, y=61,00, z=242,30]]
  57.     Chunk stats: ServerChunkCache: 653 Drop: 0
  58.     Level seed: -5411415688051097589
  59.     Level generator: ID 00 - default, ver 1. Features enabled: true
  60.     Level generator options:
  61.     Level spawn location: 188,00,64,00,252,00 - World: (188,64,252), Chunk: (at 12,4,12 in 11,15; contains blocks 176,0,240 to 191,255,255), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
  62.     Level time: 9385 game time, 9385 day time
  63.     Level dimension: 0
  64.     Level storage version: 0x04ABD - Anvil
  65.     Level weather: Rain time: 67467 (now: false), thunder time: 89294 (now: false)
  66.     Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: true
  67. Stacktrace:
  68.     at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:771)
  69.     at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:675)
  70.     at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:159)
  71.     at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:542)
  72.     at java.lang.Thread.run(Thread.java:745)
  73.  
  74. -- System Details --
  75. Details:
  76.     Minecraft Version: 1.8.8
  77.     Operating System: Windows 8.1 (amd64) version 6.3
  78.     Java Version: 1.8.0_65, Oracle Corporation
  79.     Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
  80.     Memory: 596043760 bytes (568 MB) / 840433664 bytes (801 MB) up to 1895825408 bytes (1808 MB)
  81.     JVM Flags: 0 total;
  82.     IntCache: cache: 0, tcache: 0, allocated: 12, tallocated: 94
  83.     FML: MCP 9.18 Powered by Forge 11.15.0.1649 4 mods loaded, 4 mods active
  84.     States: 'U' = Unloaded 'L' = Loaded 'C' = Constructed 'H' = Pre-initialized 'I' = Initialized 'J' = Post-initialized 'A' = Available 'D' = Disabled 'E' = Errored
  85.     UCHIJAAAA   mcp{9.18} [Minecraft Coder Pack] (minecraft.jar)
  86.     UCHIJAAAA   FML{8.0.99.99} [Forge Mod Loader] (forgeSrc-1.8.8-11.15.0.1649-1.8.8.jar)
  87.     UCHIJAAAA   Forge{11.15.0.1649} [Minecraft Forge] (forgeSrc-1.8.8-11.15.0.1649-1.8.8.jar)
  88.     UCHIJAAAA   constructio{1.0} [ConstructIO] (ConstructIO)
  89.     Loaded coremods (and transformers):
  90.     GL info: ~~ERROR~~ RuntimeException: No OpenGL context found in the current thread.
  91.     Profiler Position: N/A (disabled)
  92.     Player Count: 1 / 8; [EntityPlayerMP['Player419'/258, l='Testing', x=182,53, y=61,00, z=242,30]]
  93.     Type: Integrated Server (map_client.txt)
  94.     Is Modded: Definitely; Client brand changed to 'fml,forge'
  95.  
  96. Code:
  97.  
  98. package com.nitrodev.constructio.blocks;
  99.  
  100. import net.minecraft.entity.player.EntityPlayer;
  101. import net.minecraft.inventory.IInventory;
  102. import net.minecraft.item.ItemStack;
  103. import net.minecraft.nbt.NBTTagCompound;
  104. import net.minecraft.nbt.NBTTagList;
  105. import net.minecraft.tileentity.TileEntity;
  106. import net.minecraft.util.IChatComponent;
  107.  
  108. public class TileConstructor extends TileEntity implements IInventory {
  109.    private ItemStack[] stacks = new ItemStack[9];
  110.  
  111.    public int getSizeInventory() {
  112.        return 9;
  113.    }
  114.  
  115.    public ItemStack getStackInSlot(int index) {
  116.        return this.stacks[index];
  117.    }
  118.  
  119.    public ItemStack decrStackSize(int index, int count) {
  120.        if (this.stacks[index] != null) {
  121.            ItemStack lvt_3_2_;
  122.            if (this.stacks[index].stackSize <= count) {
  123.                lvt_3_2_ = this.stacks[index];
  124.                this.stacks[index] = null;
  125.                this.markDirty();
  126.                return lvt_3_2_;
  127.            } else {
  128.                lvt_3_2_ = this.stacks[index].splitStack(count);
  129.                if (this.stacks[index].stackSize == 0) {
  130.                    this.stacks[index] = null;
  131.                }
  132.  
  133.                this.markDirty();
  134.                return lvt_3_2_;
  135.            }
  136.        } else {
  137.            return null;
  138.        }
  139.    }
  140.  
  141.    public ItemStack removeStackFromSlot(int p_removeStackFromSlot_1_) {
  142.        if (this.stacks[p_removeStackFromSlot_1_] != null) {
  143.            ItemStack lvt_2_1_ = this.stacks[p_removeStackFromSlot_1_];
  144.            this.stacks[p_removeStackFromSlot_1_] = null;
  145.            return lvt_2_1_;
  146.        } else {
  147.            return null;
  148.        }
  149.    }
  150.  
  151.  
  152.    public void setInventorySlotContents(int p_setInventorySlotContents_1_, ItemStack p_setInventorySlotContents_2_) {
  153.        this.stacks[p_setInventorySlotContents_1_] = p_setInventorySlotContents_2_;
  154.        if (p_setInventorySlotContents_2_ != null && p_setInventorySlotContents_2_.stackSize > this.getInventoryStackLimit()) {
  155.            p_setInventorySlotContents_2_.stackSize = this.getInventoryStackLimit();
  156.        }
  157.  
  158.        this.markDirty();
  159.    }
  160.  
  161.    public String getName() {
  162.        return null;
  163.    }
  164.  
  165.    public boolean hasCustomName() {
  166.        return false;
  167.    }
  168.  
  169.    @Override
  170.    public IChatComponent getDisplayName() {
  171.        return null;
  172.    }
  173.  
  174.    public void readFromNBT(NBTTagCompound compound) {
  175.        super.readFromNBT(compound);
  176.        NBTTagList lvt_2_1_ = compound.getTagList("Items", 10);
  177.        this.stacks = new ItemStack[this.getSizeInventory()];
  178.  
  179.        for (int lvt_3_1_ = 0; lvt_3_1_ < lvt_2_1_.tagCount(); ++lvt_3_1_) {
  180.            NBTTagCompound lvt_4_1_ = lvt_2_1_.getCompoundTagAt(lvt_3_1_);
  181.            int lvt_5_1_ = lvt_4_1_.getByte("Slot") & 255;
  182.            if (lvt_5_1_ >= 0 && lvt_5_1_ < this.stacks.length) {
  183.                this.stacks[lvt_5_1_] = ItemStack.loadItemStackFromNBT(lvt_4_1_);
  184.            }
  185.        }
  186.  
  187.    }
  188.  
  189.    public void writeToNBT(NBTTagCompound compound) {
  190.        super.writeToNBT(compound);
  191.        NBTTagList lvt_2_1_ = new NBTTagList();
  192.  
  193.        for (int lvt_3_1_ = 0; lvt_3_1_ < this.stacks.length; ++lvt_3_1_) {
  194.            if (this.stacks[lvt_3_1_] != null) {
  195.                NBTTagCompound lvt_4_1_ = new NBTTagCompound();
  196.                lvt_4_1_.setByte("Slot", (byte) lvt_3_1_);
  197.                this.stacks[lvt_3_1_].writeToNBT(lvt_4_1_);
  198.                lvt_2_1_.appendTag(lvt_4_1_);
  199.            }
  200.        }
  201.  
  202.    }
  203.  
  204.    public int getInventoryStackLimit() {
  205.        return 64;
  206.    }
  207.  
  208.    public boolean isUseableByPlayer(EntityPlayer p_isUseableByPlayer_1_) {
  209.        return this.worldObj.getTileEntity(this.pos) != this ? false : p_isUseableByPlayer_1_.getDistanceSq((double) this.pos.getX() + 0.5D, (double) this.pos.getY() + 0.5D, (double) this.pos.getZ() + 0.5D) <= 64.0D;
  210.    }
  211.  
  212.    public void openInventory(EntityPlayer p_openInventory_1_) {
  213.    }
  214.  
  215.    public void closeInventory(EntityPlayer p_closeInventory_1_) {
  216.    }
  217.  
  218.    public boolean isItemValidForSlot(int p_isItemValidForSlot_1_, ItemStack p_isItemValidForSlot_2_) {
  219.        return true;
  220.    }
  221.  
  222.  
  223.    public int getField(int p_getField_1_) {
  224.        return 0;
  225.    }
  226.  
  227.    public void setField(int p_setField_1_, int p_setField_2_) {
  228.    }
  229.  
  230.    public int getFieldCount() {
  231.        return 0;
  232.    }
  233.  
  234.    public void clear() {
  235.        for (int lvt_1_1_ = 0; lvt_1_1_ < this.stacks.length; ++lvt_1_1_) {
  236.            this.stacks[lvt_1_1_] = null;
  237.        }
  238.  
  239.    }
  240. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement