Posted October 21, 20196 yr 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 October 21, 20196 yr by Elrol_Arrowsend Solved
October 21, 20196 yr 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.
October 21, 20196 yr Author Isnt that supposed to be the max number that should be allowed there? or does it make every blockstate value between the max and the min?
October 21, 20196 yr 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.
October 21, 20196 yr 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
October 21, 20196 yr 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.
October 21, 20196 yr Author Yeah, makes a big difference, changed it to be much lower and it loaded. Thanks for that.
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.