fix some compile issues
This commit is contained in:
@@ -20,18 +20,22 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
|
||||
+ // Paper start - Get flow speed. Throttle if its water and flowing adjacent to lava
|
||||
+ public int getFlowSpeed(Level world, BlockPos blockposition) {
|
||||
+ if (this.material == net.minecraft.world.level.material.Material.WATER) {
|
||||
+ if (net.minecraft.core.registries.BuiltInRegistries.FLUID.wrapAsHolder(this.fluid).is(FluidTags.WATER)) {
|
||||
+ if (
|
||||
+ world.getMaterialIfLoaded(blockposition.north(1)) == net.minecraft.world.level.material.Material.LAVA ||
|
||||
+ world.getMaterialIfLoaded(blockposition.south(1)) == net.minecraft.world.level.material.Material.LAVA ||
|
||||
+ world.getMaterialIfLoaded(blockposition.west(1)) == net.minecraft.world.level.material.Material.LAVA ||
|
||||
+ world.getMaterialIfLoaded(blockposition.east(1)) == net.minecraft.world.level.material.Material.LAVA
|
||||
+ isLava(world, blockposition.north(1)) ||
|
||||
+ isLava(world, blockposition.south(1)) ||
|
||||
+ isLava(world, blockposition.west(1)) ||
|
||||
+ isLava(world, blockposition.east(1))
|
||||
+ ) {
|
||||
+ return world.paperConfig().environment.waterOverLavaFlowSpeed;
|
||||
+ }
|
||||
+ }
|
||||
+ return this.fluid.getTickDelay(world);
|
||||
+ }
|
||||
+ private static boolean isLava(Level world, BlockPos blockPos) {
|
||||
+ final FluidState fluidState = world.getFluidIfLoaded(blockPos);
|
||||
+ return fluidState != null && fluidState.is(FluidTags.LAVA);
|
||||
+ }
|
||||
+ // Paper end
|
||||
+
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user