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) {
super(properties);
this.stillTexture = stillTexture;
this.flowingTexture = flowingTexture;
}
@Override
public void initializeClient(Consumer<IClientFluidTypeExtensions> consumer) {
consumer.accept(new IClientFluidTypeExtensions() {
@Override
public ResourceLocation getFlowingTexture() {
return flowingTexture;
}
@Override
public ResourceLocation getStillTexture() {
return stillTexture;
}
@Override
public ResourceLocation getFlowingTexture() {
return flowingTexture;
}
@Override
public int getTintColor(FluidStack stack) {
return getTintColor(stack);
return TintedFluidType.this.getTintColor(stack);
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter getter, BlockPos pos) {
return getTintColor(state, getter, pos);
return TintedFluidType.this.getTintColor(state, getter, pos);
}
});
@ -137,16 +139,16 @@ public class AllFluids {
super(properties, stillTexture, flowingTexture);
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter world, BlockPos pos) {
return 0x00ffffff;
}
@Override
protected int getTintColor(FluidStack stack) {
return NO_TINT;
}
@Override
public int getTintColor(FluidState state, BlockAndTintGetter world, BlockPos pos) {
return 0x00ffffff;
}
}
}