universe cleanup
This commit is contained in:
parent
cf37d48292
commit
9b5eab4f57
68 changed files with 553 additions and 369 deletions
|
@ -1728,7 +1728,7 @@ public class Client implements IThreadListener {
|
|||
ChunkClient chunk = this.world.getChunk(blockpos);
|
||||
biome = chunk.getBiome(blockpos);
|
||||
bline = "Biom: " + biome.display + " (" + biome.name + "), D: " +
|
||||
TextColor.stripCodes(this.world.dimension.getNameString()) +
|
||||
TextColor.stripCodes(this.world.dimension.getDisplay()) +
|
||||
" (" + (this.dimensionName == null ? UniverseRegistry.getName(this.world.dimension) : this.dimensionName) + ")";
|
||||
lline = "Licht: " + chunk.getLightSub(blockpos, 0) + " (" + chunk.getLight(LightType.SKY, blockpos) + " Himmel, "
|
||||
+ chunk.getLight(LightType.BLOCK, blockpos) + " Blöcke, " + String.format(
|
||||
|
@ -1737,7 +1737,7 @@ public class Client implements IThreadListener {
|
|||
}
|
||||
else {
|
||||
bline = "Biom: <?>, D: " +
|
||||
TextColor.stripCodes(this.world.dimension.getNameString()) +
|
||||
TextColor.stripCodes(this.world.dimension.getDisplay()) +
|
||||
" (" + (this.dimensionName == null ? UniverseRegistry.getName(this.world.dimension) : this.dimensionName) + ")";
|
||||
lline = "Licht: " + String.format(
|
||||
"%.1f", this.world.getSunBrightness(1.0f) * 15.0f) + " Welt, A: "
|
||||
|
|
|
@ -454,7 +454,7 @@ public class GuiChar extends GuiList<GuiChar.SkinEntry>
|
|||
|
||||
private void setDimButton() {
|
||||
Dimension dim = DIMENSIONS.get(this.dimension);
|
||||
this.dimButton.setText((dim.getType() == DimType.PLANET ? "Heimplanet" : "Heimdimension") + ": " + dim.getNameString());
|
||||
this.dimButton.setText((dim.getType() == DimType.PLANET ? "Heimplanet" : "Heimdimension") + ": " + dim.getDisplay());
|
||||
this.descLines.setText(Util.buildLines(dim.getBaseNames()));
|
||||
}
|
||||
|
||||
|
|
|
@ -13,6 +13,7 @@ import client.gui.element.PressType;
|
|||
import client.renderer.Drawing;
|
||||
import common.color.TextColor;
|
||||
import common.entity.npc.PlayerCharacter;
|
||||
import common.init.UniverseRegistry;
|
||||
import common.packet.CPacketAction;
|
||||
import common.packet.CPacketAction.Action;
|
||||
import common.util.ExtMath;
|
||||
|
@ -76,7 +77,7 @@ public class GuiCharacters extends GuiList<GuiCharacters.CharacterEntry> impleme
|
|||
this.elements.clear();
|
||||
int selected = this.gm.selectedCharacter;
|
||||
for(PlayerCharacter character : this.gm.characterList) {
|
||||
this.elements.add(new CharacterEntry(selected == this.elements.size() ? new PlayerCharacter(character.name(), character.info(), character.align(), this.gm.player.worldObj.dimension.getNameString(), this.gm.player.getPosition(), character.type(), this.gm.player.experienceLevel) : character, selected == this.elements.size()));
|
||||
this.elements.add(new CharacterEntry(selected == this.elements.size() ? new PlayerCharacter(character.name(), character.info(), character.align(), this.gm.player.worldObj.dimension.getDisplay(), this.gm.player.getPosition(), character.type(), this.gm.player.experienceLevel, UniverseRegistry.getName(this.gm.player.getOrigin().getDimension())) : character, selected == this.elements.size()));
|
||||
}
|
||||
if(!this.gm.charEditor)
|
||||
this.elements.add(new CharacterEntry(null, false));
|
||||
|
|
|
@ -75,7 +75,7 @@ public class GuiCreateDimension extends Gui {
|
|||
}
|
||||
dtag.merge(ptag);
|
||||
dim.fromTags(dtag);
|
||||
dim.setCustomName(display);
|
||||
dim.setDisplay(display);
|
||||
PRESETS.add(dim);
|
||||
return dim;
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public class GuiGameOver extends Gui {
|
|||
public void init(int width, int height) {
|
||||
this.timer = 0;
|
||||
this.add(new Label(0, 0, 400, 0, TextColor.DRED + "Du bist gestorben!"));
|
||||
this.add(new MultiLabel(0, 32, 400, 42, String.format(TextColor.GREEN + "Letzte Position" + TextColor.GRAY + ":\n" + TextColor.YELLOW + "%d, %d, %d\n" + TextColor.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getNameString())));
|
||||
this.add(new MultiLabel(0, 32, 400, 42, String.format(TextColor.GREEN + "Letzte Position" + TextColor.GRAY + ":\n" + TextColor.YELLOW + "%d, %d, %d\n" + TextColor.YELLOW + "%s", ExtMath.floord(this.gm.player.posX), ExtMath.floord(this.gm.player.posY), ExtMath.floord(this.gm.player.posZ), this.gm.player.worldObj.dimension.getDisplay())));
|
||||
this.button = this.add(new ActButton(100, 100, 200, 0, new ButtonCallback() {
|
||||
public void use(ActButton elem, PressType action) {
|
||||
GuiGameOver.this.gm.player.respawnPlayer();
|
||||
|
|
|
@ -18,7 +18,7 @@ public class GuiSign extends Gui implements FieldCallback {
|
|||
public void init(int width, int height) {
|
||||
this.add(new Label(0, -140, 300, 0, "Bearbeite Schild"));
|
||||
this.add(new Label(0, -80, 300, 0, String.format("%d, %d, %d", this.position.getX(), this.position.getY(), this.position.getZ())));
|
||||
this.add(new Label(0, -50, 300, 0, this.gm.world == null ? "<?>" : this.gm.world.dimension.getNameString()));
|
||||
this.add(new Label(0, -50, 300, 0, this.gm.world == null ? "<?>" : this.gm.world.dimension.getDisplay()));
|
||||
for(int z = 0; z < this.lines.length; z++) {
|
||||
this.lines[z] = this.add(new Field(0, 40 * z, 300, 0, 50, this, this.tempLines[z] == null ? "" : this.tempLines[z]));
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import common.block.tech.BlockDispenser;
|
|||
import common.block.tech.BlockFurnace;
|
||||
import common.block.tech.BlockWorkbench;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Space;
|
||||
import common.effect.StatusEffect;
|
||||
import common.entity.DataWatcher;
|
||||
import common.entity.Entity;
|
||||
|
@ -46,6 +47,7 @@ import common.init.Blocks;
|
|||
import common.init.EntityRegistry;
|
||||
import common.init.ItemRegistry;
|
||||
import common.init.SoundEvent;
|
||||
import common.init.UniverseRegistry;
|
||||
import common.inventory.Container;
|
||||
import common.inventory.InventoryBasic;
|
||||
import common.inventory.InventoryPlayer;
|
||||
|
@ -128,6 +130,7 @@ import common.tileentity.Device;
|
|||
import common.tileentity.TileEntityDisplay;
|
||||
import common.tileentity.TileEntitySign;
|
||||
import common.util.Pair;
|
||||
import common.util.WorldPos;
|
||||
import common.village.MerchantRecipeList;
|
||||
import common.world.Explosion;
|
||||
import common.world.Weather;
|
||||
|
@ -1628,6 +1631,10 @@ public class ClientPlayer implements IClientPlayer
|
|||
else if(this.gm.open instanceof GuiChar guichar) {
|
||||
guichar.setCharsAvailable();
|
||||
}
|
||||
if(!this.gm.charEditor && this.gm.player != null && this.gm.selectedCharacter >= 0 && this.gm.selectedCharacter < this.gm.characterList.size()) {
|
||||
Dimension dim = UniverseRegistry.getDimension(this.gm.characterList.get(this.gm.selectedCharacter).origin());
|
||||
this.gm.player.setOrigin(new WorldPos(0, 0, 0, dim == null ? Space.INSTANCE : dim));
|
||||
}
|
||||
}
|
||||
|
||||
public void handleKeepAlive(SPacketKeepAlive packetIn)
|
||||
|
@ -1885,7 +1892,7 @@ public class ClientPlayer implements IClientPlayer
|
|||
public void handleDimName(SPacketDimensionName packet) {
|
||||
NetHandler.checkThread(packet, this, this.gm, this.world);
|
||||
if(this.world.dimension.isCustom()) {
|
||||
this.world.dimension.setCustomName(packet.getCustomName());
|
||||
this.world.dimension.setDisplay(packet.getCustomName());
|
||||
this.world.dimension.setBaseNames(packet.getFullName());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,11 +4,14 @@ import client.Client;
|
|||
import client.network.ClientPlayer;
|
||||
import client.world.WorldClient;
|
||||
import common.block.Block;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Space;
|
||||
import common.entity.Entity;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.BlockRegistry;
|
||||
import common.init.Blocks;
|
||||
import common.init.EntityRegistry;
|
||||
import common.init.UniverseRegistry;
|
||||
import common.item.ItemControl;
|
||||
import common.item.ItemStack;
|
||||
import common.item.block.ItemBlock;
|
||||
|
@ -20,6 +23,7 @@ import common.sound.PositionedSound;
|
|||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.util.Vec3;
|
||||
import common.util.WorldPos;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
|
@ -284,6 +288,10 @@ public class PlayerController {
|
|||
public EntityNPC createPlayerEntity(WorldClient world, int type) {
|
||||
EntityNPC player = (EntityNPC)EntityRegistry.createEntityByID(type, world);
|
||||
player.setClientPlayer(this.handler);
|
||||
if(!this.gm.charEditor && this.gm.selectedCharacter >= 0 && this.gm.selectedCharacter < this.gm.characterList.size()) {
|
||||
Dimension dim = UniverseRegistry.getDimension(this.gm.characterList.get(this.gm.selectedCharacter).origin());
|
||||
player.setOrigin(new WorldPos(0, 0, 0, dim == null ? Space.INSTANCE : dim));
|
||||
}
|
||||
return player;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ public class BlockBed extends Block implements Rotatable {
|
|||
&& Math.abs(player.posY - (double)pos.getY()) <= 2.0D && Math.abs(player.posZ - (double)pos.getZ()) <= 3.0D) {
|
||||
player.setSpawnPoint(new WorldPos(pos, player.worldObj));
|
||||
player.connection.addHotbar(TextColor.DGREEN + "Dein Einstiegspunkt wurde auf %s bei [%s, %s, %s] gesetzt",
|
||||
player.worldObj.dimension.getNameString(), player.getSpawnPoint().getX(),
|
||||
player.worldObj.dimension.getDisplay(), player.getSpawnPoint().getX(),
|
||||
player.getSpawnPoint().getY(), player.getSpawnPoint().getZ());
|
||||
}
|
||||
// else if(!Config.bedSpawn) {
|
||||
|
|
|
@ -8,7 +8,6 @@ import common.entity.Entity;
|
|||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.item.block.ItemBlock;
|
||||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
|
|
|
@ -5,14 +5,10 @@ import common.block.Rotatable;
|
|||
import common.block.Material;
|
||||
import common.entity.Entity;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Items;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.properties.Property;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.State;
|
||||
|
|
|
@ -5,7 +5,6 @@ import common.block.Material;
|
|||
import common.entity.Entity;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
import common.init.Items;
|
||||
import common.item.Item;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
|
|
|
@ -3,8 +3,6 @@ package common.block.foliage;
|
|||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.init.Blocks;
|
||||
import common.init.Items;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.item.StackSize;
|
||||
import common.model.BlockLayer;
|
||||
|
|
|
@ -3,9 +3,6 @@ package common.block.tech;
|
|||
import java.util.Arrays;
|
||||
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.BlockRegistry;
|
||||
import common.item.Item;
|
||||
import common.item.block.ItemBlock;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.tileentity.TileEntityDisplay;
|
||||
import common.util.BlockPos;
|
||||
|
|
|
@ -15,6 +15,10 @@ public final class Area extends Dimension {
|
|||
this.setPhysics(widthToSize(width), 1L, 1L, 0.0f, 10.0f, temperature, brightness);
|
||||
this.setSkyColor(sky).setFogColor(fog);
|
||||
}
|
||||
|
||||
public Area(int color, int width, float temperature, int brightness) {
|
||||
this(color, color, width, temperature, brightness);
|
||||
}
|
||||
|
||||
public final DimType getType() {
|
||||
return DimType.AREA;
|
||||
|
|
|
@ -5,17 +5,16 @@ import java.util.Map;
|
|||
import common.collect.Maps;
|
||||
|
||||
public enum DimType {
|
||||
STAR("star", "Stern %s", true, false, false, false, false, true),
|
||||
PLANET("planet", "Planet %s", true, true, true, true, true, true),
|
||||
MOON("moon", "Mond %s", true, false, false, true, false, true),
|
||||
SPACE("space", "%s", false, false, false, false, false, true),
|
||||
SEMI("semi", "%s", false, false, true, false, true, true),
|
||||
AREA("area", "%s", false, false, false, false, false, false);
|
||||
STAR("star", true, false, false, false, false, true),
|
||||
PLANET("planet", true, true, true, true, true, true),
|
||||
MOON("moon", true, false, false, true, false, true),
|
||||
SPACE("space", false, false, false, false, false, true),
|
||||
SEMI("semi", false, false, true, false, true, true),
|
||||
AREA("area", false, false, false, false, false, false);
|
||||
|
||||
private static final Map<String, DimType> LOOKUP = Maps.newHashMap();
|
||||
|
||||
private final String name;
|
||||
public final String format;
|
||||
public final boolean celestial;
|
||||
public final boolean days;
|
||||
public final boolean weather;
|
||||
|
@ -23,9 +22,8 @@ public enum DimType {
|
|||
public final boolean clouds;
|
||||
public final boolean sky;
|
||||
|
||||
private DimType(String name, String format, boolean time, boolean days, boolean weather, boolean celestials, boolean clouds, boolean sky) {
|
||||
private DimType(String name, boolean time, boolean days, boolean weather, boolean celestials, boolean clouds, boolean sky) {
|
||||
this.name = name;
|
||||
this.format = format;
|
||||
this.celestial = time;
|
||||
this.days = days;
|
||||
this.weather = weather;
|
||||
|
|
|
@ -171,7 +171,6 @@ public abstract class Dimension extends Nameable {
|
|||
private float orbitOffset = 0.0f;
|
||||
private long orbitalPeriod = 1L;
|
||||
private long rotationPeriod = 1L;
|
||||
private int timeQualifier = 9;
|
||||
private int brightness = 0;
|
||||
private int size = World.MAX_SIZE;
|
||||
|
||||
|
@ -590,11 +589,6 @@ public abstract class Dimension extends Nameable {
|
|||
}
|
||||
|
||||
|
||||
public final Dimension setTimeQualifier(int value) {
|
||||
this.timeQualifier = value;
|
||||
return this;
|
||||
}
|
||||
|
||||
public final Dimension setDefaultWeather(Weather value) {
|
||||
this.defaultWeather = this.weather = value;
|
||||
return this;
|
||||
|
@ -703,11 +697,6 @@ public abstract class Dimension extends Nameable {
|
|||
}
|
||||
|
||||
|
||||
|
||||
public final int getTimeQualifier() {
|
||||
return this.timeQualifier;
|
||||
}
|
||||
|
||||
// public final String getCustomName() {
|
||||
// return this.customName;
|
||||
// }
|
||||
|
@ -886,14 +875,14 @@ public abstract class Dimension extends Nameable {
|
|||
switch(this.getType()) {
|
||||
case MOON:
|
||||
dim = UniverseRegistry.getPlanet((Moon)dim);
|
||||
planet = dim.getNameString();
|
||||
planet = dim.getDisplay();
|
||||
case PLANET:
|
||||
dim = UniverseRegistry.getStar((Planet)dim);
|
||||
star = dim.getNameString();
|
||||
star = dim.getDisplay();
|
||||
case STAR:
|
||||
Sector sector = UniverseRegistry.getSector((Star)dim);
|
||||
String sect = sector.getNameString();
|
||||
String galaxy = UniverseRegistry.getGalaxy(sector).getNameString();
|
||||
String sect = sector.getDisplay();
|
||||
String galaxy = UniverseRegistry.getGalaxy(sector).getDisplay();
|
||||
if(planet != null)
|
||||
return new String[] {planet, star, sect, galaxy};
|
||||
else if(star != null)
|
||||
|
@ -901,7 +890,7 @@ public abstract class Dimension extends Nameable {
|
|||
else
|
||||
return new String[] {sect, galaxy};
|
||||
case AREA:
|
||||
return new String[] {UniverseRegistry.getDomain((Area)dim).getNameString()};
|
||||
return new String[] {UniverseRegistry.getDomain((Area)dim).getDisplay()};
|
||||
default:
|
||||
return new String[0];
|
||||
}
|
||||
|
@ -1151,7 +1140,6 @@ public abstract class Dimension extends Nameable {
|
|||
}
|
||||
this.populated = !tag.hasBool("NoPopulation") || !tag.getBool("NoPopulation");
|
||||
this.denseFog = tag.getBool("DenseFog");
|
||||
this.timeQualifier = tag.getInt("ImperialTime");
|
||||
this.brightness = tag.getInt("Brightness");
|
||||
this.skyColor = tag.getInt("SkyColor");
|
||||
this.fogColor = tag.getInt("FogColor");
|
||||
|
@ -1331,7 +1319,6 @@ public abstract class Dimension extends Nameable {
|
|||
if(!this.populated)
|
||||
tag.setBool("NoPopulation", true);
|
||||
tag.setBool("DenseFog", this.denseFog);
|
||||
tag.setInt("ImperialTime", this.timeQualifier);
|
||||
tag.setInt("Brightness", this.brightness);
|
||||
tag.setInt("SkyColor", this.skyColor);
|
||||
tag.setInt("FogColor", this.fogColor);
|
||||
|
@ -1378,10 +1365,6 @@ public abstract class Dimension extends Nameable {
|
|||
tag.setObject("DStarColorFnc", fnc);
|
||||
}
|
||||
}
|
||||
|
||||
protected String getNameIdentifier() {
|
||||
return this.getType().format;
|
||||
}
|
||||
|
||||
public int getBiomeSize() {
|
||||
return this.biomeSize;
|
||||
|
|
|
@ -11,8 +11,4 @@ public final class Domain extends Nameable implements Comparable<Domain> {
|
|||
public int compareTo(Domain other) {
|
||||
return other == null ? -1 : this.id.compareTo(other.id);
|
||||
}
|
||||
|
||||
protected String getNameIdentifier() {
|
||||
return "%s";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,8 +11,4 @@ public final class Galaxy extends Nameable implements Comparable<Galaxy> {
|
|||
public int compareTo(Galaxy other) {
|
||||
return other == null ? -1 : this.id.compareTo(other.id);
|
||||
}
|
||||
|
||||
protected String getNameIdentifier() {
|
||||
return "Galaxie %s";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package common.dimension;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.init.Blocks;
|
||||
import common.init.UniverseRegistry;
|
||||
|
||||
public final class Moon extends Dimension {
|
||||
|
@ -7,12 +10,25 @@ public final class Moon extends Dimension {
|
|||
super(true);
|
||||
}
|
||||
|
||||
public Moon(int sky, int fog, int radius, long orbit, long rotation, float gravity, float temperature, int brightness) {
|
||||
public Moon(int sky, int fog, int radius, long orbit, long rotation, float gravity, float temperature, int brightness, Block surface, Block liquid) {
|
||||
super(false);
|
||||
this.setPhysics(Planet.radiusToSize(Math.min(radius, 26000000)), orbit, rotation, 0.0f, gravity, temperature, brightness);
|
||||
this.setTimeQualifier(7);
|
||||
this.setStarBrightness(0.75f).setDeepStarBrightness(0.75f);
|
||||
this.setSkyColor(sky).setFogColor(fog);
|
||||
this.setPerlinGen(surface.getState(), liquid.getState(), 63);
|
||||
this.setBiome(Biome.MOON);
|
||||
}
|
||||
|
||||
public Moon(int color, int radius, long orbit, long rotation, float gravity, float temperature, Block surface, Block liquid) {
|
||||
this(color, color, radius, orbit, rotation, gravity, temperature, 8, surface, liquid);
|
||||
}
|
||||
|
||||
public Moon(int radius, long orbit, long rotation, float gravity, float temperature) {
|
||||
this(0x333333, radius, orbit, rotation, gravity, temperature, Blocks.moon_rock, Blocks.air);
|
||||
}
|
||||
|
||||
public Moon(int radius, long orbitRotation, float gravity, float temperature) {
|
||||
this(radius, orbitRotation, orbitRotation, gravity, temperature);
|
||||
}
|
||||
|
||||
public final DimType getType() {
|
||||
|
|
|
@ -9,23 +9,15 @@ public abstract class Nameable {
|
|||
this.custom = custom;
|
||||
}
|
||||
|
||||
public final String getCustomName() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public final void setCustomName(String name) {
|
||||
this.display = name;
|
||||
}
|
||||
|
||||
public final boolean isCustom() {
|
||||
return this.custom;
|
||||
}
|
||||
|
||||
public final void setDisplay(String name) {
|
||||
this.display = name;
|
||||
}
|
||||
|
||||
protected abstract String getNameIdentifier();
|
||||
|
||||
public final String getNameString() {
|
||||
return this.display.startsWith("'") && this.display.endsWith("'") && this.display.length() > 2
|
||||
? this.display.substring(1, this.display.length() - 1) :
|
||||
String.format(this.getNameIdentifier(), this.display);
|
||||
public final String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,15 +23,22 @@ public final class Planet extends Dimension {
|
|||
this(sky, fog, clouds, radius, orbit, rotation, offset, gravity, temperature, 0);
|
||||
}
|
||||
|
||||
public Planet(int radius, long orbit, long rotation, float offset, float gravity, float temperature) {
|
||||
this(0xffffffff, 0xc0d8ff, 0xffffff, radius, orbit, rotation, offset, gravity, temperature, 0);
|
||||
}
|
||||
|
||||
public Planet(int sky, int fog, int clouds, int radius, long orbit, long rotation, float gravity, float temperature) {
|
||||
this(sky, fog, clouds, radius, orbit, rotation, 0.0f, gravity, temperature, 0);
|
||||
}
|
||||
|
||||
public Planet(int radius, long orbit, long rotation, float gravity, float temperature) {
|
||||
this(radius, orbit, rotation, 0.0f, gravity, temperature);
|
||||
}
|
||||
|
||||
public Planet(int sky, int fog, int clouds, int radius, long orbit, long rotation, float offset, float gravity,
|
||||
float temperature, int brightness) {
|
||||
super(false);
|
||||
this.setPhysics(radiusToSize(Math.min(radius, 36750000)), orbit, rotation, offset, gravity, temperature, brightness);
|
||||
this.setTimeQualifier(7);
|
||||
this.setStarBrightness(0.5f).setDeepStarBrightness(0.0f);
|
||||
this.setSkyColor(sky).setFogColor(fog).setCloudColor(clouds);
|
||||
}
|
||||
|
|
|
@ -11,8 +11,4 @@ public final class Sector extends Nameable implements Comparable<Sector> {
|
|||
public int compareTo(Sector other) {
|
||||
return other == null ? -1 : this.id.compareTo(other.id);
|
||||
}
|
||||
|
||||
protected String getNameIdentifier() {
|
||||
return "Sektor %s";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,10 @@ public final class Semi extends Dimension {
|
|||
this.setStarBrightness(0.5f).setDeepStarBrightness(0.5f);
|
||||
this.setSkyColor(sky).setFogColor(fog).setCloudColor(clouds);
|
||||
}
|
||||
|
||||
public Semi(int color, int clouds, int width, float temperature, int brightness) {
|
||||
this(color, color, clouds, width, temperature, brightness);
|
||||
}
|
||||
|
||||
public final DimType getType() {
|
||||
return DimType.SEMI;
|
||||
|
|
|
@ -8,7 +8,7 @@ public final class Space extends Dimension {
|
|||
|
||||
private Space() {
|
||||
super(false);
|
||||
this.setPhysics(World.MAX_SIZE, 1L, 1L, 0.0f, 0.0f, 2.7f, 15).setTimeQualifier(8);
|
||||
this.setPhysics(World.MAX_SIZE, 1L, 1L, 0.0f, 0.0f, 2.7f, 15);
|
||||
this.setBiome(Biome.SPACE).setStarBrightness(1.0f).setDeepStarBrightness(1.0f);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,18 +1,22 @@
|
|||
package common.dimension;
|
||||
|
||||
import common.world.State;
|
||||
import common.block.liquid.BlockStaticLiquid;
|
||||
import common.init.Blocks;
|
||||
|
||||
public final class Star extends Dimension {
|
||||
Star() {
|
||||
super(true);
|
||||
}
|
||||
|
||||
public Star(int color, int radius, float gravity, float temp, State surface, int height) {
|
||||
public Star(int color, int radius, float gravity, float temp, BlockStaticLiquid filler) {
|
||||
super(false);
|
||||
this.setPhysics(Planet.radiusToSize(Math.min(radius, 945000000) / 25), 1L, 1L, 0.0f, gravity, temp, 15);
|
||||
this.setTimeQualifier(7);
|
||||
this.setStarBrightness(0.75f).setDeepStarBrightness(0.75f);
|
||||
this.setSkyColor(color).setFogColor(color).setFlatGen(surface, height);
|
||||
this.setSkyColor(color).setFogColor(color).setFlatGen(filler.getState(), 128);
|
||||
}
|
||||
|
||||
public Star(int radius, float gravity, float temp) {
|
||||
this(0xff7f00, radius, gravity, temp, Blocks.plasma);
|
||||
}
|
||||
|
||||
public final DimType getType() {
|
||||
|
|
|
@ -2,5 +2,5 @@ package common.entity.npc;
|
|||
|
||||
import common.util.BlockPos;
|
||||
|
||||
public record PlayerCharacter(String name, String info, Alignment align, String dim, BlockPos pos, String type, int level) {
|
||||
public record PlayerCharacter(String name, String info, Alignment align, String dim, BlockPos pos, String type, int level, String origin) {
|
||||
}
|
||||
|
|
|
@ -292,6 +292,7 @@ public abstract class BlockRegistry {
|
|||
registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER, TextureAnimation.WATERFLOW);
|
||||
registerFluid("lava", "Lava", false, LiquidType.LAVA, true, 15, -30, 0.0f, 2, 3);
|
||||
registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.LAVA, TextureAnimation.LAVAFLOW);
|
||||
registerFluid("plasma", "Plasma", false, LiquidType.HOT, false, 15, 15, 0.0f, 2, 2);
|
||||
registerFluid("mercury", "Quecksilber", false, LiquidType.COLD, true, 0, 40, 0.0f, 8, 4);
|
||||
registerFluid("hydrogen", "Wasserstoff", false, LiquidType.COLD, true, 0, 50, 0.0f, 8, 4);
|
||||
registerFluid("acid", "Säure", false, LiquidType.HOT, false, 0, 5, 0.0f, 1, 1);
|
||||
|
|
|
@ -593,6 +593,8 @@ public abstract class Blocks {
|
|||
public static final BlockToggleableLight lamp = get("lamp");
|
||||
public static final BlockToggleableLight lit_lamp = get("lit_lamp");
|
||||
public static final BlockWire wire = get("wire");
|
||||
public static final BlockStaticLiquid plasma = get("plasma");
|
||||
public static final BlockDynamicLiquid flowing_plasma = get("flowing_plasma");
|
||||
|
||||
private static <T extends Block> T get(String id) {
|
||||
T block = (T)BlockRegistry.byNameExact(id);
|
||||
|
|
|
@ -1007,6 +1007,8 @@ public abstract class Items {
|
|||
public static final ItemBlock torch = get("torch");
|
||||
public static final ItemBlock soul_torch = get("soul_torch");
|
||||
public static final ItemBlock tian_torch = get("tian_torch");
|
||||
public static final ItemBucket plasma_bucket = get("plasma_bucket");
|
||||
public static final ItemBucket recursive_plasma_bucket = get("recursive_plasma_bucket");
|
||||
|
||||
private static <T extends Item> T get(String id) {
|
||||
T item = (T)ItemRegistry.byName(id);
|
||||
|
|
|
@ -157,49 +157,49 @@ public abstract class UniverseRegistry {
|
|||
}
|
||||
|
||||
public static Galaxy registerCustomGalaxy(String name, String display) {
|
||||
return registerGalaxy(name, display, true);
|
||||
return registerGalaxyInt(name, display, true);
|
||||
}
|
||||
|
||||
public static Sector registerCustomSector(String name, String display, String galaxy) {
|
||||
return registerSector(name, display, galaxy, true);
|
||||
return registerSectorInt(name, display, galaxy, true);
|
||||
}
|
||||
|
||||
public static Domain registerCustomDomain(String name, String display) {
|
||||
return registerDomain(name, display, true);
|
||||
return registerDomainInt(name, display, true);
|
||||
}
|
||||
|
||||
public static Star registerCustomStar(String name, String display, Star dim, String sector) {
|
||||
if(!dim.isCustom())
|
||||
dim = (Star)dim.makeCustomCopy();
|
||||
registerStar(name, display, dim, sector);
|
||||
registerStarInt(name, display, dim, sector);
|
||||
return dim;
|
||||
}
|
||||
|
||||
public static Planet registerCustomPlanet(String name, String display, Planet dim, String star) {
|
||||
if(!dim.isCustom())
|
||||
dim = (Planet)dim.makeCustomCopy();
|
||||
registerPlanet(name, display, dim, star);
|
||||
registerPlanetInt(name, display, dim, star);
|
||||
return dim;
|
||||
}
|
||||
|
||||
public static Moon registerCustomMoon(String name, String display, Moon dim, String planet) {
|
||||
if(!dim.isCustom())
|
||||
dim = (Moon)dim.makeCustomCopy();
|
||||
registerMoon(name, display, dim, planet);
|
||||
registerMoonInt(name, display, dim, planet);
|
||||
return dim;
|
||||
}
|
||||
|
||||
public static Area registerCustomArea(String name, String display, Area dim, String domain) {
|
||||
if(!dim.isCustom())
|
||||
dim = (Area)dim.makeCustomCopy();
|
||||
registerArea(name, display, dim, domain);
|
||||
registerAreaInt(name, display, dim, domain);
|
||||
return dim;
|
||||
}
|
||||
|
||||
public static Semi registerCustomSemi(String name, String display, Semi dim) {
|
||||
if(!dim.isCustom())
|
||||
dim = (Semi)dim.makeCustomCopy();
|
||||
registerSemi(name, display, dim);
|
||||
registerSemiInt(name, display, dim);
|
||||
return dim;
|
||||
}
|
||||
|
||||
|
@ -208,53 +208,41 @@ public abstract class UniverseRegistry {
|
|||
throw new IllegalArgumentException("Objekt " + name + " ist bereits registriert");
|
||||
}
|
||||
|
||||
private static Galaxy registerGalaxy(String name, String display, boolean custom) {
|
||||
private static Galaxy registerGalaxyInt(String name, String display, boolean custom) {
|
||||
checkRegistered(name);
|
||||
Galaxy galaxy = new Galaxy(name, custom);
|
||||
galaxy.setCustomName(display);
|
||||
galaxy.setDisplay(display);
|
||||
GALAXIES.put(name, galaxy);
|
||||
SECTORS_MAP.put(galaxy, Lists.newArrayList());
|
||||
return galaxy;
|
||||
}
|
||||
|
||||
private static void registerGalaxy(String name, String display) {
|
||||
registerGalaxy(name, display, false);
|
||||
}
|
||||
|
||||
private static Sector registerSector(String name, String display, String galaxy, boolean custom) {
|
||||
private static Sector registerSectorInt(String name, String display, String galaxy, boolean custom) {
|
||||
checkRegistered(name);
|
||||
Galaxy base = GALAXIES.get(galaxy);
|
||||
if(base == null)
|
||||
throw new IllegalArgumentException("Galaxie " + galaxy + " existiert nicht");
|
||||
Sector sector = new Sector(name, custom);
|
||||
sector.setCustomName(display);
|
||||
sector.setDisplay(display);
|
||||
SECTORS.put(name, sector);
|
||||
SECTOR_MAP.put(sector, base);
|
||||
STARS_MAP.put(sector, Lists.newArrayList());
|
||||
SECTORS_MAP.get(base).add(sector);
|
||||
return sector;
|
||||
}
|
||||
|
||||
private static void registerSector(String name, String display, String galaxy) {
|
||||
registerSector(name, display, galaxy, false);
|
||||
}
|
||||
|
||||
private static Domain registerDomain(String name, String display, boolean custom) {
|
||||
private static Domain registerDomainInt(String name, String display, boolean custom) {
|
||||
checkRegistered(name);
|
||||
Domain domain = new Domain(name, custom);
|
||||
domain.setCustomName(display);
|
||||
domain.setDisplay(display);
|
||||
DOMAINS.put(name, domain);
|
||||
AREAS_MAP.put(domain, Lists.newArrayList());
|
||||
return domain;
|
||||
}
|
||||
|
||||
private static void registerDomain(String name, String display) {
|
||||
registerDomain(name, display, false);
|
||||
}
|
||||
|
||||
private static void registerDimension(String name, String display, Dimension dim) {
|
||||
checkRegistered(name);
|
||||
dim.setCustomName(display);
|
||||
dim.setDisplay(display);
|
||||
NAME_MAP.put(name, dim);
|
||||
NAMES.put(dim, name);
|
||||
NAME_LIST.add(name);
|
||||
|
@ -263,7 +251,7 @@ public abstract class UniverseRegistry {
|
|||
DIMENSIONS.add(dim);
|
||||
}
|
||||
|
||||
private static void registerStar(String name, String display, Dimension dim, String sector) {
|
||||
private static void registerStarInt(String name, String display, Dimension dim, String sector) {
|
||||
Sector base = SECTORS.get(sector);
|
||||
if(base == null)
|
||||
throw new IllegalArgumentException("Sektor " + sector + " existiert nicht");
|
||||
|
@ -273,7 +261,7 @@ public abstract class UniverseRegistry {
|
|||
STARS_MAP.get(base).add((Star)dim);
|
||||
}
|
||||
|
||||
private static void registerPlanet(String name, String display, Dimension dim, String star) {
|
||||
private static void registerPlanetInt(String name, String display, Dimension dim, String star) {
|
||||
Dimension base = NAME_MAP.get(star);
|
||||
if(base == null || base.getType() != DimType.STAR)
|
||||
throw new IllegalArgumentException("Stern " + star + " existiert nicht");
|
||||
|
@ -283,7 +271,7 @@ public abstract class UniverseRegistry {
|
|||
PLANETS_MAP.get((Star)base).add((Planet)dim);
|
||||
}
|
||||
|
||||
private static void registerMoon(String name, String display, Dimension dim, String planet) {
|
||||
private static void registerMoonInt(String name, String display, Dimension dim, String planet) {
|
||||
Dimension base = NAME_MAP.get(planet);
|
||||
if(base == null || base.getType() != DimType.PLANET)
|
||||
throw new IllegalArgumentException("Planet " + planet + " existiert nicht");
|
||||
|
@ -292,7 +280,7 @@ public abstract class UniverseRegistry {
|
|||
MOONS_MAP.get((Planet)base).add((Moon)dim);
|
||||
}
|
||||
|
||||
private static void registerArea(String name, String display, Dimension dim, String domain) {
|
||||
private static void registerAreaInt(String name, String display, Dimension dim, String domain) {
|
||||
Domain base = DOMAINS.get(domain);
|
||||
if(base == null)
|
||||
throw new IllegalArgumentException("Bereich " + domain + " existiert nicht");
|
||||
|
@ -301,138 +289,270 @@ public abstract class UniverseRegistry {
|
|||
AREAS_MAP.get(base).add((Area)dim);
|
||||
}
|
||||
|
||||
private static void registerSemi(String name, String display, Dimension dim) {
|
||||
private static void registerSemiInt(String name, String display, Dimension dim) {
|
||||
registerDimension(name, display, dim);
|
||||
SEMI_SET.add((Semi)dim);
|
||||
}
|
||||
|
||||
|
||||
private static String lastGalaxy;
|
||||
private static String lastSector;
|
||||
private static String lastDomain;
|
||||
private static String lastStar;
|
||||
private static String lastPlanet;
|
||||
|
||||
private static String fromDisplay(String display) {
|
||||
return display.toLowerCase().replace("'", "").replace(' ', '_');
|
||||
}
|
||||
|
||||
private static void registerGalaxy(String name, String display, Runnable sub) {
|
||||
registerGalaxyInt(name, display, false);
|
||||
lastGalaxy = name;
|
||||
sub.run();
|
||||
lastGalaxy = null;
|
||||
}
|
||||
|
||||
private static void registerSector(String name, String display, Runnable sub) {
|
||||
registerSectorInt(name, display, lastGalaxy, false);
|
||||
lastSector = name;
|
||||
sub.run();
|
||||
lastSector = null;
|
||||
}
|
||||
|
||||
private static void registerDomain(String name, String display, Runnable sub) {
|
||||
registerDomainInt(name, display, false);
|
||||
lastDomain = name;
|
||||
sub.run();
|
||||
lastDomain = null;
|
||||
}
|
||||
|
||||
private static void registerStar(String name, String display, Dimension dim, Runnable sub) {
|
||||
registerStarInt(name, display, dim, lastSector);
|
||||
lastStar = name;
|
||||
sub.run();
|
||||
lastStar = null;
|
||||
}
|
||||
|
||||
private static void registerPlanet(String name, String display, Dimension dim) {
|
||||
registerPlanetInt(name, display, dim, lastStar);
|
||||
}
|
||||
|
||||
private static void registerPlanet(String name, String display, Dimension dim, Runnable sub) {
|
||||
registerPlanet(name, display, dim);
|
||||
lastPlanet = name;
|
||||
sub.run();
|
||||
lastPlanet = null;
|
||||
}
|
||||
|
||||
private static void registerMoon(String name, String display, Dimension dim) {
|
||||
registerMoonInt(name, display, dim, lastPlanet);
|
||||
}
|
||||
|
||||
private static void registerArea(String name, String display, Dimension dim) {
|
||||
registerAreaInt(name, display, dim, lastDomain);
|
||||
}
|
||||
|
||||
private static void registerSemi(String name, String display, Dimension dim) {
|
||||
registerSemiInt(name, display, dim);
|
||||
}
|
||||
|
||||
private static void registerGalaxy(String display, Runnable sub) {
|
||||
registerGalaxy(fromDisplay(display), "Galaxie " + display, sub);
|
||||
}
|
||||
|
||||
private static void registerSector(String display, Runnable sub) {
|
||||
registerSector(fromDisplay(display), "Sektor " + display, sub);
|
||||
}
|
||||
|
||||
private static void registerDomain(String display, Runnable sub) {
|
||||
registerDomain(fromDisplay(display), display, sub);
|
||||
}
|
||||
|
||||
private static void registerStar(String display, Dimension dim, Runnable sub) {
|
||||
registerStar(fromDisplay(display), "Stern " + display, dim, sub);
|
||||
}
|
||||
|
||||
private static void registerPlanet(String display, Dimension dim) {
|
||||
registerPlanet(fromDisplay(display), "Planet " + display, dim);
|
||||
}
|
||||
|
||||
private static void registerPlanet(String display, Dimension dim, Runnable sub) {
|
||||
registerPlanet(fromDisplay(display), "Planet " + display, dim, sub);
|
||||
}
|
||||
|
||||
private static void registerMoon(String display, Dimension dim) {
|
||||
registerMoon(fromDisplay(display), "Mond " + display, dim);
|
||||
}
|
||||
|
||||
private static void registerArea(String display, Dimension dim) {
|
||||
registerArea(fromDisplay(display), display, dim);
|
||||
}
|
||||
|
||||
private static void registerSemi(String display, Dimension dim) {
|
||||
registerSemi(fromDisplay(display), display, dim);
|
||||
}
|
||||
|
||||
private static void registerStar(String display, int radius, float gravity, float temp, Runnable sub) {
|
||||
registerStar(display, new Star(radius, gravity, temp), sub);
|
||||
}
|
||||
|
||||
private static void registerMoon(String display, int radius, long orbit, long rotation, float gravity, float temperature) {
|
||||
registerMoon(display, new Moon(radius, orbit, rotation, gravity, temperature));
|
||||
}
|
||||
|
||||
private static void registerMoon(String display, int radius, long orbitRotation, float gravity, float temperature) {
|
||||
registerMoon(display, new Moon(radius, orbitRotation, gravity, temperature));
|
||||
}
|
||||
|
||||
public static void register() {
|
||||
registerDimension("space", "Der Weltraum", Space.INSTANCE);
|
||||
registerGalaxy("milkyway", "Milchstraße");
|
||||
registerSector("solar", "Solar", "milkyway");
|
||||
registerStar("sol", "Sol", new Star(0xff7f00, 695508000, 274.0f, 5778.0f, Blocks.lava.getState(), 128).setTimeQualifier(1), "solar");
|
||||
registerPlanet("terra", "Terra", new Planet(0xffffffff, 0xc0d8ff, 0xffffff, 6378136, World.EARTH_YEAR, 24000L, 28.0f, 9.81f,
|
||||
259.15f).setTimeQualifier(0)
|
||||
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.gravel.getState())
|
||||
.setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOMPLAINS).enableMobs().enableSnow()
|
||||
.setFrostBiomes(Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.COLDTAIGA, Biome.MEGATAIGA)
|
||||
.setColdBiomes(Biome.FOREST, Biome.EXTREMEHILLS, Biome.TAIGA, Biome.PLAINS)
|
||||
.setMediumBiomes(Biome.FOREST, Biome.ROOFEDFOREST, Biome.EXTREMEHILLS, Biome.PLAINS, Biome.BIRCHFOREST,
|
||||
Biome.SWAMPLAND, Biome.JUNGLE)
|
||||
.setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAINS)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(8)
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addMetalOres(MetalType.values())
|
||||
.addOre(Blocks.dirt.getState(), 10, 0, 33, 0, 256, false)
|
||||
.addOre(Blocks.gravel.getState(), 8, 0, 33, 0, 256, false)
|
||||
.addOre(Blocks.rock.getState(), 6, 0, 22, 24, 72, false)
|
||||
.addOre(Blocks.coal_ore.getState(), 20, 0, 17, 0, 128, false)
|
||||
.addOre(Blocks.charge_ore.getState(), 8, 0, 8, 0, 16, false)
|
||||
.addOre(Blocks.lapis_ore.getState(), 1, 0, 7, 16, 16, true)
|
||||
.addOre(Blocks.diamond_ore.getState(), 1, 0, 8, 0, 16, false)
|
||||
.addOre(Blocks.ruby_ore.getState(), 1, 0, 4, 12, 8, true)
|
||||
.addOre(Blocks.cinnabar_ore.getState(), 1, 0, 11, 0, 24, false)
|
||||
.enableVillages().enableMineshafts().enableScattered().enableStrongholds(), "sol");
|
||||
registerMoon("luna", "Luna", new Moon(0x333333, 0x333333, 1737100, 655728L, 655728L, 1.62f, 210.0f, 8)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63).setBiome(Biome.MOON)
|
||||
.setTimeQualifier(1), "terra");
|
||||
|
||||
registerPlanet("mercury", "Merkur", new Planet(0x666666, 0x535353, 0x858585, 2440530, 2111297L, 1407509L, 3.7f, 440.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("venus", "Venus", new Planet(0xc0c0c0, 0xa0a0a0, 0xe0e0e0, 6051800, 5392908L, 5832449L, 8.87f, 737.0f)
|
||||
.setPerlinGen(Blocks.sand.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("mars", "Mars", new Planet(0xd6905b, 0xbd723a, 0xbd9273, 3396190, 16487781L, 24623L, 3.71f, 208.0f)
|
||||
.setPerlinGen(Blocks.red_sand.getState(),
|
||||
Blocks.air.getState(), 63).setTimeQualifier(1), "sol");
|
||||
registerPlanet("jupiter", "Jupiter", new Planet(0xffd5ba, 0xb89f90, 0xc7b5a9, 71492000, 103989391L, 9925L, 24.79f, 163.0f).enableDenseFog()
|
||||
.setFlatGen(Blocks.hydrogen.getState(), 256).setTimeQualifier(1).setCloudHeight(576.0f), "sol");
|
||||
registerPlanet("saturn", "Saturn", new Planet(0xf1d1a1, 0xd3b385, 0xeed7b5, 60268000, 258141008L, 10656L, 10.44f, 133.0f).enableDenseFog()
|
||||
.setFlatGen(Blocks.hydrogen.getState(), 256).setTimeQualifier(1).setCloudHeight(576.0f), "sol");
|
||||
registerPlanet("uranus", "Uranus", new Planet(0xcee6ff, 0xadd2f9, 0x8eb0d3, 25559000, 736503770L, 17240L, 8.87f, 78.0f)
|
||||
.setPerlinGen(Blocks.packed_ice.getState(), Blocks.water.getState(), 70)
|
||||
.addOre(Blocks.diamond_ore.getState(), 4, 4, 12, 0, 60, false)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("neptune", "Neptun", new Planet(0xb4d9ff, 0x85bef9, 0x649bd3, 24764000, 1444584441L, 16110L, 11.15f, 72.0f)
|
||||
.setPerlinGen(Blocks.packed_ice.getState(), Blocks.water.getState(), 70)
|
||||
.addOre(Blocks.diamond_ore.getState(), 4, 2, 1, 0, 60, false)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("ceres", "Ceres", new Planet(0x666666, 0x535353, 0x858585, 473000, 40315496L, 9074L, 0.27f, 167.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("pluto", "Pluto", new Planet(0x666666, 0x535353, 0x858585, 1188300, 2173127098L, 153293L, 0.62f, 40.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("haumea", "Haumea", new Planet(0x666666, 0x535353, 0x858585, 816000, 2487831667L, 3914L, 0.63f, 48.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("makemake", "Makemake", new Planet(0x666666, 0x535353, 0x858585, 715000, 2684193293L, 22826L, 0.4f, 30.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
registerPlanet("eris", "Eris", new Planet(0x666666, 0x535353, 0x858585, 1163000, 4900274496L, 378862L, 0.82f, 30.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63)
|
||||
.setTimeQualifier(1), "sol");
|
||||
|
||||
registerStar("girok", "Gi'rok", new Star(0xff8f00, 603421976, 232.0f, 5220.0f, Blocks.lava.getState(), 112).setTimeQualifier(2), "solar");
|
||||
registerPlanet("gharoth", "'Elbenplanet Gharoth'", new Planet(0xffffffff, 0xc0d8ff, 0xffffff, 2806382, 4837386L, 52960L, 30.0f, 10.0f, 257.3f)
|
||||
.setTimeQualifier(2).setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVENFOREST)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.thetium_ore.getState(), 1, 0, 3, 0, 14, false)
|
||||
.addOre(Blocks.gyriyn_ore.getState(), 0, 2, 3, 0, 12, false), "girok");
|
||||
registerPlanet("transylvania", "'Vampirplanet Transsylvanien'", new Planet(0xffffffff, 0xc0d8ff, 0xffffff, 8374921, 33850466L, 49760L, 20.0f, 10.0f, 255.5f)
|
||||
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.water.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.gravel.getState()).setBiomeGen(Biome.FOREST, true, 5, 3, 3, 30)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.coal_ore.getState(), 12, 0, 14, 4, 28, false)
|
||||
.addOre(Blocks.lead_ore.getState(), 2, 0, 8, 0, 8, false)
|
||||
.addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
.addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), "girok");
|
||||
registerMoon("yrdinath", "'Eismond Yrdinath'", new Moon(0xccccff, 0xccccff, 2503812, 46743637L, 17460L, 2.5f, 239.15f, 8).setTimeQualifier(4)
|
||||
.setPerlinGen(Blocks.snow.getState(), Blocks.ice.getState(), 63).setBiome(Biome.SNOWLAND)
|
||||
.enableMobs().enableSnow().setDefaultWeather(Weather.SNOW), "transylvania");
|
||||
registerMoon("mythril", "'Eismond Mythril'", new Moon(0xbbbbff, 0xbbbbff, 2213749, 42659432L, 15330L, 2.25f, 221.65f, 8).setTimeQualifier(4)
|
||||
.setPerlinGen(Blocks.snow.getState(), Blocks.ice.getState(), 63).setBiome(Biome.SNOWLAND)
|
||||
.enableMobs().enableSnow().setDefaultWeather(Weather.SNOW), "transylvania");
|
||||
registerPlanet("mesar", "'Wüstenplanet Me'sar'", new Planet(0xff7f3f, 0xff6022, 0xff6f00, 9823183, 56643366L, 87340L, 11.0f, 333.15f)
|
||||
.setTimeQualifier(5).setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.red_sand.getState())
|
||||
.setBiomeGen(Biome.MESA, true, 3, 1000, 100000, 100000)
|
||||
.enableCavesRavines(Blocks.lava.getState()).enableMobs()
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.iron_ore.getState(), 6, 2, 24, 0, 64, false)
|
||||
.addOre(Blocks.gold_ore.getState(), 4, 2, 20, 0, 48, false)
|
||||
.addOre(Blocks.lead_ore.getState(), 6, 0, 14, 0, 32, false)
|
||||
.addOre(Blocks.copper_ore.getState(), 8, 2, 12, 0, 52, false)
|
||||
.addOre(Blocks.coal_ore.getState(), 8, 4, 30, 0, 16, false)
|
||||
.addOre(Blocks.stone.getState(), 8, 4, 33, 0, 80, false), "girok");
|
||||
registerGalaxy("milkyway", "Galaxie Milchstraße", () -> {
|
||||
registerSector("Solar", () -> {
|
||||
registerStar("Sol", 695508000, 274.0f, 5778.0f, () -> {
|
||||
registerPlanet("Terra", new Planet(6378136, 8766144L, 24000L, 28.0f, 9.81f, 259.15f)
|
||||
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.gravel.getState())
|
||||
.setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOMPLAINS).enableMobs().enableSnow()
|
||||
.setFrostBiomes(Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.COLDTAIGA, Biome.MEGATAIGA)
|
||||
.setColdBiomes(Biome.FOREST, Biome.EXTREMEHILLS, Biome.TAIGA, Biome.PLAINS)
|
||||
.setMediumBiomes(Biome.FOREST, Biome.ROOFEDFOREST, Biome.EXTREMEHILLS, Biome.PLAINS, Biome.BIRCHFOREST,
|
||||
Biome.SWAMPLAND, Biome.JUNGLE)
|
||||
.setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAINS)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(8)
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addMetalOres(MetalType.values())
|
||||
.addOre(Blocks.dirt.getState(), 10, 0, 33, 0, 256, false)
|
||||
.addOre(Blocks.gravel.getState(), 8, 0, 33, 0, 256, false)
|
||||
.addOre(Blocks.rock.getState(), 6, 0, 22, 24, 72, false)
|
||||
.addOre(Blocks.coal_ore.getState(), 20, 0, 17, 0, 128, false)
|
||||
.addOre(Blocks.charge_ore.getState(), 8, 0, 8, 0, 16, false)
|
||||
.addOre(Blocks.lapis_ore.getState(), 1, 0, 7, 16, 16, true)
|
||||
.addOre(Blocks.diamond_ore.getState(), 1, 0, 8, 0, 16, false)
|
||||
.addOre(Blocks.ruby_ore.getState(), 1, 0, 4, 12, 8, true)
|
||||
.addOre(Blocks.cinnabar_ore.getState(), 1, 0, 11, 0, 24, false)
|
||||
.enableVillages().enableMineshafts().enableScattered().enableStrongholds(), () -> {
|
||||
registerMoon("Luna", 1737100, 655728L, 1.62f, 210.0f);
|
||||
});
|
||||
registerPlanet("mercury", "Planet Merkur", new Planet(0x666666, 0x535353, 0x858585, 2440530, 2111297L, 1407509L, 3.7f, 440.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63));
|
||||
registerPlanet("Venus", new Planet(0xc0c0c0, 0xa0a0a0, 0xe0e0e0, 6051800, 5392908L, 5832449L, 8.87f, 737.0f)
|
||||
.setPerlinGen(Blocks.sand.getState(), Blocks.air.getState(), 63));
|
||||
registerPlanet("Mars", new Planet(0xd6905b, 0xbd723a, 0xbd9273, 3396190, 16487781L, 24623L, 3.71f, 208.0f)
|
||||
.setPerlinGen(Blocks.red_sand.getState(), Blocks.air.getState(), 63), () -> {
|
||||
registerMoon("Phobos", 11080, 7654L, 0.0057f, 233.0f);
|
||||
registerMoon("Deimos", 6270, 30312L, 0.003f, 233.0f);
|
||||
});
|
||||
registerPlanet("Jupiter", new Planet(0xffd5ba, 0xb89f90, 0xc7b5a9, 71492000, 103989391L, 9925L, 24.79f, 163.0f).enableDenseFog()
|
||||
.setFlatGen(Blocks.hydrogen.getState(), 256).setCloudHeight(576.0f), () -> {
|
||||
|
||||
});
|
||||
registerPlanet("Saturn", new Planet(0xf1d1a1, 0xd3b385, 0xeed7b5, 60268000, 258141008L, 10656L, 10.44f, 133.0f).enableDenseFog()
|
||||
.setFlatGen(Blocks.hydrogen.getState(), 256).setCloudHeight(576.0f), () -> {
|
||||
|
||||
});
|
||||
registerPlanet("Uranus", new Planet(0xcee6ff, 0xadd2f9, 0x8eb0d3, 25559000, 736503770L, 17240L, 8.87f, 78.0f)
|
||||
.setPerlinGen(Blocks.packed_ice.getState(), Blocks.water.getState(), 70)
|
||||
.addOre(Blocks.diamond_ore.getState(), 4, 4, 12, 0, 60, false), () -> {
|
||||
|
||||
});
|
||||
registerPlanet("neptune", "Planet Neptun", new Planet(0xb4d9ff, 0x85bef9, 0x649bd3, 24764000, 1444584441L, 16110L, 11.15f, 72.0f)
|
||||
.setPerlinGen(Blocks.packed_ice.getState(), Blocks.water.getState(), 70)
|
||||
.addOre(Blocks.diamond_ore.getState(), 4, 2, 1, 0, 60, false), () -> {
|
||||
registerMoon("Triton", 1353400, 141044L, 0.779f, 38.0f);
|
||||
// registerMoon("Nereid", , L, f, .0f);
|
||||
// registerMoon("Naiad", , L, f, .0f);
|
||||
// registerMoon("Thalassa", , L, f, .0f);
|
||||
// registerMoon("Despina", , L, f, .0f);
|
||||
// registerMoon("Galatea", , L, f, .0f);
|
||||
// registerMoon("Larissa", , L, f, .0f);
|
||||
// registerMoon("Proteus", , L, f, .0f);
|
||||
// registerMoon("Halimede", , L, f, .0f);
|
||||
// registerMoon("Psamathe", , L, f, .0f);
|
||||
// registerMoon("Sao", , L, f, .0f);
|
||||
// registerMoon("Laomedeia", , L, f, .0f);
|
||||
// registerMoon("Neso", , L, f, .0f);
|
||||
// registerMoon("Hippocamp", , L, f, .0f);
|
||||
});
|
||||
registerPlanet("Ceres", new Planet(0x666666, 0x535353, 0x858585, 473000, 40315496L, 9074L, 0.27f, 167.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63));
|
||||
registerPlanet("Pluto", new Planet(0x666666, 0x535353, 0x858585, 1188300, 2173127098L, 153293L, 0.62f, 40.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63), () -> {
|
||||
registerMoon("Charon", 606000, 153293L, 0.288f, 53.0f);
|
||||
registerMoon("Nix", 22500, 596511L, 0.0028f, 38.0f);
|
||||
registerMoon("Hydra", 27500, 916842L, 0.051f, 23.0f);
|
||||
registerMoon("Kerberos", 7000, 772021L, 0.0015f, 19.0f);
|
||||
registerMoon("Styx", 5500, 483877L, 77760L, 0.0013f, 18.0f);
|
||||
});
|
||||
registerPlanet("Haumea", new Planet(0x666666, 0x535353, 0x858585, 816000, 2487831667L, 3914L, 0.63f, 48.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63));
|
||||
registerPlanet("Makemake", new Planet(0x666666, 0x535353, 0x858585, 715000, 2684193293L, 22826L, 0.4f, 30.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63));
|
||||
registerPlanet("Eris", new Planet(0x666666, 0x535353, 0x858585, 1163000, 4900274496L, 378862L, 0.82f, 30.0f)
|
||||
.setPerlinGen(Blocks.moon_rock.getState(), Blocks.air.getState(), 63));
|
||||
});
|
||||
registerStar("Gi'rok", 603421976, 232.0f, 5220.0f, () -> {
|
||||
registerPlanet("gharoth", "Elbenplanet Gharoth", new Planet(2806382, 4837386L, 52960L, 30.0f, 10.0f, 257.3f)
|
||||
.setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVENFOREST)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.thetium_ore.getState(), 1, 0, 3, 0, 14, false)
|
||||
.addOre(Blocks.gyriyn_ore.getState(), 0, 2, 3, 0, 12, false));
|
||||
registerPlanet("transylvania", "Vampirplanet Transsylvanien", new Planet(8374921, 33850466L, 49760L, 20.0f, 10.0f, 255.5f)
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.water.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.gravel.getState()).setBiomeGen(Biome.FOREST, true, 5, 3, 3, 30)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(10).enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.coal_ore.getState(), 12, 0, 14, 4, 28, false)
|
||||
.addOre(Blocks.lead_ore.getState(), 2, 0, 8, 0, 8, false)
|
||||
.addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
.addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), () -> {
|
||||
registerMoon("yrdinath", "Eismond Yrdinath", new Moon(0xccccff, 2503812, 46743637L, 17460L, 2.5f, 239.15f, Blocks.snow, Blocks.ice)
|
||||
.setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
registerMoon("mythril", "Eismond Mythril", new Moon(0xbbbbff, 2213749, 42659432L, 15330L, 2.25f, 221.65f, Blocks.snow, Blocks.ice)
|
||||
.setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
});
|
||||
registerPlanet("mesar", "Wüstenplanet Me'sar", new Planet(0xff7f3f, 0xff6022, 0xff6f00, 9823183, 56643366L, 87340L, 11.0f, 333.15f)
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.red_sand.getState())
|
||||
.setBiomeGen(Biome.MESA, true, 3, 1000, 100000, 100000)
|
||||
.enableCavesRavines(Blocks.lava.getState()).enableMobs()
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 20, 8, 255, true)
|
||||
.addOre(Blocks.iron_ore.getState(), 6, 2, 24, 0, 64, false)
|
||||
.addOre(Blocks.gold_ore.getState(), 4, 2, 20, 0, 48, false)
|
||||
.addOre(Blocks.lead_ore.getState(), 6, 0, 14, 0, 32, false)
|
||||
.addOre(Blocks.copper_ore.getState(), 8, 2, 12, 0, 52, false)
|
||||
.addOre(Blocks.coal_ore.getState(), 8, 4, 30, 0, 16, false)
|
||||
.addOre(Blocks.stone.getState(), 8, 4, 33, 0, 80, false));
|
||||
});
|
||||
});
|
||||
});
|
||||
registerGalaxy("Drkthrn", () -> {
|
||||
registerSector("blvck", "Sectvr Blvck", () -> {
|
||||
registerStar("Ov'rol", new Star(0x000000, 832718528, 302.0f, 12666.0f, Blocks.goo), () -> {
|
||||
registerPlanet("blackplanet", "Der Schwarze Planet", new Planet(0x000000, 0x000000, 0x000000, 13038204, 4632918508L, 204556L, 12.0f, 0.0f)
|
||||
.setPerlinGen(Blocks.blackened_stone.getState(), Blocks.goo.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.blackened_cobble.getState()).setBiome(Biome.BLACKENED)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs()
|
||||
.addLake(Blocks.goo.getState(), null, null, 8, 8, 255, true)
|
||||
// .addOre(Blocks.PLACEHOLDER_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
registerGalaxy("drkthrn", "Drkthrn");
|
||||
registerSector("blvck", "Blvck", "drkthrn");
|
||||
registerStar("ovrol", "Ov'rol", new Star(0x000000, 832718528, 302.0f, 12666.0f, Blocks.goo.getState(), 192), "blvck");
|
||||
registerPlanet("blackplanet", "'Schwarzplanet'", new Planet(0x000000, 0x000000, 0x000000, 13038204, 4632918508L, 204556L, 12.0f, 0.0f)
|
||||
.setPerlinGen(Blocks.blackened_stone.getState(), Blocks.goo.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.blackened_cobble.getState()).setBiome(Biome.BLACKENED)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs()
|
||||
.addLake(Blocks.goo.getState(), null, null, 8, 8, 255, true)
|
||||
// .addOre(Blocks.PLACEHOLDER_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
, "ovrol");
|
||||
|
||||
registerSemi("warp", "Der Warp", new Semi(0x0c001f, 0x0c001f, 0x190033, 124072917, 285.0f, 3).setCloudTexture(CloudType.DENSE).setCloudHeight(238.0f)
|
||||
registerSemi("warp", "Der Warp", new Semi(0x0c001f, 0x190033, 124072917, 285.0f, 3).setCloudTexture(CloudType.DENSE).setCloudHeight(238.0f)
|
||||
.setPerlinGen(Blocks.obsidian.getState(), Blocks.lava.getState(), 63)
|
||||
.setBiome(Biome.CHAOS).enableCavesRavines(Blocks.air.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.obsidian.getState(), 8, 0, 255, false)
|
||||
|
@ -442,45 +562,46 @@ public abstract class UniverseRegistry {
|
|||
.setStarBrightness(0.9f).setDeepStarBrightness(0.6f)
|
||||
.setStarColorSin(25.0f, 0.1f, 0.25f, 0xff00ff, 1, 4).setDeepStarColorSin(25.0f, 0.1f, 0.5f, 0xff00ff, 1, 4));
|
||||
|
||||
registerDomain("tianxin", "Tian'Xin");
|
||||
registerArea("nienrath", "Ni'enrath", new Area(0x7f00ff, 0x7f00ff, 532109, 276.15f, 1).setLightColor(0x07000f).setBlockColor(0xcf6fff)
|
||||
.setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN)
|
||||
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||
.addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false), "tianxin");
|
||||
|
||||
registerDomain("digital", "Digital");
|
||||
registerArea("cyberspace", "Cyberspace", new Area(0x000000, 0x000000, 16777216, 293.15f, 15).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction()
|
||||
.setFlatGen(Blocks.green_clay.getState(), 2)
|
||||
.enableMobs(), "digital");
|
||||
|
||||
registerDomain("hell", "Hölle");
|
||||
registerArea("thedric", "Kreis Thedric", new Area(0x330707, 0x330707, 105639735, 347.15f, 2).enableLongCaves().enableMobs().enableFortresses()
|
||||
.enableWorldCeiling().enableDenseFog()
|
||||
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.UPPERHELL), "hell");
|
||||
registerArea("kyroth", "Kreis Kyroth", new Area(0x990000, 0x990000, 86742970, 387.15f, 3).enableLongCaves().enableMobs()
|
||||
.setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.LOWERHELL)
|
||||
.addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true), "hell");
|
||||
registerArea("ahrd", "Kreis Ahrd", new Area(0xcc0000, 0xcc0000, 67028432, 467.15f, 15).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELLHILLS)
|
||||
.addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
||||
registerArea("mizorath", "Kreis Mizorath", new Area(0xff0000, 0xff0000, 54029584, 1067.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS), "hell");
|
||||
registerArea("dargoth", "Kreis Dargoth", new Area(0xff3f0c, 0xff3f0c, 43293629, 1707.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS), "hell");
|
||||
registerArea("aasirith", "Kreis Aasirith", new Area(0x191919, 0x191919, 36291872, 2482.0f, 1).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASHLAND)
|
||||
.addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true), "hell");
|
||||
registerDomain("Tian'Xin", () -> {
|
||||
registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1).setLightColor(0x07000f).setBlockColor(0xcf6fff)
|
||||
.setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN)
|
||||
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||
.addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false));
|
||||
});
|
||||
registerDomain("Digital", () -> {
|
||||
registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction()
|
||||
.setFlatGen(Blocks.green_clay.getState(), 2)
|
||||
.enableMobs());
|
||||
});
|
||||
registerDomain("hell", "Hölle", () -> {
|
||||
registerArea("thedric", "Kreis Thedric", new Area(0x330707, 105639735, 347.15f, 2).enableLongCaves().enableMobs().enableFortresses()
|
||||
.enableWorldCeiling().enableDenseFog()
|
||||
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.UPPERHELL));
|
||||
registerArea("kyroth", "Kreis Kyroth", new Area(0x990000, 86742970, 387.15f, 3).enableLongCaves().enableMobs()
|
||||
.setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.LOWERHELL)
|
||||
.addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true));
|
||||
registerArea("ahrd", "Kreis Ahrd", new Area(0xcc0000, 67028432, 467.15f, 15).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELLHILLS)
|
||||
.addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true));
|
||||
registerArea("mizorath", "Kreis Mizorath", new Area(0xff0000, 54029584, 1067.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS));
|
||||
registerArea("dargoth", "Kreis Dargoth", new Area(0xff3f0c, 43293629, 1707.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS));
|
||||
registerArea("aasirith", "Kreis Aasirith", new Area(0x191919, 36291872, 2482.0f, 1).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASHLAND)
|
||||
.addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,7 @@ public class ItemCharTemplate extends Item
|
|||
|
||||
public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
||||
Dimension dim = this.spawned.species.origin == null ? null : UniverseRegistry.getDimension(this.spawned.species.origin);
|
||||
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getNameString()));
|
||||
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay()));
|
||||
}
|
||||
|
||||
public boolean onItemUse(ItemStack stack, EntityNPC playerIn, World worldIn, BlockPos pos, Facing side, float hitX, float hitY, float hitZ)
|
||||
|
|
|
@ -57,7 +57,7 @@ public class ItemMobTemplate extends Item
|
|||
EntityInfo egg = EntityRegistry.DNA.get(this.entityId);
|
||||
if(egg != null) {
|
||||
Dimension dim = egg.origin() == null ? null : UniverseRegistry.getDimension(egg.origin());
|
||||
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getNameString()));
|
||||
tooltip.add(TextColor.ORANGE + "Herkunft: " + (dim == null ? "???" : dim.getDisplay()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,9 @@ public class ItemExterminator extends ItemMagnetic {
|
|||
if(world.dimension == Space.INSTANCE)
|
||||
player.connection.addHotbar(TextColor.RED + "Der Weltraum kann nicht zerstört werden (lol)");
|
||||
else if(!((AWorldServer)world).exterminate())
|
||||
player.connection.addHotbar(TextColor.YELLOW + "Die Welt %s ist bereits zerstört", world.dimension.getNameString());
|
||||
player.connection.addHotbar(TextColor.YELLOW + "Die Welt %s ist bereits zerstört", world.dimension.getDisplay());
|
||||
else
|
||||
player.connection.addHotbar(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getNameString());
|
||||
player.connection.addHotbar(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getDisplay());
|
||||
|
||||
// if (!playerIn.capabilities.isCreativeMode)
|
||||
// {
|
||||
|
|
|
@ -16,7 +16,7 @@ public class ItemScanner extends ItemWand {
|
|||
public void onUse(ItemStack stack, EntityNPC player, AWorldServer world, Vec3 vec)
|
||||
{
|
||||
Biome biome = world.getBiomeGenForCoords(new BlockPos(vec.xCoord, 0, vec.zCoord));
|
||||
player.connection.addHotbar(TextColor.NEON + "* Position in %s: %.3f %.3f %.3f, %s, %.2f °C", world.dimension.getNameString(),
|
||||
player.connection.addHotbar(TextColor.NEON + "* Position in %s: %.3f %.3f %.3f, %s, %.2f °C", world.dimension.getDisplay(),
|
||||
vec.xCoord, vec.yCoord, vec.zCoord,
|
||||
biome.display, world.getTemperatureC(new BlockPos(vec)));
|
||||
}
|
||||
|
|
|
@ -16,19 +16,19 @@ public class ItemSpaceNavigator extends ItemMagnetic {
|
|||
|
||||
public String getHotbarText(EntityNPC player, ItemStack stack) {
|
||||
BlockPos pos = player.getPosition();
|
||||
return TextColor.ORANGE + player.worldObj.formatImperialTime(false) + " / " +
|
||||
String.format("%s bei %d, %d, %d", player.worldObj.dimension.getNameString() + TextColor.ORANGE,
|
||||
return TextColor.ORANGE + player.worldObj.formatImperialTime(player, false) + " / " +
|
||||
String.format("%s bei %d, %d, %d", player.worldObj.dimension.getDisplay() + TextColor.ORANGE,
|
||||
pos.getX(), pos.getY(), pos.getZ());
|
||||
}
|
||||
|
||||
public void addInformation(ItemStack stack, EntityNPC player, List<String> tooltip) {
|
||||
tooltip.add(TextColor.ORANGE + player.worldObj.formatImperialTime(true));
|
||||
tooltip.add(TextColor.ORANGE + player.worldObj.formatImperialTime(player, true));
|
||||
String[] dims = player.worldObj.dimension.getBaseNames();
|
||||
for(int z = dims.length - 1; z >= 0; z--) {
|
||||
tooltip.add(TextColor.ORANGE + dims[z]);
|
||||
}
|
||||
BlockPos pos = player.getPosition();
|
||||
tooltip.add(TextColor.ORANGE + String.format("%s bei %d, %d, %d", player.worldObj.dimension.getNameString()
|
||||
tooltip.add(TextColor.ORANGE + String.format("%s bei %d, %d, %d", player.worldObj.dimension.getDisplay()
|
||||
+ TextColor.ORANGE, pos.getX(), pos.getY(), pos.getZ()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,8 @@ public class SPacketCharacterList implements Packet<IClientPlayer> {
|
|||
BlockPos pos = buf.readBlockPos();
|
||||
String type = buf.readString(256);
|
||||
int level = buf.readVarInt();
|
||||
this.players.put(id, new PlayerCharacter(name, info, align, dim, pos, type, level));
|
||||
String origin = buf.readString(256);
|
||||
this.players.put(id, new PlayerCharacter(name, info, align, dim, pos, type, level, origin));
|
||||
}
|
||||
this.selected = buf.readVarInt();
|
||||
}
|
||||
|
@ -76,6 +77,7 @@ public class SPacketCharacterList implements Packet<IClientPlayer> {
|
|||
buf.writeBlockPos(chr.pos());
|
||||
buf.writeString(chr.type());
|
||||
buf.writeVarInt(chr.level());
|
||||
buf.writeString(chr.origin());
|
||||
}
|
||||
buf.writeVarInt(this.selected);
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ public class SPacketDimensionName implements Packet<IClientPlayer> {
|
|||
|
||||
public SPacketDimensionName(Dimension dim) {
|
||||
this.fullName = dim.getBaseNames();
|
||||
this.customName = dim.getCustomName();
|
||||
this.customName = dim.getDisplay();
|
||||
}
|
||||
|
||||
public void processPacket(IClientPlayer handler) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class SPacketRespawn implements Packet<IClientPlayer> {
|
|||
}
|
||||
if(dim.isCustom()) {
|
||||
this.dimName = UniverseRegistry.getName(dim);
|
||||
this.dimDisplay = dim.getCustomName();
|
||||
this.dimDisplay = dim.getDisplay();
|
||||
this.dimFull = dim.getBaseNames();
|
||||
this.dimId = -1;
|
||||
}
|
||||
|
@ -115,7 +115,7 @@ public class SPacketRespawn implements Packet<IClientPlayer> {
|
|||
}
|
||||
if(!dim.isCustom())
|
||||
return dim;
|
||||
dim.setCustomName(this.dimDisplay);
|
||||
dim.setDisplay(this.dimDisplay);
|
||||
dim.setBaseNames(this.dimFull);
|
||||
return dim;
|
||||
}
|
||||
|
|
|
@ -5,19 +5,25 @@ import common.world.AWorldServer;
|
|||
|
||||
public class TileEntityDaylightDetector extends TileEntity implements ITickable
|
||||
{
|
||||
/**
|
||||
* Like the old updateEntity(), except more generic.
|
||||
*/
|
||||
private int updateTimer;
|
||||
|
||||
public void update()
|
||||
{
|
||||
if (this.worldObj != null && !this.worldObj.client && ((AWorldServer)this.worldObj).getTime() % 20L == 0L)
|
||||
if (this.worldObj != null && !this.worldObj.client)
|
||||
{
|
||||
this.blockType = this.getBlockType();
|
||||
|
||||
if (this.blockType instanceof BlockDaylightDetector)
|
||||
{
|
||||
((BlockDaylightDetector)this.blockType).updatePower((AWorldServer)this.worldObj, this.pos);
|
||||
}
|
||||
if(this.updateTimer <= 0) {
|
||||
this.blockType = this.getBlockType();
|
||||
|
||||
if (this.blockType instanceof BlockDaylightDetector)
|
||||
{
|
||||
((BlockDaylightDetector)this.blockType).updatePower((AWorldServer)this.worldObj, this.pos);
|
||||
}
|
||||
|
||||
this.updateTimer = 20;
|
||||
}
|
||||
else {
|
||||
--this.updateTimer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,6 @@ public abstract class AWorldServer extends World {
|
|||
public abstract int getSkylightSubtracted();
|
||||
public abstract boolean isBlockinHighHumidity(BlockPos pos);
|
||||
public abstract <T extends Entity> T findNearestEntityWithinAABB(Class<? extends T> entityType, BoundingBox aabb, T closestTo);
|
||||
public abstract long getTime();
|
||||
public abstract void setBiome(BlockPos pos, Biome biome);
|
||||
public abstract void markChunkDirty(BlockPos pos);
|
||||
}
|
||||
|
|
|
@ -20,12 +20,19 @@ import common.collect.Lists;
|
|||
import common.collect.Sets;
|
||||
import common.dimension.DimType;
|
||||
import common.dimension.Dimension;
|
||||
import common.dimension.Galaxy;
|
||||
import common.dimension.Moon;
|
||||
import common.dimension.Planet;
|
||||
import common.dimension.Sector;
|
||||
import common.dimension.Space;
|
||||
import common.dimension.Star;
|
||||
import common.entity.Entity;
|
||||
import common.entity.item.EntityExplosion;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.BlockRegistry;
|
||||
import common.init.Blocks;
|
||||
import common.init.SoundEvent;
|
||||
import common.init.UniverseRegistry;
|
||||
import common.item.ItemStack;
|
||||
import common.rng.Random;
|
||||
import common.tileentity.ITickable;
|
||||
|
@ -57,7 +64,6 @@ public abstract class World implements IWorldAccess {
|
|||
public static final int MAX_SIZE_Y = 4096;
|
||||
public static final long START_TIME = 4385238000L;
|
||||
public static final float ABSOLUTE_ZERO = -273.15f;
|
||||
public static final long EARTH_YEAR = 8766144L;
|
||||
|
||||
public final boolean client;
|
||||
public final Random rand = new Random();
|
||||
|
@ -131,20 +137,65 @@ public abstract class World implements IWorldAccess {
|
|||
if(Math.abs(this.gravity) < 0.075)
|
||||
this.gravity = 0.0;
|
||||
}
|
||||
|
||||
private int getTimeQualifier(Planet homePlanet) {
|
||||
if(this.dimension == Space.INSTANCE)
|
||||
return 7;
|
||||
else if(this.dimension.getType() == DimType.SEMI)
|
||||
return 8;
|
||||
else if(this.dimension.getType() == DimType.AREA)
|
||||
return 9;
|
||||
if(this.dimension == homePlanet)
|
||||
return 0;
|
||||
Star homeStar = UniverseRegistry.getStar(homePlanet);
|
||||
if(this.dimension == homeStar)
|
||||
return 3;
|
||||
Moon moon = this.dimension.getType() == DimType.MOON ? (Moon)this.dimension : null;
|
||||
Planet planet = this.dimension.getType() == DimType.PLANET ? (Planet)this.dimension : (moon != null ? UniverseRegistry.getPlanet(moon) : null);
|
||||
if(planet == homePlanet)
|
||||
return 1;
|
||||
Star star = this.dimension.getType() == DimType.STAR ? (Star)this.dimension : (planet != null ? UniverseRegistry.getStar(planet) : null);
|
||||
if(star == homeStar)
|
||||
return 2;
|
||||
Sector homeSector = UniverseRegistry.getSector(homeStar);
|
||||
Sector sector = star != null ? UniverseRegistry.getSector(star) : null;
|
||||
if(sector == homeSector)
|
||||
return 4;
|
||||
if(sector != null && UniverseRegistry.getGalaxy(sector) == UniverseRegistry.getGalaxy(homeSector))
|
||||
return 5;
|
||||
return 6;
|
||||
}
|
||||
|
||||
public String formatImperialTime(boolean days) {
|
||||
public String formatImperialTime(Dimension home, boolean days) {
|
||||
String qualifier = home != null ? (home.getType() == DimType.PLANET ? this.getTimeQualifier((Planet)home) + "." : "?.") : "";
|
||||
long time = this.daytime;
|
||||
long year = time / EARTH_YEAR;
|
||||
long frac = (time * 1000L / EARTH_YEAR) % 1000L;
|
||||
if(!this.dimension.getType().celestial) {
|
||||
return String.format("%d.%03d.%03d.M%d" + (days ? " T???.??? D???.???.G?" : ""), this.dimension.getTimeQualifier(),
|
||||
frac, year % 1000L, year / 1000L + 1L);
|
||||
String gtime;
|
||||
if((home == null || !home.getType().celestial) && !this.dimension.getType().celestial) {
|
||||
gtime = "???.???.M?";
|
||||
}
|
||||
long day = time / this.dimension.getRotationalPeriod();
|
||||
time = time % this.dimension.getRotationalPeriod();
|
||||
return String.format("%d.%03d.%03d.M%d" + (days ? " T%03d.%03d D%03d.%03d.G%d" : ""), this.dimension.getTimeQualifier(),
|
||||
frac, year % 1000L, year / 1000L + 1L,
|
||||
time / 1000L, time % 1000L, (day / 1000L) % 1000L, day % 1000L, day / 1000000L);
|
||||
else {
|
||||
long yearTime = (home != null && home.getType().celestial ? home : this.dimension).getOrbitalPeriod();
|
||||
long year = time / yearTime;
|
||||
long frac = (time * 1000L / yearTime) % 1000L;
|
||||
gtime = String.format("%03d.%03d.M%d", frac, year % 1000L, year / 1000L + 1L);
|
||||
}
|
||||
if(!days)
|
||||
return qualifier + gtime;
|
||||
String ltime;
|
||||
if(!this.dimension.getType().celestial) {
|
||||
ltime = " T???.??? D???.???.G?";
|
||||
}
|
||||
else {
|
||||
long day = time / this.dimension.getRotationalPeriod();
|
||||
time = time % this.dimension.getRotationalPeriod();
|
||||
ltime = String.format(" T%03d.%03d D%03d.%03d.G%d",
|
||||
time / 1000L, time % 1000L, (day / 1000L) % 1000L, day % 1000L, day / 1000000L);
|
||||
}
|
||||
return qualifier + gtime + ltime;
|
||||
}
|
||||
|
||||
public String formatImperialTime(EntityNPC player, boolean days) {
|
||||
return this.formatImperialTime(player == null ? null : player.getOrigin().getDimension(), days);
|
||||
}
|
||||
|
||||
public abstract Biome getBiomeGenForCoords(BlockPos pos);
|
||||
|
|
|
@ -307,7 +307,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
TagObject data = new TagObject();
|
||||
data.setString("Type", dim.getType().getName());
|
||||
data.setString("Name", UniverseRegistry.getName(dim));
|
||||
data.setString("CustomName", dim.getCustomName());
|
||||
data.setString("CustomName", dim.getDisplay());
|
||||
switch(dim.getType()) {
|
||||
case AREA:
|
||||
data.setString("Domain", UniverseRegistry.getDomain((Area)dim).id);
|
||||
|
@ -330,7 +330,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
TagObject data = new TagObject();
|
||||
data.setString("Type", "sector");
|
||||
data.setString("Name", sector.id);
|
||||
data.setString("CustomName", sector.getCustomName());
|
||||
data.setString("CustomName", sector.getDisplay());
|
||||
data.setString("Galaxy", UniverseRegistry.getGalaxy(sector).id);
|
||||
list.add(data);
|
||||
}
|
||||
|
@ -340,7 +340,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
TagObject data = new TagObject();
|
||||
data.setString("Type", "galaxy");
|
||||
data.setString("Name", galaxy.id);
|
||||
data.setString("CustomName", galaxy.getCustomName());
|
||||
data.setString("CustomName", galaxy.getDisplay());
|
||||
list.add(data);
|
||||
}
|
||||
}
|
||||
|
@ -349,7 +349,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
TagObject data = new TagObject();
|
||||
data.setString("Type", "domain");
|
||||
data.setString("Name", domain.id);
|
||||
data.setString("CustomName", domain.getCustomName());
|
||||
data.setString("CustomName", domain.getDisplay());
|
||||
list.add(data);
|
||||
}
|
||||
}
|
||||
|
@ -440,7 +440,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
}
|
||||
dim.readData(tag == null ? new TagObject() : tag);
|
||||
if(tag == null || !tag.hasLong("Seed"))
|
||||
Log.TICK.info("Startwert für %s: %d" + (Vars.seed.isEmpty() ? "" : " von Basiswert '%s'"), dim.getNameString(), dim.getSeed(), Vars.seed);
|
||||
Log.TICK.info("Startwert für %s: %d" + (Vars.seed.isEmpty() ? "" : " von Basiswert '%s'"), dim.getDisplay(), dim.getSeed(), Vars.seed);
|
||||
}
|
||||
|
||||
private void saveDimension(Dimension dim) {
|
||||
|
@ -1081,7 +1081,7 @@ public final class Server implements IThreadListener, Executor {
|
|||
if(message != null)
|
||||
conn.addHotbar(TextColor.DRED + message);
|
||||
conn.addFeed(TextColor.RED + "* Bei %d, %d, %d in Dimension %s gestorben", pos.getX(), pos.getY(), pos.getZ(),
|
||||
old.worldObj.dimension.getNameString());
|
||||
old.worldObj.dimension.getDisplay());
|
||||
}
|
||||
|
||||
public TagObject swapPlayer(Player conn, TagObject tag, Class<? extends EntityNPC> clazz) {
|
||||
|
|
|
@ -20,7 +20,7 @@ public class WorldParser extends DimensionParser {
|
|||
Dimension dim = (Dimension)super.parse(env, input);
|
||||
WorldServer world = this.loadedOnly ? env.getServer().getWorldNoLoad(dim) : env.getServer().getWorld(dim);
|
||||
if(world == null)
|
||||
throw new RunException("Dimension '%s' ist nicht geladen", dim.getNameString());
|
||||
throw new RunException("Dimension '%s' ist nicht geladen", dim.getDisplay());
|
||||
return world;
|
||||
}
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public class CommandBlock extends Command {
|
|||
}
|
||||
}
|
||||
if(success)
|
||||
exec.log("%s bei %d, %d, %d in %s gesetzt", state.getBlock().getDisplay(), position.getX(), position.getY(), position.getZ(), world.dimension.getNameString());
|
||||
exec.log("%s bei %d, %d, %d in %s gesetzt", state.getBlock().getDisplay(), position.getX(), position.getY(), position.getZ(), world.dimension.getDisplay());
|
||||
else
|
||||
exec.log("Block wurde nicht verändert");
|
||||
return success;
|
||||
|
|
|
@ -27,7 +27,7 @@ public class CommandDeathspot extends Command {
|
|||
throw new RunException("%s hat keinen letzten Todespunkt", player.getCommandName());
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(pos);
|
||||
exec.log("%s zum Todespunkt von %s (%d, %d, %d in %s) teleportiert", entity.getCommandName(), player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s zum Todespunkt von %s (%d, %d, %d in %s) teleportiert", entity.getCommandName(), player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -20,6 +20,6 @@ public class CommandDelwarp extends Command {
|
|||
throw new RunException("Warp '%s' existiert nicht", warp);
|
||||
Position pos = env.getServer().getWarps().remove(warp);
|
||||
Dimension wdim = pos.getDimension();
|
||||
exec.log("Warp %s bei %d, %d, %d in %s entfernt", warp, ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), wdim == null ? "<?>" : wdim.getNameString());
|
||||
exec.log("Warp %s bei %d, %d, %d in %s entfernt", warp, ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), wdim == null ? "<?>" : wdim.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,13 +28,13 @@ public class CommandEntity extends Command {
|
|||
entity.writeTags(etag);
|
||||
if(tag == null) {
|
||||
exec.log("************************************************************");
|
||||
exec.log("Daten von %s bei %d, %d, %d in %s:", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getNameString());
|
||||
exec.log("Daten von %s bei %d, %d, %d in %s:", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay());
|
||||
exec.log(etag.format(4));
|
||||
}
|
||||
else {
|
||||
etag.merge(tag);
|
||||
entity.readTags(etag);
|
||||
exec.log("Daten von %s bei %d, %d, %d in %s geändert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getNameString());
|
||||
exec.log("Daten von %s bei %d, %d, %d in %s geändert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay());
|
||||
}
|
||||
done++;
|
||||
}
|
||||
|
|
|
@ -19,9 +19,9 @@ public class CommandExterminatus extends Command {
|
|||
if(world.dimension == Space.INSTANCE)
|
||||
throw new RunException("Der Weltraum kann nicht zerstört werden (lol?)");
|
||||
else if(world.isExterminated())
|
||||
throw new RunException("Dimension %s ist bereits zerstört", world.dimension.getNameString());
|
||||
exec.log(TextColor.YELLOW + "Dimension %s wird zerstört ...", world.dimension.getNameString());
|
||||
throw new RunException("Dimension %s ist bereits zerstört", world.dimension.getDisplay());
|
||||
exec.log(TextColor.YELLOW + "Dimension %s wird zerstört ...", world.dimension.getDisplay());
|
||||
world.exterminate();
|
||||
exec.log(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getNameString());
|
||||
exec.log(TextColor.CRIMSON + "Die Welt %s wurde vernichtet >:)-", world.dimension.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class CommandFind extends Command {
|
|||
for(Entity entity : entities) {
|
||||
if(entity.isEntityAlive()) {
|
||||
BlockPos pos = entity.getPosition();
|
||||
exec.log("%s bei %d, %d, %d in %s gefunden %s", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getNameString(),
|
||||
exec.log("%s bei %d, %d, %d in %s gefunden %s", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), entity.worldObj.dimension.getDisplay(),
|
||||
asCommand(TextColor.RESET, "tp #%d", entity.getId()));
|
||||
done++;
|
||||
}
|
||||
|
|
|
@ -12,7 +12,6 @@ import common.dimension.DimType;
|
|||
import common.dimension.Dimension;
|
||||
import common.dimension.Planet;
|
||||
import common.dimension.Star;
|
||||
import common.init.Blocks;
|
||||
import common.init.NameRegistry;
|
||||
import common.init.UniverseRegistry;
|
||||
import common.rng.Random;
|
||||
|
@ -36,7 +35,6 @@ public class CommandLoad extends Command {
|
|||
if(!UniverseRegistry.isType(star, DimType.STAR) || UniverseRegistry.isRegistered(name))
|
||||
return null;
|
||||
Planet dim = new Planet(sky, fog, clouds, 17000000, orbit, rotation, offset, gravity, temperature, brightness);
|
||||
dim.setTimeQualifier(3);
|
||||
return UniverseRegistry.registerCustomPlanet(name, custom, dim, star);
|
||||
}
|
||||
|
||||
|
@ -59,13 +57,12 @@ public class CommandLoad extends Command {
|
|||
do {
|
||||
sname = NameRegistry.FANTASY.generate(rand, rand.range(2, 5));
|
||||
} while(UniverseRegistry.isRegistered(sname.toLowerCase()));
|
||||
Star star = new Star(0xff0000 | (rand.range(0x60, 0xa0) << 8), rand.range(300000000, 1200000000),
|
||||
rand.frange(200.0f, 400.0f), rand.frange(5000.0f, 7000.0f),
|
||||
rand.pick(Blocks.lava.getState(), Blocks.magma.getState()), rand.range(64, 212));
|
||||
UniverseRegistry.registerCustomGalaxy(galaxy.toLowerCase(), galaxy);
|
||||
UniverseRegistry.registerCustomSector(sector.toLowerCase(), sector, galaxy.toLowerCase());
|
||||
Star star = new Star(rand.range(300000000, 1200000000),
|
||||
rand.frange(200.0f, 400.0f), rand.frange(5000.0f, 7000.0f));
|
||||
UniverseRegistry.registerCustomGalaxy(galaxy.toLowerCase(), "Galaxie " + galaxy);
|
||||
UniverseRegistry.registerCustomSector(sector.toLowerCase(), "Sektor " + sector, galaxy.toLowerCase());
|
||||
UniverseRegistry.registerCustomStar(sname.toLowerCase(), sname, star, galaxy.toLowerCase());
|
||||
UniverseRegistry.registerCustomPlanet(pname.toLowerCase(), pname, (Planet)preset, sname.toLowerCase());
|
||||
UniverseRegistry.registerCustomPlanet(pname.toLowerCase(), "Planet " + pname, (Planet)preset, sname.toLowerCase());
|
||||
}
|
||||
else if(preset.getType() == DimType.AREA) {
|
||||
String domain;
|
||||
|
@ -95,7 +92,7 @@ public class CommandLoad extends Command {
|
|||
this.addColor("sky", 's', 0xffffffff);
|
||||
this.addColor("fog", 'f', 0xc0d8ff);
|
||||
this.addColor("clouds", 'w', 0xffffff);
|
||||
this.addLong("orbit", 'o', 1L, 1000000000000L, World.EARTH_YEAR);
|
||||
this.addLong("orbit", 'o', 1L, 1000000000000L, 8000000L);
|
||||
this.addLong("rotation", 'r', 1L, 1000000000000L, 24000L);
|
||||
this.addDouble("offset", 'm', 0.0, 100000.0, 0.0);
|
||||
this.addDouble("gravity", 'g', 0.0, 100000.0, 9.81);
|
||||
|
|
|
@ -33,7 +33,7 @@ public class CommandOfflinetp extends Command {
|
|||
throw new RunException("Spieler '%s' konnte nicht gefunden werden", user);
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(pos);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ public class CommandPlayers extends Command {
|
|||
exec.log(TextColor.GREEN + "Es " + (players.size() == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Spieler online", players.size());
|
||||
for(Player player : players) {
|
||||
EntityNPC entity = player.getPresentEntity();
|
||||
exec.log("%s%s" + TextColor.GRAY + ": '%s" + TextColor.GRAY + "'" + (coords && entity != null ? " [" + TextColor.ORANGE + "%s @ %d, %d, %d" + TextColor.GRAY + "]" : ""), player.isAdmin() ? TextColor.RED : TextColor.NEON, player.getUser(), entity == null ? TextColor.DGRAY + "<->" : TextColor.ACID + entity.getCommandName(), entity == null ? null : entity.worldObj.dimension.getNameString(), entity == null ? null : ExtMath.floord(entity.posX), entity == null ? null : ExtMath.floord(entity.posY), entity == null ? null : ExtMath.floord(entity.posZ));
|
||||
exec.log("%s%s" + TextColor.GRAY + ": '%s" + TextColor.GRAY + "'" + (coords && entity != null ? " [" + TextColor.ORANGE + "%s @ %d, %d, %d" + TextColor.GRAY + "]" : ""), player.isAdmin() ? TextColor.RED : TextColor.NEON, player.getUser(), entity == null ? TextColor.DGRAY + "<->" : TextColor.ACID + entity.getCommandName(), entity == null ? null : entity.worldObj.dimension.getDisplay(), entity == null ? null : ExtMath.floord(entity.posX), entity == null ? null : ExtMath.floord(entity.posY), entity == null ? null : ExtMath.floord(entity.posZ));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@ public class CommandReset extends Command {
|
|||
}
|
||||
|
||||
public void exec(CommandEnvironment env, Executor exec, WorldServer world) {
|
||||
exec.log("Dimension %s wird zurückgesetzt ...", world.dimension.getNameString());
|
||||
exec.log("Dimension %s wird zurückgesetzt ...", world.dimension.getDisplay());
|
||||
world.reset();
|
||||
exec.log("Dimension %s zurückgesetzt", world.dimension.getNameString());
|
||||
exec.log("Dimension %s zurückgesetzt", world.dimension.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CommandReturn extends Command {
|
|||
Position pos = ((Player)player.connection).getLastTeleport();
|
||||
if(pos != null) {
|
||||
player.teleport(pos);
|
||||
exec.log("%s zum letzten Punkt (%d, %d, %d in %s) teleportiert", player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s zum letzten Punkt (%d, %d, %d in %s) teleportiert", player.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
done++;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,7 @@ public class CommandSeed extends Command {
|
|||
public Object exec(CommandEnvironment env, Executor exec, WorldServer world, boolean dump) {
|
||||
if(dump)
|
||||
exec.log("Daten: %s", world.dimension.dumpTags().format(4));
|
||||
exec.log("Startwert von %s: %d", world.dimension.getNameString(), world.dimension.getSeed());
|
||||
exec.log("Startwert von %s: %d", world.dimension.getDisplay(), world.dimension.getSeed());
|
||||
return world.dimension.getSeed();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,13 +28,13 @@ public class CommandSetwarp extends Command {
|
|||
Position pos = env.getServer().getWarps().get(warp);
|
||||
Dimension wdim = pos.getDimension();
|
||||
if(wdim != null)
|
||||
exec.log("Alte Position %d, %d, %d in %s entfernt", ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), dim.getNameString());
|
||||
exec.log("Alte Position %d, %d, %d in %s entfernt", ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), dim.getDisplay());
|
||||
}
|
||||
else {
|
||||
throw new RunException("Warp '%s' existiert bereits", warp);
|
||||
}
|
||||
}
|
||||
env.getServer().getWarps().put(warp, new Position(position.xCoord, position.yCoord, position.zCoord, yaw == null ? 0.0f : yaw.floatValue(), pitch == null ? 0.0f : pitch.floatValue(), dim));
|
||||
exec.log("Warp '%s' auf %d, %d, %d in %s gesetzt", warp, ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getNameString());
|
||||
exec.log("Warp '%s' auf %d, %d, %d in %s gesetzt", warp, ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -19,6 +19,6 @@ public class CommandShowwarp extends Command {
|
|||
throw new RunException("Warp '%s' existiert nicht", warp);
|
||||
Position pos = env.getServer().getWarps().get(warp);
|
||||
Dimension wdim = pos.getDimension();
|
||||
exec.log("Warp %s ist bei %.2f, %.2f, %.2f [%.1f, %.1f] in %s", warp, pos.xCoord, pos.yCoord, pos.zCoord, pos.yaw(), pos.pitch(), wdim == null ? "<?>" : wdim.getNameString());
|
||||
exec.log("Warp %s ist bei %.2f, %.2f, %.2f [%.1f, %.1f] in %s", warp, pos.xCoord, pos.yCoord, pos.zCoord, pos.yaw(), pos.pitch(), wdim == null ? "<?>" : wdim.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ public class CommandSpawn extends Command {
|
|||
tag != null && tag.hasInt("damage") ? tag.getInt("damage") : 0, tag != null && tag.hasBool("fire") && tag.getBool("fire"),
|
||||
exec.isPlayer() && tag != null && tag.hasBool("summoned") && tag.getBool("summoned") ? ((Player)exec).getPresentEntity() : null);
|
||||
}
|
||||
exec.log("%sBlitz bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getNameString());
|
||||
exec.log("%sBlitz bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getDisplay());
|
||||
return null;
|
||||
}
|
||||
else {
|
||||
|
@ -83,7 +83,7 @@ public class CommandSpawn extends Command {
|
|||
}
|
||||
spawned.add("#" + entity.getId());
|
||||
}
|
||||
exec.log("%s%s bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), EntityRegistry.getEntityName(type), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getNameString());
|
||||
exec.log("%s%s bei %d, %d, %d in %s erschaffen", count == 1 ? "" : (count + "x "), EntityRegistry.getEntityName(type), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord), world.dimension.getDisplay());
|
||||
return Util.buildLines(",", spawned);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ public class CommandTele extends Command {
|
|||
public Object exec(CommandEnvironment env, Executor exec, Vec3 position, Dimension dim, Double yaw, Double pitch, List<Entity> entities) {
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(position.xCoord, position.yCoord, position.zCoord, yaw == null ? entity.rotYaw : yaw.floatValue(), pitch == null ? entity.rotPitch : pitch.floatValue(), dim);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), ExtMath.floord(position.xCoord), ExtMath.floord(position.yCoord), ExtMath.floord(position.zCoord), dim.getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -6,6 +6,7 @@ import server.command.Command;
|
|||
import server.command.CommandEnvironment;
|
||||
import server.command.Executor;
|
||||
import server.command.RunException;
|
||||
import server.network.Player;
|
||||
import server.world.WorldServer;
|
||||
|
||||
public class CommandTime extends Command {
|
||||
|
@ -89,7 +90,7 @@ public class CommandTime extends Command {
|
|||
dim.setDayTime(time);
|
||||
dim.resetWeather();
|
||||
}
|
||||
exec.log("Zeit auf %s gesetzt", world.formatImperialTime(false));
|
||||
exec.log("Zeit auf %s gesetzt", world.formatImperialTime(exec.isPlayer() ? ((Player)exec).getPresentEntity() : null, false));
|
||||
return time;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ public class CommandTp extends Command {
|
|||
Position pos = target.getPos();
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(pos);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CommandTphere extends Command {
|
|||
throw new RunException("Keine Position zum Teleportieren vorhanden");
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(pos);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ public class CommandWarp extends Command {
|
|||
// }
|
||||
for(Entity entity : entities) {
|
||||
entity.teleport(pos);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), (int)pos.x(), (int)pos.y(), (int)pos.z(), pos.getDimension().getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -32,15 +32,15 @@ public class CommandWarps extends Command {
|
|||
n++;
|
||||
}
|
||||
if(dim != null && n == 0) {
|
||||
exec.log(TextColor.DGRAY + "Es sind keine Warps in %s vorhanden", dim.getNameString());
|
||||
exec.log(TextColor.DGRAY + "Es sind keine Warps in %s vorhanden", dim.getDisplay());
|
||||
return;
|
||||
}
|
||||
exec.log(TextColor.GREEN + "Es " + (n == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Warp" + (n == 1 ? "" : "s") + " " + (dim == null ? "" : "in Dimension %s ") + "vorhanden", n, dim == null ? null : dim.getNameString());
|
||||
exec.log(TextColor.GREEN + "Es " + (n == 1 ? "ist" : "sind") + " " + TextColor.YELLOW + "%d" + TextColor.GREEN + " Warp" + (n == 1 ? "" : "s") + " " + (dim == null ? "" : "in Dimension %s ") + "vorhanden", n, dim == null ? null : dim.getDisplay());
|
||||
for(Entry<String, Position> warp : warps.entrySet()) {
|
||||
Position pos = warp.getValue();
|
||||
Dimension wdim = pos.getDimension();
|
||||
if(wdim != null && (dim == null || wdim == dim))
|
||||
exec.log(TextColor.NEON + "%s" + TextColor.GRAY + ": " + TextColor.ORANGE + "%s" + (dim == null ? " @ " : "") + "%d, %d, %d", warp.getKey(), dim != null ? "" : wdim.getNameString(), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord));
|
||||
exec.log(TextColor.NEON + "%s" + TextColor.GRAY + ": " + TextColor.ORANGE + "%s" + (dim == null ? " @ " : "") + "%d, %d, %d", warp.getKey(), dim != null ? "" : wdim.getDisplay(), ExtMath.floord(pos.xCoord), ExtMath.floord(pos.yCoord), ExtMath.floord(pos.zCoord));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -20,12 +20,12 @@ public class CommandWeather extends Command {
|
|||
|
||||
public void exec(CommandEnvironment env, Executor exec, Weather weather, WorldServer world, boolean transition) {
|
||||
if(!world.dimension.getType().weather)
|
||||
throw new RunException("Welt %s hat kein Wetter", world.dimension.getNameString());
|
||||
throw new RunException("Welt %s hat kein Wetter", world.dimension.getDisplay());
|
||||
else if(world.isExterminated())
|
||||
throw new RunException("Welt %s ist zerstört", world.dimension.getNameString());
|
||||
throw new RunException("Welt %s ist zerstört", world.dimension.getDisplay());
|
||||
world.setWeather(weather);
|
||||
if(!transition)
|
||||
world.resetWeather();
|
||||
exec.log("Wetter in %s zu %s geändert", world.dimension.getNameString(), weather.getDisplay());
|
||||
exec.log("Wetter in %s zu %s geändert", world.dimension.getDisplay(), weather.getDisplay());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ public class CommandWorld extends Command {
|
|||
for(Entity entity : entities) {
|
||||
BlockPos pos = adjust(world, entity.getPosition());
|
||||
entity.teleport(pos, world);
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), world.dimension.getNameString());
|
||||
exec.log("%s nach %d, %d, %d in %s teleportiert", entity.getCommandName(), pos.getX(), pos.getY(), pos.getZ(), world.dimension.getDisplay());
|
||||
}
|
||||
return entities.size();
|
||||
}
|
||||
|
|
|
@ -1346,7 +1346,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
if(this.edit == EditAction.SELECT && this.selectionDim != Integer.MIN_VALUE && (this.selPos1 != null || this.selPos2 != null)) {
|
||||
Dimension dim = UniverseRegistry.getDimension(this.selectionDim);
|
||||
if(dim != null) {
|
||||
msg += "; Bereich " + dim.getNameString() + ": ";
|
||||
msg += "; Bereich " + dim.getDisplay() + ": ";
|
||||
msg += (this.selPos1 != null ? this.selPos1 : "*") + " -> " + (this.selPos2 != null ? this.selPos2 : "*");
|
||||
if(this.selPos1 != null && this.selPos2 != null) {
|
||||
msg += " = " + (1 + Math.max(this.selPos1.getX(), this.selPos2.getX()) - Math.min(this.selPos1.getX(), this.selPos2.getX())) +
|
||||
|
@ -1556,11 +1556,12 @@ public class Player extends User implements Executor, IPlayer
|
|||
info = null;
|
||||
Alignment align = Alignment.getByName(tag.getString("Align"));
|
||||
Dimension dimension = UniverseRegistry.getDimension(tag.getString("Dimension"));
|
||||
String dim = dimension == null ? "???" : dimension.getNameString();
|
||||
String dim = dimension == null ? "???" : dimension.getDisplay();
|
||||
BlockPos pos = new BlockPos(tag.getDouble("PosX"), tag.getDouble("PosY"), tag.getDouble("PosZ"));
|
||||
String type = EntityRegistry.getEntityName(tag.getString("id"));
|
||||
int level = tag.getInt("XpLevel");
|
||||
return new PlayerCharacter(name, info, align, dim, pos, type, level);
|
||||
Dimension origin = UniverseRegistry.getDimension(tag.getString("OriginDim"));
|
||||
return new PlayerCharacter(name, info, align, dim, pos, type, level, origin == null ? null : UniverseRegistry.getName(origin));
|
||||
}
|
||||
|
||||
public void onConnect() {
|
||||
|
@ -2428,7 +2429,7 @@ public class Player extends User implements Executor, IPlayer
|
|||
Position pos = this.server.getRandomSpawnPosition(origin);
|
||||
this.entity.teleport(pos);
|
||||
this.teleportPos = this.deathPos = null;
|
||||
this.sendPacket(new SPacketCharacterList(this.selected, this.selected, new PlayerCharacter(this.entity.getCustomNameTag(), this.entity.getDescription(), this.entity.getAlignment(), this.entity.worldObj.dimension.getNameString(), this.entity.getPosition(), EntityRegistry.getEntityName(EntityRegistry.getEntityString(this.entity)), this.entity.experienceLevel)));
|
||||
this.sendPacket(new SPacketCharacterList(this.selected, this.selected, new PlayerCharacter(this.entity.getCustomNameTag(), this.entity.getDescription(), this.entity.getAlignment(), this.entity.worldObj.dimension.getDisplay(), this.entity.getPosition(), EntityRegistry.getEntityName(EntityRegistry.getEntityString(this.entity)), this.entity.experienceLevel, UniverseRegistry.getName(world.dimension))));
|
||||
// if(this.local)
|
||||
// this.server.setDone();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue