Jump to content

how to make variables unique per block and persistant in save?


trollworkout

Recommended Posts

So I made a few variables and I noticed they appear to be shared between all blocks of a certain type.

 

For example each Vat is supposed to contain an amount of silver, zinc, tin, lead and copper deposits. All are individual for each vat.

 

However when using say int copper, int zinc ... seems like they all share the same values and they all fill up at the same time with same stuff.

 

Any thoughts?

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

Thank you!

 

I will figure out this tile entity thing.

 

You think PropertyInt can also work? I noticed leaves do it that way.

 

How many properties can I have maximum per block?

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

You can't save twelve PropertyInts in block metadata:

Metadata can only store 4 bits of information.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I need 0 - 64  int copper tin zinc silver lead (x5) + E W S N properties for spout connection.

 

that's 4 booleans and 5 ints  of maximum 8 bits each

 

SO I guess I need an entity

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

I need 0 - 64  int

 

Aaaaaaaand you've already gone past the limit of 4 bits.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thanks a lot for your help also . Very much appreciate all the help I can get.

 

also is there any example for TileEntity?

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

I was just reading about TileEntity. Is a block addon that adds custom data, also updates per tick 20 times / second and custom renderer :D

 

That's what I need.

Disclaimer:  I been told to keep my opinions to myself, to shut up and that I am spreading lies and misinformation or even that my methods are unorthodox and or too irregular. Here are my suggestions take it or leave it.

Link to comment
Share on other sites

also updates per tick 20 times / second and custom renderer :D

 

It doesn't need to do either of these things.

I've been using standard block models for my TEs (the furnace does this).

I've also got a couple of non-ticking TEs (the potted plant is a good example).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

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...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.