Add back the getEntity Stuff since it seems to work fine

This commit is contained in:
Aurora 2020-07-01 19:28:38 +02:00
parent 8b3479d477
commit 34298f7dee
No known key found for this signature in database
GPG Key ID: 89839F67B53656AD
4 changed files with 14 additions and 3 deletions

View File

@ -89,7 +89,7 @@ public class BukkitEntity implements Entity {
@Override
public com.sk89q.worldedit.world.entity.EntityType getType() {
return EntityTypes.get(type.getName().toUpperCase(Locale.ROOT));
return EntityTypes.get(type.getName().toLowerCase(Locale.ROOT));
}
@Override

View File

@ -63,4 +63,8 @@ public class WorldCopyClipboard extends ReadOnlyClipboard {
return hasBiomes;
}
@Override
public List<? extends Entity> getEntities(Region region) {
return getExtent().getEntities(region);
}
}

View File

@ -46,6 +46,7 @@ import com.boydti.fawe.util.ExtentTraverser;
import com.boydti.fawe.util.MaskTraverser;
import com.boydti.fawe.util.MathMan;
import com.boydti.fawe.util.TaskManager;
import com.sk89q.worldedit.entity.Entity;
import com.sk89q.worldedit.entity.Player;
import com.sk89q.worldedit.event.extent.EditSessionEvent;
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
@ -3054,4 +3055,9 @@ public class EditSession extends PassthroughExtent implements AutoCloseable {
}
return false;
}
@Override
public List<? extends Entity> getEntities(Region region) {
return world.getEntities(region);
}
}

View File

@ -406,6 +406,7 @@ public class ForwardExtentCopy implements Operation {
});
EntityVisitor entityVisitor = new EntityVisitor(entities.iterator(), entityCopy);
Operations.completeBlindly(entityVisitor);
affectedEntities += entityVisitor.getAffected();
}
if (transExt != null) {
@ -427,8 +428,8 @@ public class ForwardExtentCopy implements Operation {
return ImmutableList.of(
TranslatableComponent.of("worldedit.operation.affected.block",
TextComponent.of(affectedBlocks)).color(TextColor.LIGHT_PURPLE),
TranslatableComponent.of("worldedit.operation.affected.biome",
TextComponent.of(affectedBiomeCols)).color(TextColor.LIGHT_PURPLE),
// TranslatableComponent.of("worldedit.operation.affected.biome",
// TextComponent.of(affectedBiomeCols)).color(TextColor.LIGHT_PURPLE),
TranslatableComponent.of("worldedit.operation.affected.entity",
TextComponent.of(affectedEntities)).color(TextColor.LIGHT_PURPLE)
);