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.

Felixkeeg

Members
  • Joined

  • Last visited

  1. @GotoLink I know that I am not able to reference a non-static method in a static context normally but I do know there's a way to manage this, as I think this is the method they used for the setBlock Command of CommandBlocks in 1.7.2. If I am wrong and am using the wrong method I just want to know which method I gotta use in order to place a block at a position. @Draco18s I know it's not the same. world.setBlock() cannot be resolved, therefore World.setBlock() is the right option. I was just a little careless with the problem-description, sorry for that.
  2. Hi again! I'm working on a mod letting spawn an asteroid (Darkmatter_Block) with a chance of one tenth every time a new Chunk is generated. It should be spawned inside a 200 block radius from the player (for now I only included the positive values) The problem is: I get an error at the World.setBlock(plX, plY, plZ, 500); line at the very end. Eclipse tells me that I should "change the modifier of '.setBlock()' to 'static' " in the world.class but that would cause the world.class not to work I begin to doubt that .setBlock() is even the right method but tbh I don't find anything coming close to making more sense. If anyone sees my fault I would really appreciate some help with this. Probably it's just me being a little retarded^^ Thank you in advance =)
  3. Hi guys! The best way to do this was the Method onChunkGenerate(). It is a great way to trigger the loop and, unlike onChunkLoad(), it makes sure, that only new Chunks count^^
  4. Thx for your replies, I will make sure to check them out^^ (Will post again, when I get it to work)
  5. Hi! I wanted to make a mod letting asteroids fall from the sky. To make them more rare I wanted to let them appear using an If-Loop. But in order to initiate the loop I need a command (in the code ofc) which detects if a new chunk has been loaded. (Only newly generated chunks should be counted) Would be great if anyone could help me with this =)

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.