Comments (16)
If I remember correctly, the first 8 bits represents block type, and the last 8 bits block data.
For block sides, a bit mask is used which filters out all bits except for the block side.
You can find an example of this in doorrenderer.cpp
from crafti.
That makes sense, but which bits are for the block side?
(I decided to try to make cake edible, everything but block data seems to work)
from crafti.
I'm also guessing that the gap between special IDs 135-146 are for binary purposes? (wait nevermind, still no idea why it has that)
from crafti.
That makes sense, but which bits are for the block side? (I decided to try to make cake edible, everything but block data seems to work)
The first 3 bits are used. But you should probably be using BLOCK_SIDE_BITS. Look in doorrenderer.cpp for an example
from crafti.
I'm also guessing that the gap between special IDs 135-146 are for binary purposes? (wait nevermind, still no idea why it has that)
This, I have no idea why. For some reason the first 127 tupes are reserved for plain blocks and there other half is reserved for special block types
from crafti.
That makes sense, but which bits are for the block side? (I decided to try to make cake edible, everything but block data seems to work)
The first 3 bits are used. But you should probably be using BLOCK_SIDE_BITS. Look in doorrenderer.cpp for an example
Yeah, I just wanted to make sure I wasn't overwriting anything important
Also, I'm working on full docs of the code in my repo's wiki
from crafti.
Also, I'm working on full docs of the code in my repo's wiki
Oh, that's nice! That would actually be pretty helpful.
from crafti.
When you say first 3 bits, you mean right-to-left right?
So like:
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
Because I thought that was reserved for block type
from crafti.
Also, I'm working on full docs of the code in my repo's wiki
Oh, that's nice! That would actually be pretty helpful.
https://github.com/Bluebotlaboratories/crafti/wiki
Feel free to help if you really want to try
(So much code and I'm not that good at C++ overall)
from crafti.
When you say first 3 bits, you mean right-to-left right?
So like: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
Because I thought that was reserved for block type
I meant of the block data. I have no idea of its from the left or the right (I will research this later) but it definitely starts after 8 bits. Something like
0000 0000 1110 0000
Or
0000 0000 0000 0111
from crafti.
Should we continue this discussion on my repo?
from crafti.
Should we continue this discussion on my repo?
Probably. Also, maybe you could enable the discussions tab and continue it there?
from crafti.
yep
done
(under the Q&A section)
from crafti.
@m-doescode Forget that, moved it to general
from crafti.
Every block is stored as 16 bits (BLOCK_WDATA
), the lower 8 bits are the block number and the higher 8 bits the data, which is specific to each block.
In previous releases, the high bit of the data of every block (independent of the type) determined whether the block was redstone powered, but after the redstone rewrite that is no longer the case. For compatibility with existing maps, this bit is currently ignored for non-redstone blocks.
from crafti.
Ok, thanks!
from crafti.
Related Issues (20)
- Won't open on TI-Nspire CX II CAS Handheld or Student Software HOT 1
- Redstone wire uses cobweb texture HOT 4
- Bug found HOT 8
- Suggestion: more redstone blocks, fly HOT 1
- Compile to take advantage of the new 396 megahertz processor. HOT 10
- Redstone lamp bug HOT 1
- Scrollable inventory HOT 3
- Questions regarding source and float alternative HOT 8
- Incorrect backface culling on custom models HOT 13
- Lever/Switch, texture questions HOT 2
- I accidentally opened this issue, view the real one: https://github.com/Vogtinator/crafti/issues/24 HOT 1
- "TI-Nspire CX II, TI- Nspire CX CAS II" has "64 MB of RAM, 100 MB of Flash ROM" and "ARM9 @ 396 MHz CPU" Please make an upgraded version that makes use of this extra power! HOT 3
- Transforming terrain.png into c byte array HOT 1
- Doors, switches and other HOT 2
- TI-Nspire: Document format not supported HOT 1
- New Tech, upgrade graphics?? HOT 1
- Can't turn my head. Is that normal? HOT 16
- Calculator crashes after opening crafti for a second time HOT 5
- Cannot transfer not ".tns" files to Calculator HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crafti.