Posts: 34
Threads: 2
Joined: Mar 2012
Thanks: 1
Given 3 thank(s) in 3 post(s)
Hello. I'm trying to implement decent support for note blocks and have a problem with storage of current pitch. I see that block meta data is trimmed to only 4 bits, which don't allow me to store the full range of possibilities=25.
Is there any other place to store that number?
Posts: 34
Threads: 2
Joined: Mar 2012
Thanks: 1
Given 3 thank(s) in 3 post(s)
Trying to figure out how entities works I noticed that signs does not work at all (after reconnect they just disappear going back to inventory which is weird).
Are they on todo list, or we have some regression here? (judging from the amount of related code it's rather second option...)
Posts: 4,624
Threads: 115
Joined: Dec 2011
Thanks: 693
Given 493 thank(s) in 422 post(s)
did you have the scheme in the world.ini to Anvil? if not do that i think that wil fix the problem.
Posts: 34
Threads: 2
Joined: Mar 2012
Thanks: 1
Given 3 thank(s) in 3 post(s)
08-13-2012, 05:14 AM
(This post was last modified: 08-13-2012, 05:16 AM by l0udPL.)
Nope, it's default. It may help, thanks. But it's still weird to me especially when I can see sign-handling code in WSSCompat... And default storage should be best in the terms of compatibility...
Posts: 90
Threads: 8
Joined: Dec 2011
Thanks: 0
Given 3 thank(s) in 3 post(s)
Hey,
thanks for the patch, l0udPL.
But I think we have to work on the Entity system. It´s very ugly that we have to hardcode every entity in that many places. (For full compatibility we need to add much more entities)
Wouldn´t it be much cleaner to somehow merge cBlockEntity and cBlockEntityHandler?
The only problem would be the storage at the runtime. (Although it is no problem to create multiple instances of a blockhandler)
Posts: 34
Threads: 2
Joined: Mar 2012
Thanks: 1
Given 3 thank(s) in 3 post(s)
Lapayo, I was thinking about the same thing, unfortunately I'm not familiar enough with this code to make such a big changes.
Anyway, storage should be pretty easy to standardize if we assume that every cBlockEntity - cBlockEntityHandler hybrid must have handlers to reading/writing in Anvil and [default thing]. The current solution is weird - we have json-related methods to [default thing] but Anvil does everything independently...
xoft, is there any easy way to get the block entity having world handler and block coordinates? Maybe I'm blind but I cannot find anything to use in 1 line...