Skip to content

Commit

Permalink
fix #3
Browse files Browse the repository at this point in the history
  • Loading branch information
plusls committed Jun 22, 2021
1 parent 79ceaf1 commit e9a2956
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import net.minecraft.util.Identifier;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.BlockRenderView;
import org.jetbrains.annotations.Nullable;

import java.util.function.Function;

Expand Down Expand Up @@ -63,10 +64,10 @@ public void reload(ResourceManager manager) {
defaultLavaSourceSpites[1] = defaultLavaSourceFlowSprite;
FluidRenderHandler lavaSourceRenderHandler = new FluidRenderHandler() {
@Override
public Sprite[] getFluidSprites(BlockRenderView extendedBlockView, BlockPos blockPos, FluidState fluidState) {
public Sprite[] getFluidSprites(@Nullable BlockRenderView view, @Nullable BlockPos pos, FluidState state) {

if (Configs.FeatureToggle.HIGHLIGHT_LAVA_SOURCE.getBooleanValue()) {
BlockState blockState = extendedBlockView.getBlockState(blockPos);
if (view != null && pos != null && Configs.FeatureToggle.HIGHLIGHT_LAVA_SOURCE.getBooleanValue()) {
BlockState blockState = view.getBlockState(pos);
if (blockState.contains(FluidBlock.LEVEL) && blockState.get(FluidBlock.LEVEL) == 0) {
return lavaSourceSpites;
}
Expand Down

0 comments on commit e9a2956

Please sign in to comment.