Fluid#isSame is asymmetric

- Fixes #2490
This commit is contained in:
Jozufozu 2021-12-20 21:51:21 -08:00
parent bcfd0aed88
commit 848eb904f5

View file

@ -257,13 +257,13 @@ public class ClientEvents {
Fluid fluid = fluidstate.getType();
if (fluid.isSame(AllFluids.CHOCOLATE.get())) {
if (AllFluids.CHOCOLATE.get().isSame(fluid)) {
event.setDensity(5f);
event.setCanceled(true);
return;
}
if (fluid.isSame(AllFluids.HONEY.get())) {
if (AllFluids.HONEY.get().isSame(fluid)) {
event.setDensity(1.5f);
event.setCanceled(true);
return;
@ -288,13 +288,13 @@ public class ClientEvents {
Fluid fluid = fluidstate.getType();
if (fluid.isSame(AllFluids.CHOCOLATE.get())) {
if (AllFluids.CHOCOLATE.get().isSame(fluid)) {
event.setRed(98 / 256f);
event.setGreen(32 / 256f);
event.setBlue(32 / 256f);
}
if (fluid.isSame(AllFluids.HONEY.get())) {
if (AllFluids.HONEY.get().isSame(fluid)) {
event.setRed(234 / 256f);
event.setGreen(174 / 256f);
event.setBlue(47 / 256f);