feat: get colored water buckets working again

This commit is contained in:
Martin Prokoph
2025-01-26 18:18:10 +01:00
parent 132d05a1d2
commit 18d1f5af76
7 changed files with 99 additions and 1 deletions

View File

@@ -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);
}
}
}

View File

@@ -0,0 +1,16 @@
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/axolotl_bucket",
"tints": [
{
"type": "minecraft:constant",
"value": -1
},
{
"type": "minecraft:potion",
"default": -1
}
]
}
}

View File

@@ -0,0 +1,16 @@
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/cod_bucket",
"tints": [
{
"type": "minecraft:constant",
"value": -1
},
{
"type": "minecraft:potion",
"default": -1
}
]
}
}

View File

@@ -0,0 +1,16 @@
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/pufferfish_bucket",
"tints": [
{
"type": "minecraft:constant",
"value": -1
},
{
"type": "minecraft:potion",
"default": -1
}
]
}
}

View File

@@ -0,0 +1,16 @@
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/salmon_bucket",
"tints": [
{
"type": "minecraft:constant",
"value": -1
},
{
"type": "minecraft:potion",
"default": -1
}
]
}
}

View File

@@ -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
}
]
}
}

View File

@@ -0,0 +1,16 @@
{
"model": {
"type": "minecraft:model",
"model": "minecraft:item/water_bucket",
"tints": [
{
"type": "minecraft:constant",
"value": -1
},
{
"type": "minecraft:potion",
"default": -1
}
]
}
}