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.

bacomatic

Members
  • Joined

  • Last visited

Everything posted by bacomatic

  1. Short story: Writing something that dynamically affects wold spawn behavior (key word "dynamic"). Noticed that after a while only spiders, endermen and slimes were showing up in the potential spawn list (now imagine a world stuffed full of endermen and spiders, eek!). It turns out that my removal of entity classes from the PotentialSpawns event was causing those types to never be considered again for whatever chunk was being checked. I don't know if this was intentional so I thought I'd check in here before filing a ticket on GitHub. I dug into the problem: When you change the list of entity classes in WorldEvent.PotentialSpawns, that change becomes permanent for whatever chuck that list belongs to. The chunk code simply returns a list stored in a field, the Forge event code then passes this along and finally the list field in PotentialSpawns is final so you cannot simply swap it out. I recommend making a copy of oldList (new ArrayList(oldList)) in the PotentialSpawns constructor. The other option would be to make it non-final which would have marginally less performance and heap impact, but brings other issues to the table (like potential compatibility issues between mods).

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.