geforkt von Mirrors/FastAsyncWorldEdit
Fixed regen
Dieser Commit ist enthalten in:
Ursprung
1844d4dba7
Commit
97a4d2e103
@ -192,7 +192,7 @@ public class BukkitWorld extends AbstractWorld {
|
|||||||
public boolean regenerate(Region region, EditSession editSession) {
|
public boolean regenerate(Region region, EditSession editSession) {
|
||||||
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
||||||
if (adapter != null) {
|
if (adapter != null) {
|
||||||
return adapter.regenerate(this, region, editSession);
|
return adapter.regenerate(getWorld(), region, editSession);
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
BaseBlock[] history = new BaseBlock[16 * 16 * (getMaxY() + 1)];
|
BaseBlock[] history = new BaseBlock[16 * 16 * (getMaxY() + 1)];
|
||||||
|
@ -235,7 +235,7 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
|||||||
throw new UnsupportedOperationException("Cannot send fake chunks");
|
throw new UnsupportedOperationException("Cannot send fake chunks");
|
||||||
}
|
}
|
||||||
|
|
||||||
default boolean regenerate(com.sk89q.worldedit.world.World world, Region region, EditSession editSession) {
|
default boolean regenerate(org.bukkit.World world, Region region, EditSession editSession) {
|
||||||
return editSession.regenerate(region);
|
return editSession.regenerate(region);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -378,7 +378,7 @@ public final class FAWE_Spigot_v1_14_R4 extends CachedBukkitAdapter implements I
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean regenerate(com.sk89q.worldedit.world.World world, Region region, EditSession editSession) {
|
public boolean regenerate(org.bukkit.World world, Region region, EditSession editSession) {
|
||||||
WorldServer originalWorld = ((CraftWorld) world).getHandle();
|
WorldServer originalWorld = ((CraftWorld) world).getHandle();
|
||||||
ChunkProviderServer provider = originalWorld.getChunkProvider();
|
ChunkProviderServer provider = originalWorld.getChunkProvider();
|
||||||
if (!(provider instanceof ChunkProviderServer)) {
|
if (!(provider instanceof ChunkProviderServer)) {
|
||||||
|
@ -223,7 +223,7 @@ public class WorldWrapper extends AbstractWorld {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean regenerate(Region region, EditSession session) {
|
public boolean regenerate(Region region, EditSession session) {
|
||||||
return session.regenerate(region);
|
return parent.regenerate(region, session);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -330,7 +330,7 @@ public class HistorySubCommands {
|
|||||||
RollbackOptimizedHistory edit = input.get();
|
RollbackOptimizedHistory edit = input.get();
|
||||||
UUID uuid = edit.getUUID();
|
UUID uuid = edit.getUUID();
|
||||||
int index = edit.getIndex();
|
int index = edit.getIndex();
|
||||||
if (!edit.getBDFile().exists()) {
|
if (!edit.isEmpty()) {
|
||||||
database.delete(uuid, index);
|
database.delete(uuid, index);
|
||||||
return TextComponent.empty();
|
return TextComponent.empty();
|
||||||
}
|
}
|
||||||
|
@ -656,13 +656,14 @@ public class RegionCommands {
|
|||||||
@CommandPermissions("worldedit.regen")
|
@CommandPermissions("worldedit.regen")
|
||||||
@Logging(REGION)
|
@Logging(REGION)
|
||||||
@Confirm(Confirm.Processor.REGION)
|
@Confirm(Confirm.Processor.REGION)
|
||||||
public void regenerateChunk(Actor actor, LocalSession session, EditSession editSession, @Selection Region region,
|
public void regenerateChunk(Actor actor, World world, LocalSession session, EditSession editSession, @Selection Region region,
|
||||||
@Arg(def = "", desc = "Regenerate with biome") BiomeType biome,
|
@Arg(def = "", desc = "Regenerate with biome") BiomeType biome,
|
||||||
@Arg(def = "", desc = "Regenerate with seed") Long seed) throws WorldEditException {
|
@Arg(def = "", desc = "Regenerate with seed") Long seed) throws WorldEditException {
|
||||||
Mask mask = session.getMask();
|
Mask mask = session.getMask();
|
||||||
session.setMask((Mask) null);
|
session.setMask((Mask) null);
|
||||||
session.setSourceMask((Mask) null);
|
session.setSourceMask((Mask) null);
|
||||||
editSession.regenerate(region, biome, seed);
|
world.regenerate(region, editSession);
|
||||||
|
// editSession.regenerate(region, biome, seed);
|
||||||
session.setMask(mask);
|
session.setMask(mask);
|
||||||
session.setSourceMask(mask);
|
session.setSourceMask(mask);
|
||||||
actor.printInfo(TranslatableComponent.of("worldedit.regen.regenerated"));
|
actor.printInfo(TranslatableComponent.of("worldedit.regen.regenerated"));
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren