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.

Featured Replies

Posted

Alright so I found this outstanding thread here on the forums: 

That basically provides perfect examples of how to intergrate the ability to spawn structures using NBT data. It is excellent and it works wonderfully. I am having an issue with it though. a post in that thread provided sample code which I utilized to spawn my own structures. Here is the class:

https://pastebin.com/RjzU1Zbs  - generateStructure

 

And here is my worldGen class: https://pastebin.com/Z64VDCKR (Line 52 is where the alter spawn is)

 

So it works great and the log does indicate the location that my structures are spawning (yes they are supposed to be rare so that spawn chance of 1 is intentional). However, the issue I am running across is the structures are not spreading out. They are spawning in a consolidated area and sometimes ontop of each other.

 

Here is the log: https://pastebin.com/7ZEtK4iD

 

As you can tell the coords are basically on top of each other. I am aware that this is likely beause on my worldGen class my X, Y and Z are in relatively close range of each other. But this is the first time I am working with structures so I can't be too sure. Any ideas on how to spread this out and maybe only make this happen once per chunk so they are not spawning on top of each other and how to make it so they are much more spread out coordiante wise?

Edited by HalestormXV

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

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.