mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
SPIGOT-5496: API to create and manipulate hardcore worlds
This commit is contained in:
parent
9820cd2db0
commit
e7202cd444
@ -910,7 +910,7 @@ public final class CraftServer implements Server {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while(used);
|
} while(used);
|
||||||
boolean hardcore = false;
|
boolean hardcore = creator.hardcore();
|
||||||
|
|
||||||
WorldNBTStorage sdm = new WorldNBTStorage(getWorldContainer(), name, getServer(), getHandle().getServer().dataConverterManager);
|
WorldNBTStorage sdm = new WorldNBTStorage(getWorldContainer(), name, getServer(), getHandle().getServer().dataConverterManager);
|
||||||
WorldData worlddata = sdm.getWorldData();
|
WorldData worlddata = sdm.getWorldData();
|
||||||
|
@ -88,7 +88,6 @@ import net.minecraft.server.Ticket;
|
|||||||
import net.minecraft.server.TicketType;
|
import net.minecraft.server.TicketType;
|
||||||
import net.minecraft.server.Unit;
|
import net.minecraft.server.Unit;
|
||||||
import net.minecraft.server.Vec3D;
|
import net.minecraft.server.Vec3D;
|
||||||
import net.minecraft.server.WorldGenFeatureEmptyConfiguration;
|
|
||||||
import net.minecraft.server.WorldGenerator;
|
import net.minecraft.server.WorldGenerator;
|
||||||
import net.minecraft.server.WorldServer;
|
import net.minecraft.server.WorldServer;
|
||||||
import org.apache.commons.lang.Validate;
|
import org.apache.commons.lang.Validate;
|
||||||
@ -1880,6 +1879,16 @@ public class CraftWorld implements World {
|
|||||||
return world.getWorldData().shouldGenerateMapFeatures();
|
return world.getWorldData().shouldGenerateMapFeatures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isHardcore() {
|
||||||
|
return world.getWorldData().isHardcore();
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setHardcore(boolean hardcore) {
|
||||||
|
world.getWorldData().g(hardcore);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public long getTicksPerAnimalSpawns() {
|
public long getTicksPerAnimalSpawns() {
|
||||||
return world.ticksPerAnimalSpawns;
|
return world.ticksPerAnimalSpawns;
|
||||||
|
Loading…
Reference in New Issue
Block a user