public interface IApiHandler
RockBottomAPI.getApiHandler().| Modifier and Type | Method and Description |
|---|---|
java.util.logging.Logger |
createLogger(java.lang.String name)
Creates a
Logger with the specified name that will output to the
main logger and also written to the log file. |
int |
getColorByLight(int light,
TileLayer layer)
Gets a color in the world based on a light value between 0 and
Constants.MAX_LIGHT. |
int[] |
interpolateLight(IWorld world,
int x,
int y)
Interpolates the light at a position in the world.
|
int[] |
interpolateWorldColor(int[] interpolatedLight,
TileLayer layer)
Interpolates the four colors of the corners of a position in the world
based on the
TileLayer and the interpolated light from interpolateLight(IWorld, int, int). |
java.util.logging.Logger |
logger() |
INoiseGen |
makeSimplexNoise(long seed)
Returns a new
INoiseGen of the Simplex Noise kind based on the
specified seed. |
void |
readDataSet(DataSet set,
java.io.File file)
Reads a
DataSet from the location of the specified File. |
DataPart |
readPart(java.io.DataInput stream)
Reads a
DataPart from the specified DataInput and returns
its instance. |
void |
readSet(java.io.DataInput stream,
DataSet set)
Reads a
DataSet from the specified DataInput. |
void |
writeDataSet(DataSet set,
java.io.File file)
Writes a
DataSet to the location of the specified File. |
void |
writePart(java.io.DataOutput stream,
DataPart part)
Writes a
DataPart to the specified DataOutput. |
void |
writeSet(java.io.DataOutput stream,
DataSet set)
Writes a
DataSet to the specified DataOutput. |
void writeDataSet(DataSet set, java.io.File file)
DataSet to the location of the specified File.set - The data setfile - The filevoid readDataSet(DataSet set, java.io.File file)
DataSet from the location of the specified File.set - The data setfile - The filevoid writeSet(java.io.DataOutput stream,
DataSet set)
throws java.lang.Exception
DataSet to the specified DataOutput.stream - The data outputset - The data setjava.lang.Exception - when anything goes wrong during savingvoid readSet(java.io.DataInput stream,
DataSet set)
throws java.lang.Exception
DataSet from the specified DataInput.stream - The data inputset - The data setjava.lang.Exception - when anything goes wrong during savingvoid writePart(java.io.DataOutput stream,
DataPart part)
throws java.lang.Exception
DataPart to the specified DataOutput.stream - The data outputpart - The data partjava.lang.Exception - when anything goes wrong during savingDataPart readPart(java.io.DataInput stream) throws java.lang.Exception
DataPart from the specified DataInput and returns
its instance.stream - The data inputjava.lang.Exception - when anything goes wrong during loadingint[] interpolateLight(IWorld world, int x, int y)
world - The worldx - The x coordinatey - The y coordinateint[] interpolateWorldColor(int[] interpolatedLight,
TileLayer layer)
TileLayer and the interpolated light from interpolateLight(IWorld, int, int).interpolatedLight - The interpolated lightlayer - The layerint getColorByLight(int light,
TileLayer layer)
Constants.MAX_LIGHT.light - The lightlayer - The layerINoiseGen makeSimplexNoise(long seed)
INoiseGen of the Simplex Noise kind based on the
specified seed.seed - The seedjava.util.logging.Logger createLogger(java.lang.String name)
Logger with the specified name that will output to the
main logger and also written to the log file.name - The name@ApiInternal java.util.logging.Logger logger()