Mineways
Mineways copied to clipboard
Blocks changed with the Debug Stick do not render properly
The Debug Stick lets you change the properties of various blocks. It is not supported by Mojang (i.e., you could set blocks in a way that breaks the game). Mineways also does not support it currently.
This ability to change properties at will affects at least two block types: stairs and walls.
In the old, pre-1.13 system, stairs had two properties: direction and half (upper or lower), taking 3 bits. In 1.13 a "shape" property was added, with five states, and so taking 3 more bits. One more bit is needed for "waterlogged." This unfortunately means all 7 property bits are in use for this block type. While it would be possible to hold all 7 bits, it also means that the 3 extra bits that are used to stuff up to 8 types of stairs in each stair type field inside Mineways could no longer do so. Instead, each stair type would have to use a separate type value. There are only 510 of these stair types (heads and flowers each take up two types). With 36 stair types needed, and 17 stair types currently in use, this means adding 19 new types. Doable, but something of a pain, and it uses up types.
Walls are impossible, short of using type bits. In the old system, walls had no properties, with properties derived from the environment. In 1.13 on, there are east/north/south/west none/low/tall properties - that's 8 bits. There is also an "up" bit and a waterlogged bit: 10 bits. This is impossible under the current system, which allows only 8 bits total for the data values.
The long-term solution is to extend the type and data values to hold more than 8 bits each. I would probably go with 16 bits for each, giving plenty of room to spread out: every block type could have its own number, for example, and we could get rid of all the "types or subtypes" mess with materials. We would want to have a translation layer for reading old format worlds so we could do so. The display would show the name of the type instead of the old-fashioned numbers.
This would also solve the other outstanding bug, that we can't show "wires with no connections" vs. "wires with all connections," as introduced in 1.16:
- Right-clicking an isolated redstone toggles it between a cross and a dot.
- A dot of redstone does not power surrounding blocks, and a cross does.
- Redstone which is connected to anything is not toggleable.
We could also handle fences more directly - we ignore their properties now, too.
Doing so would almost double the memory requirements for reading a world, however. We could try to be more clever, like Minecraft does, not storing data when a vertical chunk is just air, for example. But, that's a lot of work just to save memory (though potentially a lot). Worth thinking about, though. Using the same "slice" idea wouldn't be so horrible, but would be work.
Anyway, sounds good in the long-term, but it's a lot of coding effort, and definitely would be an 8.0 type of release. This, all to support an object, the Debug Stick, that Mojang itself doesn't support. I think I'll put this off until it's cold outside and there's nothing better to do.
Reported by Azagwen.
(Reminder to self: see "stairs world" and jump to the player location to see a house with such blocks.)