Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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.

 

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

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.

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);

  • Author

I have the initialization in the init() method which I call from the mod class

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.

  • 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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.