mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-21 17:22:17 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
1 parent
250edf099c
commit
6815f579a7
1192 files changed
+60344
-62167
No files matched your search
@@ -7,102 +7,102 @@ import noppes.npcs.controllers.TransportController;
|
||||
import noppes.npcs.scripted.NpcAPI;
|
||||
|
||||
public class TransportLocation implements ITransportLocation {
|
||||
public int id = -1;
|
||||
public String name = "default name";
|
||||
public double posX;
|
||||
public double posY;
|
||||
public double posZ;
|
||||
|
||||
public int type = 0;
|
||||
public int dimension = 0;
|
||||
|
||||
public TransportCategory category;
|
||||
|
||||
public void readNBT(NBTTagCompound compound) {
|
||||
if(compound == null)
|
||||
return;
|
||||
id = compound.getInteger("Id");
|
||||
posX = compound.getDouble("PosX");
|
||||
posY = compound.getDouble("PosY");
|
||||
posZ = compound.getDouble("PosZ");
|
||||
type = compound.getInteger("Type");
|
||||
dimension = compound.getInteger("Dimension");
|
||||
name = compound.getString("Name");
|
||||
}
|
||||
public int id = -1;
|
||||
public String name = "default name";
|
||||
public double posX;
|
||||
public double posY;
|
||||
public double posZ;
|
||||
|
||||
public NBTTagCompound writeNBT() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setInteger("Id", id);
|
||||
compound.setDouble("PosX", posX);
|
||||
compound.setDouble("PosY", posY);
|
||||
compound.setDouble("PosZ", posZ);
|
||||
compound.setInteger("Type", type);
|
||||
compound.setInteger("Dimension", dimension);
|
||||
compound.setString("Name", name);
|
||||
return compound;
|
||||
}
|
||||
public int type = 0;
|
||||
public int dimension = 0;
|
||||
|
||||
public boolean isDefault() {
|
||||
return type == 1;
|
||||
}
|
||||
public TransportCategory category;
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
public void readNBT(NBTTagCompound compound) {
|
||||
if (compound == null)
|
||||
return;
|
||||
id = compound.getInteger("Id");
|
||||
posX = compound.getDouble("PosX");
|
||||
posY = compound.getDouble("PosY");
|
||||
posZ = compound.getDouble("PosZ");
|
||||
type = compound.getInteger("Type");
|
||||
dimension = compound.getInteger("Dimension");
|
||||
name = compound.getString("Name");
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public NBTTagCompound writeNBT() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
compound.setInteger("Id", id);
|
||||
compound.setDouble("PosX", posX);
|
||||
compound.setDouble("PosY", posY);
|
||||
compound.setDouble("PosZ", posZ);
|
||||
compound.setInteger("Type", type);
|
||||
compound.setInteger("Dimension", dimension);
|
||||
compound.setString("Name", name);
|
||||
return compound;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public boolean isDefault() {
|
||||
return type == 1;
|
||||
}
|
||||
|
||||
public void setDimension(int dimension) {
|
||||
this.dimension = dimension;
|
||||
}
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public int getDimension() {
|
||||
return dimension;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
public void setDimension(int dimension) {
|
||||
this.dimension = dimension;
|
||||
}
|
||||
|
||||
public void setPosition(int x, int y, int z) {
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
}
|
||||
public int getDimension() {
|
||||
return dimension;
|
||||
}
|
||||
|
||||
public void setPosition(IPos pos) {
|
||||
this.posX = pos.getX();
|
||||
this.posY = pos.getY();
|
||||
this.posZ = pos.getZ();
|
||||
}
|
||||
public void setType(int type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public IPos getPos() {
|
||||
return NpcAPI.Instance().getIPos(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public double getX() {
|
||||
return posX;
|
||||
}
|
||||
public void setPosition(int x, int y, int z) {
|
||||
this.posX = x;
|
||||
this.posY = y;
|
||||
this.posZ = z;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return posY;
|
||||
}
|
||||
public void setPosition(IPos pos) {
|
||||
this.posX = pos.getX();
|
||||
this.posY = pos.getY();
|
||||
this.posZ = pos.getZ();
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
return posZ;
|
||||
}
|
||||
public IPos getPos() {
|
||||
return NpcAPI.Instance().getIPos(this.posX, this.posY, this.posZ);
|
||||
}
|
||||
|
||||
public void save() {
|
||||
TransportController.getInstance().saveLocation(this.category.id, this);
|
||||
}
|
||||
public double getX() {
|
||||
return posX;
|
||||
}
|
||||
|
||||
public double getY() {
|
||||
return posY;
|
||||
}
|
||||
|
||||
public double getZ() {
|
||||
return posZ;
|
||||
}
|
||||
|
||||
public void save() {
|
||||
TransportController.getInstance().saveLocation(this.category.id, this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user