mirror of
https://github.com/Minestom/Minestom.git
synced 2025-03-02 11:21:15 +01:00
Fix block placement collision on chunk border
This commit is contained in:
parent
d5da334c25
commit
7d8ce32ba9
@ -104,8 +104,8 @@ public class BlockPlacementListener {
|
|||||||
final Block block = useMaterial.getBlock();
|
final Block block = useMaterial.getBlock();
|
||||||
final Set<Entity> entities = instance.getChunkEntities(chunk);
|
final Set<Entity> entities = instance.getChunkEntities(chunk);
|
||||||
// Check if the player is trying to place a block in an entity
|
// Check if the player is trying to place a block in an entity
|
||||||
boolean intersect = false;
|
boolean intersect = player.getBoundingBox().intersect(blockPosition);
|
||||||
if (block.isSolid()) {
|
if (!intersect && block.isSolid()) {
|
||||||
for (Entity entity : entities) {
|
for (Entity entity : entities) {
|
||||||
intersect = entity.getBoundingBox().intersect(blockPosition);
|
intersect = entity.getBoundingBox().intersect(blockPosition);
|
||||||
if (intersect)
|
if (intersect)
|
||||||
|
Loading…
Reference in New Issue
Block a user