diff --git a/common/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionTintSource.java b/common/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionTintSource.java index 980e665..1cc0a04 100644 --- a/common/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionTintSource.java +++ b/common/src/main/java/eu/midnightdust/visualoverhaul/mixin/MixinPotionTintSource.java @@ -10,6 +10,7 @@ import net.minecraft.item.ItemStack; import net.minecraft.potion.Potion; import net.minecraft.potion.Potions; import net.minecraft.registry.entry.RegistryEntry; +import net.minecraft.util.math.ColorHelper; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Unique; import org.spongepowered.asm.mixin.injection.At; @@ -31,7 +32,8 @@ public class MixinPotionTintSource { if (!WATER_POTIONS.contains(contents.potion().get())) return; // Skip all potions with effects } - cir.setReturnValue(VisualOverhaulClient.potionColor); + if (cir.getReturnValue() == -1) cir.setReturnValue(ColorHelper.fullAlpha(VisualOverhaulClient.potionColor)); + else cir.setReturnValue(VisualOverhaulClient.potionColor); } } } diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/axolotl_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/axolotl_bucket.json new file mode 100644 index 0000000..da0fb46 --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/axolotl_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/axolotl_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/cod_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/cod_bucket.json new file mode 100644 index 0000000..4ed7a6f --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/cod_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/cod_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/pufferfish_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/pufferfish_bucket.json new file mode 100644 index 0000000..44134e2 --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/pufferfish_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/pufferfish_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/salmon_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/salmon_bucket.json new file mode 100644 index 0000000..304fb53 --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/salmon_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/salmon_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/tropical_fish_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/tropical_fish_bucket.json new file mode 100644 index 0000000..424dda4 --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/tropical_fish_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/tropical_fish_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file diff --git a/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/water_bucket.json b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/water_bucket.json new file mode 100644 index 0000000..dc0e26b --- /dev/null +++ b/common/src/main/resources/resourcepacks/coloredwaterbucket/assets/minecraft/items/water_bucket.json @@ -0,0 +1,16 @@ +{ + "model": { + "type": "minecraft:model", + "model": "minecraft:item/water_bucket", + "tints": [ + { + "type": "minecraft:constant", + "value": -1 + }, + { + "type": "minecraft:potion", + "default": -1 + } + ] + } +} \ No newline at end of file