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

I am trying to see if I would be able to add new properties to a block that already exists in the world, or change the values of a block property in the world.
Currently any time I try to run my code to test, it freezes at the initalization of the Propertys

 

public static final PropertyInteger tempProp = PropertyInteger.create("temp", 0, 2000000000);
public static final PropertyBool sourceProp = PropertyBool.create("tempSource");
	

 

The reason I am wanting to do this is to make an api to handle block temps, and adding/updating temps on blocks in the world. 

What we were currently planning on doing, was to have certain blocks be sources of a temp, like lava or torches, and that would slowly heat up blocks around it until all the blocks in a certain area had a temp value, and have a few events check every second to update the players temp and what not. 

 

The updates would be slow, but also somewhat realistic, lighting a fire wont instantly make the room hot, it would take a bit to warm up.

The only way that I could think to make this happen was to store the temps on the blocks and check the properties when we are looking for them.

 

**SOLVED**

 

Dont make the number so high, since it makes each of the files the max is too high it adds 4 billions states, I changed it to 2k and it works

Edited by Elrol_Arrowsend
Solved

28 minutes ago, Elrol_Arrowsend said:

2000000000

When you apply this and the boolean value do you have any idea how many IBlockState values are created?

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

3 minutes ago, Elrol_Arrowsend said:

or does it make every blockstate value  between the max and the min?

It makes every blockstate value at startup. 2,000,000,000 is way too many. That's 4,000,000,000 block states for blocks that dont have other properties. Imagine redstone. Also this wont work in 1.14 so you'd be better off with a chunk capability that stores an integer for every block position.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

  • Author

Ok yeah, hoenstly did not know that it made them ALL, I was thinking it just was storing the number, going to drop that down to like idk 1k or something

1 minute ago, Elrol_Arrowsend said:

Ok yeah, hoenstly did not know that it made them ALL

Well now you know that BlockStates are singletons.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

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.