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.

ThatSandwich

Members
  • Joined

  • Last visited

Everything posted by ThatSandwich

  1. i have a function that gets a random structure from a array of specific structures, but in order for it to work i have to make a list of every structure i want it to work with, which means for it to work with other mods i would have to set them all as dependencies and etc, is there a way to make it so it just gets an array of all the structure for ever mod installed? my current code: Random rndm = new Random(); ArrayList<Structure> structureList = new ArrayList<Structure>(); structureList.add(Structure.MINESHAFT); structureList.add(Structure.PILLAGER_OUTPOST); structureList.add(Structure.WOODLAND_MANSION); structureList.add(Structure.JUNGLE_TEMPLE); structureList.add(Structure.DESERT_PYRAMID); structureList.add(Structure.IGLOO); structureList.add(Structure.RUINED_PORTAL); structureList.add(Structure.SHIPWRECK); structureList.add(Structure.SWAMP_HUT); structureList.add(Structure.OCEAN_MONUMENT); structureList.add(Structure.BURIED_TREASURE); structureList.add(Structure.VILLAGE); Structure rndmElem = structureList.get(rndm.nextInt(structureList.size())); BlockPos structureLocation = new BlockPos(overworld.findNearestMapFeature(rndmElem, playerPos, 100, false)); double xLocation = structureLocation.getX(); double yLocation = playerLocation.y; double zLocation = structureLocation.getZ();

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.