Chocolate Can Cause Crashes

- Fix crash when rendering Create fluids
- Fix Create fluids not having a texture
This commit is contained in:
PepperCode1 2022-08-07 12:21:41 -07:00
parent 5e3f1eff1c
commit 164dd62a29

View File

@ -91,30 +91,32 @@ public class AllFluids {
public TintedFluidType(Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture) { public TintedFluidType(Properties properties, ResourceLocation stillTexture, ResourceLocation flowingTexture) {
super(properties); super(properties);
this.stillTexture = stillTexture;
this.flowingTexture = flowingTexture;
} }
@Override @Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) { public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() { consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getFlowingTexture() {
return flowingTexture;
}
@Override @Override
public ResourceLocation getStillTexture() { public ResourceLocation getStillTexture() {
return stillTexture; return stillTexture;
} }
@Override
public ResourceLocation getFlowingTexture() {
return flowingTexture;
}
@Override @Override
public int getTintColor(FluidStack stack) { public int getTintColor(FluidStack stack) {
return getTintColor(stack); return TintedFluidType.this.getTintColor(stack);
} }
@Override @Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) { public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return getTintColor(state, getter, pos); return TintedFluidType.this.getTintColor(state, getter, pos);
} }
}); });
@ -138,13 +140,13 @@ public class AllFluids {
} }
@Override @Override
public int getTintColor(FluidState state, BlockAndTintGetter world, BlockPos pos) { protected int getTintColor(FluidStack stack) {
return 0x00ffffff; return NO_TINT;
} }
@Override @Override
protected int getTintColor(FluidStack stack) { public int getTintColor(FluidState state, BlockAndTintGetter world, BlockPos pos) {
return NO_TINT; return 0x00ffffff;
} }
} }