Posted December 28, 201311 yr Whenever I try to implement one of my blocks, minecraft crashes on world start up. If I comment out all the registration and initialization for this block, the game runs fine and all my other blocks work. It's just this one. And I have no idea why This is a copy of what was in the console: https://gist.github.com/Mrolas/8157495 And this is all the relevant code: http://pastebin.com/u/Mrolas The block that is somehow causing it is the one called shopStop in the files.
December 28, 201311 yr Hi I couldn't navigate your code but it looks to me like you're running out of memory because the vanilla code keeps trying to find a place to spawn the player, but for some reason it can't find anywhere that doesn't collide with one of the blocks. This is odd because it keeps increasing the y value and normally it should pop out into free space, unless you're in a world with no sky. Each time it tries, it creates an AABB and if it keeps trying long enough, it runs out of heap space to store them all. Are you doing something strange with your shopStop block boundaries, minX, maxX, that sort of thing? Or have you replaced all the "air" blocks in your world with something that has a collision box? If it were me, I would add a breakpoint to here EntityPlayerMP constructor:: while (!par2World.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty()) { this.setPosition(this.posX, this.posY + 1.0D, this.posZ); } and trace through getCollidingBoundingBoxes to see why it always finds a colliding box even though the y position is repeatedly incremented. -TGG
December 28, 201311 yr The link to your code is useless to us... all the code there is already compiled into class files and unreadable unless we decompile them.
December 28, 201311 yr Author Oh, sorry, did not realize that. Well here's all the code I think might be relevant. http://pastebin.com/u/Mrolas And no, I haven't done anything to make it spawn in the world a bunch
December 28, 201311 yr I dont know if this is it or not, but you are never initializing your blocks. public static ShopStop shopStop; Should be public static ShopStop shopStop = new ShopStop(ID HERE);
December 28, 201311 yr Author I have the initialization in the init() method which I call from the mod class
December 28, 201311 yr ok, that file wasnt in the link you gave. As far as I can tell there isnt anything that would cause a memory error in the files that you did provide. Maybe I overlooked something, but I dont think the problem is in those files.
December 28, 201311 yr Author Oh wow... Can't believe I was that stupid I forgot to set up the block's ID in the config handler so it defaulted to zero making all the air blocks that block.. wow
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.