Listen to me Sloop. My opinion is my opinion. If you agree with it, then that is great. If you do not, move along. You have beliefs about Minecraft, and I have mine. I respect your opinion even though I may not agree with it. There is no point in rebutting your point since you have your beliefs, and I am sure you do not have any intentions of changing them. Lets leave it at that shall we?
Also thanks for the grammar tip. I will put it to good use.
0
If you try the code you will see that it actually works just fine. However, yes the solution you proposed does fit his needs much better.
0
Just use java's random generator to get the random number:
int num = (int)(Math.random() * 9 + 1);
if (num < 3) {
num+=3;
}
0
Greetings,
How are we supposed to help you without any code to look at? I see there is a problem in your block class with the onBlockActivated method, but without the code I cannot tell you what's wrong. Please paste your code on pastebin.com and paste the link in your thread.
Thank you,
TheBoeing767fan
0
Alright, after a ton of experimenting I finally got it to work by using metadata's.
Here are all the relevant classes for reference in case someone needs it in the future.
https://gist.github.com/anonymous/2eb440d9580144e5aed4
Thanks for everyone's help.
Cheers!!
0
Here are all three
https://gist.github.com/anonymous/4d71c1663d9cf4876e3e
0
Try removing everything affiliated to build craft and try again.
0
I did that initially (except for the NBT bit, I need to do more research on that) however the metadata also controls the rotation of the block. For instance, when the block is facing east, the metadata is say 3. I always believed you can only use the metadata for one thing at a time such as defining a texture, sub-block, or a rotation. Correct me if I'm wrong about this I still have a lot to learn.
Cheers!
0
I agree I should back off from this for now. Thanks a bunch for your help.
If anyone else has any other ideas please do chime in.
Cheers!!
0
I had something similar to yours, but I copied over your code and still no avail...
Also the values are coming up in the console.
What could be wrong?
Does it need a method to initiate a render update?
0
I tried that and guess what..... still won't change I may have put something incorrectly in the render class once again so ill link that.
**Here is what I did Renderer Class (NEW VERSION)
Thank you so much for the help
0
Indeed. I have spent a large quantity of time trying to solve this myself so it would be nice to finally be able to move on
Anyway I really do appreciate your help and if something does come to your mind please do post it
Cheers!
0
The oonNeighborBlockChange method changes the variable, but im getting no response from the renderer...
0
Thank you very much for explaining that.
I added what you told me and it still does not want to change. Could something be wrong in the render class?
Thanks!
0
Thanks for the reply. I tried storing it in the NBT but the texture still does not change. Here are the full classes.
Tile Entity
Block
Renderer
Cheers!
0
So basically, the variable has to be written to an NBT? If so, how would I do this? I looked around the forums, but I do not seem to understand it fully.