Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // HoneyFluidAttributes.java
- @Override
- public int getColor(BlockAndTintGetter world, BlockPos pos) {
- return getColor();
- }
- @Override
- public int getColor(FluidStack stack){
- return getColor();
- }
- @Override
- public int getColor(){
- return honeyData.getColor().getValue() | 0xff000000;
- }
- // Color.java
- public Color(int value) {
- this.a = (value >> 24) & 0xFF;
- this.r = (value >> 16) & 0xFF;
- this.g = (value >> 8) & 0xFF;
- this.b = value & 0xFF;
- this.value = value;
- updateFloats();
- }
- public static Color parse(String color) {
- if (colorsWithNames.containsKey(color.toLowerCase()))
- return colorsWithNames.get(color.toLowerCase());
- return new Color(parseColor(color));
- }
- public static int parseColor(String color){
- Objects.requireNonNull(color);
- if (color.startsWith("0x") || color.startsWith("#"))
- return Long.decode(color).intValue();
- else if (colorsWithNames.containsKey(color.toLowerCase()))
- return colorsWithNames.get(color.toLowerCase()).getValue();
- return 0;
- }
- public int getValue() { return value; }
- // Sweet.json
- {
- "hunger": 3,
- "saturation": 0.25,
- "color": "#D4FFC9",
- "honeyEffects": [
- {
- "effect": "minecraft:glowing",
- "duration": 2400,
- "strength": 0,
- "chance": 1
- }
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement