Only copy entities from within the region

This commit is contained in:
Cygaan 2019-01-28 17:36:39 +01:00
parent d48ea909b5
commit 6046fa1cec

View File

@ -353,7 +353,8 @@ public class ForwardExtentCopy implements Operation {
entities = source.getEntities() entities = source.getEntities()
.stream() .stream()
.filter(entity -> entity.getState() != null && .filter(entity -> entity.getState() != null &&
!entity.getState().getType().getId().equals("minecraft:player")) !entity.getState().getType().getId().equals("minecraft:player") &&
region.contains(entity.getLocation().toVector()))
.collect(Collectors.toList()); .collect(Collectors.toList());
} else { } else {
entities = new ArrayList<>(); entities = new ArrayList<>();