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.

Theirown

Members
  • Joined

  • Last visited

Everything posted by Theirown

  1. Old thread I know, but thought I would share the behavior that caused this since it is very interesting. One problem I found in the code above is that in the CatLieOnCatnipGoal constructor, you have this line: this.verticalSearchStart = -2; While counter-intuitive and a bit obfuscated, the find nearest block uses this variable like so: for(int k = this.verticalSearchStart; k <= j; k = k > 0 ? -k : 1 - k) { This is a part of a series of for loops to search every block within the range. The line above will perform a search going away from a vertical start in a pseudo- absolute value fashion. Basically it alternates between going up then down. If the starting value is 0, the pattern is: START k=0 EVALUATE k= k > 0 ? -k : 1 - k (FALSE, so evaluate right side of ":") EVALUATE k=1-k (1-0) END k=1 (do stuff and loop again) EVALUATE k= k > 0 ? -k : 1 - k (TRUE, so evaluate left side of ":") EVALUATE k = -k (-1) END k=-1 (skipping ahead) k=2 k=-2 k=3 k=-3 By starting at -2, the search will never land on any blocks within 1 vertical block of your cats.

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.