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

So other than the cheesy title, I would like to ask a three part question on some things I am having trouble with.

 

 

 

Timers: Are they done differently since the client/server merge? For an example, I have a timer that sets eggs to hatch after so many ticks. I figured it would be fine since it is saved as an NBT, but sadly that was not the case. Would this be a good time to invest in a datawatcher, or is there perhaps another problem that I could be having?

 

The code is just a simple bit in onUpdate()

 

public void onUpdate()

{

hatchTime++;

    if(hatchTime>= 80)

    hatch();

    super.onUpdate();

    }

 

 

Biomes is more of a general question.

I was looking through the code to see if I could find how mushroom islands were generated, but couldn't quite find it in any of the biome files.

 

Is there a special way to make a biome that is not connected to the mainland?  And if islands are possible, would floating biomes and underground biomes also be plausible using the same logic?

 

 

Music Disks I would just like to see if there are some general pointers on.

 

I remember reading that Forge has a way to implement music files, and I was just looking for more information on how to do that.

Also, do .mp3s work, or is there a special format?

hatch() sounds like it changes the entity state/places another entity. If so, it should be serverside-only and the value should be datawatcher'd. (ie the entity should have an 'isHatched' boolean and serverside updates the client one, etc.)

  • Author

Darn. I was afraid of that. Thanks.

 

Will also look into the GenLayer file. Hadn't looked there. Thanks for the replies.

 

Now only for that tricky music disk question

 

Add the time variable as an nbt uniquely saved to the entity/whatever, otherwise it won't work with 2 or more objects

"you seem to be THE best modder I've seen imo."

~spynathan

 

ლ(́◉◞౪◟◉‵ლ

Not sure what you mean, as I can build a timer into an entity and it works with multiple instances (as in each one has a unique timer). To keep the timer in it's state, however, you would need the NBT tagging. (And ofc to have it for both server and client you need to datawatcher the value, but doing that with timers is a poor idea and should instead be done with what happens when the timer expires)

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.