Skip to content

Commit

Permalink
Merge branch 'server-renderer' into 1.20.4
Browse files Browse the repository at this point in the history
  • Loading branch information
MATRIX-feather committed Feb 2, 2024
2 parents a06150a + 3e64dfd commit 88a3e83
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class CatValues extends TameableAnimalValues
public final SingleValue<CatVariant> CAT_VARIANT = getSingle("cat_variant", BuiltInRegistries.CAT_VARIANT.getOrThrow(CatVariant.TABBY));
public final SingleValue<Boolean> IS_LYING = getSingle("cat_is_lying", false);
public final SingleValue<Boolean> RELAXED = getSingle("cat_relaxed", false);
public final SingleValue<Integer> COLLAR_COLOR = getSingle("cat_collar_color", 14);
public final SingleValue<Byte> COLLAR_COLOR = getSingle("cat_collar_color", (byte)14);

public CatValues()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
public class WolfValues extends TameableAnimalValues
{
public final SingleValue<Boolean> BEGGING = getSingle("wolf_begging", false);
public final SingleValue<Integer> COLLAR_COLOR = getSingle("wolf_collar_color", 14);
public final SingleValue<Byte> COLLAR_COLOR = getSingle("wolf_collar_color", (byte)14);
public final SingleValue<Integer> ANGER_TIME = getSingle("wolf_anger_time", 0);

public WolfValues()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public void mergeFromCompound(CompoundTag nbt)
}

if (nbt.contains("CollarColor"))
write(ValueIndex.CAT.COLLAR_COLOR, (int)nbt.getByte("CollarColor"));
write(ValueIndex.CAT.COLLAR_COLOR, nbt.getByte("CollarColor"));
}

@Override
Expand All @@ -87,6 +87,6 @@ public void writeToCompound(CompoundTag nbt)
nbt.putString("variant", variant);

var collarColor = get(ValueIndex.CAT.COLLAR_COLOR);
nbt.putInt("CollarColor", collarColor);
nbt.putByte("CollarColor", collarColor);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@ public void mergeFromCompound(CompoundTag nbt)
super.mergeFromCompound(nbt);

if (nbt.contains("CollarColor"))
write(ValueIndex.WOLF.COLLAR_COLOR, (int)nbt.getByte("CollarColor"));
write(ValueIndex.WOLF.COLLAR_COLOR, nbt.getByte("CollarColor"));
}

@Override
public void writeToCompound(CompoundTag nbt)
{
super.writeToCompound(nbt);

nbt.putByte("CollarColor", get(ValueIndex.WOLF.COLLAR_COLOR).byteValue());
nbt.putByte("CollarColor", get(ValueIndex.WOLF.COLLAR_COLOR));
}
}

0 comments on commit 88a3e83

Please sign in to comment.