23w14a
This commit is contained in:
1 parent
9a5c2d5fc3
commit
1751f103f9
8 files changed
+27
-61
No files matched your search
@@ -241,7 +241,7 @@ public class OptimizedExplosion
|
||||
BlockState state = world.getBlockState(blockpos);
|
||||
Block block = state.getBlock();
|
||||
|
||||
if (state.getMaterial() != Material.AIR)
|
||||
if (!state.isAir())
|
||||
{
|
||||
if (block.dropFromExplosion(e) && world instanceof ServerLevel serverLevel)
|
||||
{
|
||||
@@ -281,7 +281,7 @@ public class OptimizedExplosion
|
||||
|
||||
BlockPos down = blockpos1.below(1);
|
||||
if (eAccess.getRandom().nextInt(3) == 0 &&
|
||||
chunk.getBlockState(blockpos1).getMaterial() == Material.AIR &&
|
||||
chunk.getBlockState(blockpos1).isAir() &&
|
||||
chunk.getBlockState(down).isSolidRender(world, down)
|
||||
)
|
||||
{
|
||||
@@ -346,7 +346,7 @@ public class OptimizedExplosion
|
||||
BlockState state = eAccess.getLevel().getBlockState(blockpos);
|
||||
FluidState fluidState = eAccess.getLevel().getFluidState(blockpos);
|
||||
|
||||
if (state.getMaterial() != Material.AIR) {
|
||||
if (!state.isAir()) {
|
||||
float f2 = Math.max(state.getBlock().getExplosionResistance(), fluidState.getExplosionResistance());
|
||||
if (eAccess.getSource() != null)
|
||||
f2 = eAccess.getSource().getBlockExplosionResistance(e, eAccess.getLevel(), blockpos, state, fluidState, f2);
|
||||
@@ -475,7 +475,7 @@ public class OptimizedExplosion
|
||||
fluidCache.put(posImmutable, fluid);
|
||||
}
|
||||
|
||||
if (state.getMaterial() != Material.AIR)
|
||||
if (!state.isAir())
|
||||
{
|
||||
float resistance = Math.max(state.getBlock().getExplosionResistance(), fluid.getExplosionResistance());
|
||||
|
||||
@@ -538,7 +538,7 @@ public class OptimizedExplosion
|
||||
BlockState state = eAccess.getLevel().getBlockState(blockpos);
|
||||
FluidState fluidState = eAccess.getLevel().getFluidState(blockpos);
|
||||
|
||||
if (state.getMaterial() != Material.AIR) {
|
||||
if (!state.isAir()) {
|
||||
float f2 = Math.max(state.getBlock().getExplosionResistance(), fluidState.getExplosionResistance());
|
||||
if (eAccess.getSource() != null)
|
||||
f2 = eAccess.getSource().getBlockExplosionResistance(e, eAccess.getLevel(), blockpos, state, fluidState, f2);
|
||||
|
||||
Reference in new issue
Block a user