mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Remove unused regenerate method
This commit is contained in:
parent
4307e3a671
commit
3265a9e794
@ -184,7 +184,7 @@ public class BukkitWorld extends AbstractWorld {
|
||||
BukkitImplAdapter adapter = WorldEditPlugin.getInstance().getBukkitImplAdapter();
|
||||
try {
|
||||
if (adapter != null) {
|
||||
return adapter.regenerate(getWorld(), region, null, null, editSession);
|
||||
return adapter.regenerate(getWorld(), region, editSession);
|
||||
} else {
|
||||
throw new UnsupportedOperationException("Missing BukkitImplAdapater for this version.");
|
||||
}
|
||||
|
@ -240,11 +240,7 @@ public interface BukkitImplAdapter<T> extends IBukkitAdapter {
|
||||
* @return true on success, false on failure
|
||||
*/
|
||||
default boolean regenerate(org.bukkit.World world, Region region, EditSession session) {
|
||||
return regenerate(world, region, null, null, session);
|
||||
}
|
||||
|
||||
default boolean regenerate(org.bukkit.World world, Region region, @Nullable Long seed, @Nullable BiomeType biome, EditSession editSession) {
|
||||
return editSession.regenerate(region);
|
||||
return session.regenerate(region);
|
||||
}
|
||||
|
||||
default IChunkGet get(World world, int chunkX, int chunkZ) {
|
||||
|
@ -54,6 +54,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import net.minecraft.server.v1_14_R1.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.CraftChunk;
|
||||
import org.bukkit.craftbukkit.v1_14_R1.CraftWorld;
|
||||
@ -361,7 +362,7 @@ public final class FAWE_Spigot_v1_14_R4 extends CachedBukkitAdapter implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerate(org.bukkit.World world, Region region, @Nullable Long seed, @Nullable BiomeType biome, EditSession editSession) {
|
||||
public boolean regenerate(org.bukkit.World world, Region region, EditSession editSession) {
|
||||
WorldServer originalWorld = ((CraftWorld) world).getHandle();
|
||||
ChunkProviderServer provider = originalWorld.getChunkProvider();
|
||||
if (!(provider instanceof ChunkProviderServer)) {
|
||||
@ -379,26 +380,16 @@ public final class FAWE_Spigot_v1_14_R4 extends CachedBukkitAdapter implements I
|
||||
WorldData newWorldData = new WorldData(originalWorld.worldData.a((NBTTagCompound) null),
|
||||
server.dataConverterManager, getDataVersion(), null);
|
||||
|
||||
ChunkGenerator generator = world.getGenerator();
|
||||
org.bukkit.World.Environment environment = world.getEnvironment();
|
||||
if (seed != null) {
|
||||
if (biome == BiomeTypes.NETHER) {
|
||||
environment = org.bukkit.World.Environment.NETHER;
|
||||
} else if (biome == BiomeTypes.THE_END) {
|
||||
environment = org.bukkit.World.Environment.THE_END;
|
||||
} else {
|
||||
environment = org.bukkit.World.Environment.NORMAL;
|
||||
}
|
||||
generator = null;
|
||||
}
|
||||
ChunkGenerator gen = world.getGenerator();
|
||||
Environment env = world.getEnvironment();
|
||||
try (WorldServer freshWorld = new WorldServer(server,
|
||||
server.executorService, saveHandler,
|
||||
newWorldData,
|
||||
originalWorld.worldProvider.getDimensionManager(),
|
||||
originalWorld.getMethodProfiler(),
|
||||
server.worldLoadListenerFactory.create(11),
|
||||
environment,
|
||||
generator){
|
||||
env,
|
||||
gen){
|
||||
@Override
|
||||
public boolean addEntityChunk(net.minecraft.server.v1_14_R1.Entity entity) {
|
||||
//Fixes #320; Prevent adding entities so we aren't attempting to spawn them asynchronously
|
||||
|
@ -56,6 +56,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import net.minecraft.server.v1_15_R1.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.CraftChunk;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
||||
@ -368,7 +369,7 @@ public final class FAWE_Spigot_v1_15_R1 extends CachedBukkitAdapter implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerate(org.bukkit.World world, Region region, @Nullable Long seed, @Nullable BiomeType biome, EditSession editSession) {
|
||||
public boolean regenerate(org.bukkit.World world, Region region, EditSession editSession) {
|
||||
WorldServer originalWorld = ((CraftWorld) world).getHandle();
|
||||
ChunkProviderServer provider = originalWorld.getChunkProvider();
|
||||
if (!(provider instanceof ChunkProviderServer)) {
|
||||
@ -387,26 +388,16 @@ public final class FAWE_Spigot_v1_15_R1 extends CachedBukkitAdapter implements I
|
||||
server.dataConverterManager, getDataVersion(), null);
|
||||
newWorldData.setName(UUID.randomUUID().toString());
|
||||
|
||||
ChunkGenerator generator = world.getGenerator();
|
||||
org.bukkit.World.Environment environment = world.getEnvironment();
|
||||
if (seed != null) {
|
||||
if (biome == BiomeTypes.NETHER) {
|
||||
environment = org.bukkit.World.Environment.NETHER;
|
||||
} else if (biome == BiomeTypes.THE_END) {
|
||||
environment = org.bukkit.World.Environment.THE_END;
|
||||
} else {
|
||||
environment = org.bukkit.World.Environment.NORMAL;
|
||||
}
|
||||
generator = null;
|
||||
}
|
||||
ChunkGenerator gen = world.getGenerator();
|
||||
Environment env = world.getEnvironment();
|
||||
try (WorldServer freshWorld = new WorldServer(server,
|
||||
server.executorService, saveHandler,
|
||||
newWorldData,
|
||||
originalWorld.worldProvider.getDimensionManager(),
|
||||
originalWorld.getMethodProfiler(),
|
||||
server.worldLoadListenerFactory.create(11),
|
||||
environment,
|
||||
generator){
|
||||
env,
|
||||
gen){
|
||||
@Override
|
||||
public boolean addEntityChunk(net.minecraft.server.v1_15_R1.Entity entity) {
|
||||
//Fixes #320; Prevent adding entities so we aren't attempting to spawn them asynchronously
|
||||
|
@ -56,6 +56,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import net.minecraft.server.v1_15_R1.*;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World.Environment;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.CraftChunk;
|
||||
import org.bukkit.craftbukkit.v1_15_R1.CraftWorld;
|
||||
@ -370,7 +371,7 @@ public final class FAWE_Spigot_v1_15_R2 extends CachedBukkitAdapter implements I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean regenerate(org.bukkit.World world, Region region, @Nullable Long seed, @Nullable BiomeType biome, EditSession editSession) {
|
||||
public boolean regenerate(org.bukkit.World world, Region region, EditSession editSession) {
|
||||
WorldServer originalWorld = ((CraftWorld) world).getHandle();
|
||||
ChunkProviderServer provider = originalWorld.getChunkProvider();
|
||||
if (!(provider instanceof ChunkProviderServer)) {
|
||||
@ -389,26 +390,16 @@ public final class FAWE_Spigot_v1_15_R2 extends CachedBukkitAdapter implements I
|
||||
server.dataConverterManager, getDataVersion(), null);
|
||||
newWorldData.setName(UUID.randomUUID().toString());
|
||||
|
||||
ChunkGenerator generator = world.getGenerator();
|
||||
org.bukkit.World.Environment environment = world.getEnvironment();
|
||||
if (seed != null) {
|
||||
if (biome == BiomeTypes.NETHER) {
|
||||
environment = org.bukkit.World.Environment.NETHER;
|
||||
} else if (biome == BiomeTypes.THE_END) {
|
||||
environment = org.bukkit.World.Environment.THE_END;
|
||||
} else {
|
||||
environment = org.bukkit.World.Environment.NORMAL;
|
||||
}
|
||||
generator = null;
|
||||
}
|
||||
ChunkGenerator gen = world.getGenerator();
|
||||
Environment env = world.getEnvironment();
|
||||
try (WorldServer freshWorld = new WorldServer(server,
|
||||
server.executorService, saveHandler,
|
||||
newWorldData,
|
||||
originalWorld.worldProvider.getDimensionManager(),
|
||||
originalWorld.getMethodProfiler(),
|
||||
server.worldLoadListenerFactory.create(11),
|
||||
environment,
|
||||
generator){
|
||||
env,
|
||||
gen){
|
||||
@Override
|
||||
public boolean addEntityChunk(net.minecraft.server.v1_15_R1.Entity entity) {
|
||||
//Fixes #320; Prevent adding entities so we aren't attempting to spawn them asynchronously
|
||||
|
Loading…
Reference in New Issue
Block a user