Comments (2)
Hi
Hmm yeah it looks like you're right. Both of those should be
int fullnessBits = (metadata >> 2);
or more robustly (i.e. in case metadata is > 0x0f, for some reason) either
int fullnessBits = (metadata >> 2) & 0x03;
or
int fullnessBits = (metadata & 0x0c) >> 2;
Thanks for that, I'll update them next time I'm working on the mod.
Cheers
TGG
from minecraftbyexample.
Hi again
I just looked at the code and I remembered that I'm using 5 bits in total, not 4, i.e. fullness can be 0, 1, 2, 3, or 4. The metadata for items is allowed to be more than 4 bits, unlike blocks.
Cheers
TGG
from minecraftbyexample.
Related Issues (20)
- Recipe JSON files are in the wrong spot for at least 1.15.2 HOT 2
- Tutorial 01-1.12.2. Not picking lang name HOT 2
- 1.12.2 mbe05 not working HOT 6
- Much of the example code is all commented out HOT 1
- Multiple Redstone inputs from sides too HOT 1
- [Question]Will you add Biomes and Dimensions HOT 4
- [Error] Unexpected error 1.16.4 HOT 4
- Mob creation and spawing? Can you point me in the right direction? HOT 1
- Architectury examples HOT 1
- DistExecuter -> safeRunWhenOn HOT 2
- [Suggestion] Multiblock Structures HOT 1
- [1.15/1.16] Item Inventory example bugged HOT 3
- Simple processing machine example HOT 1
- [Suggestion] opening the GUI using key bindings HOT 1
- ContainerScreens do not open on dedicated server unless player has administration rights (OP) HOT 1
- RunServer is not working
- Incompatibilities with 1.16.5 HOT 1
- Manually keeping track of .obj entity models HOT 2
- Readme formating HOT 1
- Update for 1.18
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 minecraftbyexample.