Merge pull request #39 from Giraffe1966/particle-fix

Fix claiming in the End dimension. fix #46, #40
This commit is contained in:
Flemmli97 2021-04-04 12:11:17 +02:00 committed by GitHub
commit e5e1fc921a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,6 +11,7 @@ import net.minecraft.particle.DustParticleEffect;
import net.minecraft.server.network.ServerPlayerEntity; import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ServerWorld; import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -141,7 +142,7 @@ public class ClaimDisplay {
if (state.getMaterial().isReplaceable()) { if (state.getMaterial().isReplaceable()) {
pos = pos.down(); pos = pos.down();
state = world.getBlockState(pos); state = world.getBlockState(pos);
while (state.getMaterial().isReplaceable()) { while (state.getMaterial().isReplaceable() && !World.isHeightInvalid(pos)) {
pos = pos.down(); pos = pos.down();
state = world.getBlockState(pos); state = world.getBlockState(pos);
} }