mirror of
https://github.com/Minestom/Minestom.git
synced 2025-01-23 16:41:35 +01:00
Marker Armor Stands no longer prevent block placement
This commit is contained in:
parent
eb4d29628e
commit
efbb2b6338
@ -6,6 +6,7 @@ import net.minestom.server.entity.Entity;
|
|||||||
import net.minestom.server.entity.EntityType;
|
import net.minestom.server.entity.EntityType;
|
||||||
import net.minestom.server.entity.GameMode;
|
import net.minestom.server.entity.GameMode;
|
||||||
import net.minestom.server.entity.Player;
|
import net.minestom.server.entity.Player;
|
||||||
|
import net.minestom.server.entity.metadata.other.ArmorStandMeta;
|
||||||
import net.minestom.server.event.EventDispatcher;
|
import net.minestom.server.event.EventDispatcher;
|
||||||
import net.minestom.server.event.player.PlayerBlockInteractEvent;
|
import net.minestom.server.event.player.PlayerBlockInteractEvent;
|
||||||
import net.minestom.server.event.player.PlayerBlockPlaceEvent;
|
import net.minestom.server.event.player.PlayerBlockPlaceEvent;
|
||||||
@ -132,6 +133,14 @@ public class BlockPlacementListener {
|
|||||||
entity.getEntityType() == EntityType.ITEM)
|
entity.getEntityType() == EntityType.ITEM)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
// Marker Armor Stands should not prevent block placement
|
||||||
|
if(entity.getEntityType() == EntityType.ARMOR_STAND) {
|
||||||
|
ArmorStandMeta armorStandMeta = (ArmorStandMeta) entity.getEntityMeta();
|
||||||
|
if(armorStandMeta.isMarker()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
intersect = entity.getBoundingBox().intersect(blockPosition);
|
intersect = entity.getBoundingBox().intersect(blockPosition);
|
||||||
if (intersect)
|
if (intersect)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user