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.

jstastny

Members
  • Joined

  • Last visited

Everything posted by jstastny

  1. I tried searching the Forge code, and while I wasn't able to find the code for nether fortresses or spawners, I found a similar code used for spawning cats in swamp huts. I used this code and it worked like charm! Thank you!
  2. I tried what you suggested and used the method they used with the ender eye and after a bit of tuning, it worked. Honestly, I already tried using exactly this method before, but the game kept crashing because of class cast exception, so I gave up on that. But still, thank you so much! Regarding the same mod, I have one more question. Is there any way (under the same conditions) to find out boundaries of structures or whether the player is in them?
  3. I have an item that when right-clicked should locate the nearest structure (important is the type of the structure and its coordinates), take the data and if the structure is close enough to the player, create a book that contains the data. So, if I understood the differences between 1.19 and older versions, probably method use(). This method should have arguments Player and World, but I wasn't able to get instance of ServerLevel from neither of those.
  4. Hello, I'm working on updating certain old mod, this time from 1.12.2 to 1.19.4, and I again stumbled upon the same issue. In this mod, I still need the function that gives me coordinates of the nearest generated structure. I again found a method that can do this, but unfortunately, this time the method requires an instance of the class ServerLevel (probably a new name for ServerWorld). In order to get this instance, I again tried reverse-engineering several mods for 1.19.4 and parts of Forge code, but just as in case of 1.15.2, none of the methods I tried worked. Does anyone know how to solve this? Thanks for any response.
  5. Hello, I'm working on updating certain old mod from 1.12.2 to 1.15.2 and I stumbled upon a certain issue. In this mod, I need a function that gives me coordinates of the nearest generated structure (things like villages, temples, etc.). I already found a method that can do this, but unfortunately, this method requires an instance of the class ServerWorld. In order to get this instance, I tried reverse-engineering several other mods for 1.15.2 and parts of Forge code, but none of the methods I tried ever worked. Does anyone know how to solve this? Thanks for any response.

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.