public interface IApiHandler
| Modifier and Type | Method and Description |
|---|---|
void |
describeItem(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
ItemInstance instance)
Describes an item using a hovering info (
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List)) |
void |
doDefaultEntityUpdate(Entity entity)
Updates an
Entity's MovableWorldObject.x and MovableWorldObject.y values
depending on its MovableWorldObject.motionX and MovableWorldObject.motionY, increases
its Entity.ticksExisted value and updates its Entity.fallAmount
Not supposed to be used by mods |
boolean |
doDefaultSlotMovement(IGameInstance game,
int button,
float x,
float y,
ComponentSlot slot)
Does everything necessary for moving instances of
ItemInstance around between
slots of a ItemContainer using the ComponentSlot
provided
Not supposed to be used by mods |
void |
drawHoverInfo(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
float x,
float y,
float scale,
boolean firstLineOffset,
boolean canLeaveScreen,
int maxLength,
java.util.List<java.lang.String> text)
Draws a hovering info at the specified coordinates
|
void |
drawHoverInfoAtMouse(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
boolean firstLineOffset,
int maxLength,
java.util.List<java.lang.String> text)
Draws a hovering info (
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List))
at the specified mouse coordinates |
void |
drawHoverInfoAtMouse(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
boolean firstLineOffset,
int maxLength,
java.lang.String... text)
Draws a hovering info (
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List))
at the specified mouse coordinates |
org.newdawn.slick.Color |
getColorByLight(int light,
TileLayer layer) |
int[] |
interpolateLight(IWorld world,
int x,
int y) |
org.newdawn.slick.Color[] |
interpolateWorldColor(int[] interpolatedLight,
TileLayer layer) |
void |
readDataSet(DataSet set,
java.io.File file)
Reads the specified
DataSet from the specified File |
DataPart |
readPart(java.io.DataInput stream)
Reads a
DataPart from the specified DataInput and returns it |
void |
readSet(java.io.DataInput stream,
DataSet set)
Reads the specified
DataSet from the specified DataInput |
void |
renderItemInGui(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
ItemInstance slot,
float x,
float y,
float scale,
org.newdawn.slick.Color color)
Renders an
ItemInstance in a Gui at the specified x and y coordinates |
void |
renderSlotInGui(IGameInstance game,
IAssetManager manager,
org.newdawn.slick.Graphics g,
ItemInstance slot,
float x,
float y,
float scale)
Renders a slot icon in a
Gui at the specified x and y coordinates
containg the specified ItemInstance |
void |
writeDataSet(DataSet set,
java.io.File file)
Writes the specified
DataSet to the specified File |
void |
writePart(java.io.DataOutput stream,
DataPart part)
Writes the specified
DataPart to the specified DataOutput |
void |
writeSet(java.io.DataOutput stream,
DataSet set)
Writes the specified
DataSet to the specified DataOutput |
void writeDataSet(DataSet set, java.io.File file)
DataSet to the specified Fileset - The setfile - The filevoid readDataSet(DataSet set, java.io.File file)
DataSet from the specified Fileset - The setfile - The filevoid writeSet(java.io.DataOutput stream,
DataSet set)
throws java.lang.Exception
DataSet to the specified DataOutputstream - The output to write toset - The setjava.lang.Exception - If writing to the output fails in some wayvoid readSet(java.io.DataInput stream,
DataSet set)
throws java.lang.Exception
DataSet from the specified DataInputstream - The input to read fromset - The setjava.lang.Exception - If reading from the input fails in some wayvoid writePart(java.io.DataOutput stream,
DataPart part)
throws java.lang.Exception
DataPart to the specified DataOutputstream - The output to write topart - The partjava.lang.Exception - If writing to the output fails in some wayDataPart readPart(java.io.DataInput stream) throws java.lang.Exception
DataPart from the specified DataInput and returns itstream - The input to read fromDataPartjava.lang.Exception - If reading from the input fails in some wayvoid doDefaultEntityUpdate(Entity entity)
Entity's MovableWorldObject.x and MovableWorldObject.y values
depending on its MovableWorldObject.motionX and MovableWorldObject.motionY, increases
its Entity.ticksExisted value and updates its Entity.fallAmount
entity - The entityboolean doDefaultSlotMovement(IGameInstance game, int button, float x, float y, ComponentSlot slot)
ItemInstance around between
slots of a ItemContainer using the ComponentSlot
provided
game - The current game instancebutton - The button pressedx - The x coordinate of the mousey - The y coordiante of the mouseslot - The slotvoid renderSlotInGui(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, ItemInstance slot, float x, float y, float scale)
Gui at the specified x and y coordinates
containg the specified ItemInstancegame - The current game instancemanager - The current instance of IAssetManagerg - The current graphics contextslot - The ItemInstance to be drawn inside of the slotx - The x coordinatey - The y coordinatescale - The scalevoid renderItemInGui(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, ItemInstance slot, float x, float y, float scale, org.newdawn.slick.Color color)
ItemInstance in a Gui at the specified x and y coordinatesgame - The current game instancemanager - The current instance of IAssetManagerg - The current graphics contextslot - The ItemInstance to be drawn inside of the slotx - The x coordinatey - The y coordinatescale - The scalecolor - The filter to be applied to the Item renderervoid describeItem(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, ItemInstance instance)
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List))game - The current game instancemanager - The current isntance of IAssetManagerg - The current graphics contextinstance - The ItemInstance to be describedvoid drawHoverInfoAtMouse(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, boolean firstLineOffset, int maxLength, java.lang.String... text)
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List))
at the specified mouse coordinatesgame - The current game instancemanager - The current isntance of IAssetManagerg - The current graphics contextfirstLineOffset - The offset between the first line and the other linesmaxLength - The maximum length before the info wraps aroundtext - The text to be displayedvoid drawHoverInfoAtMouse(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, boolean firstLineOffset, int maxLength, java.util.List<java.lang.String> text)
drawHoverInfo(IGameInstance, IAssetManager, Graphics, float, float, float, boolean, boolean, int, List))
at the specified mouse coordinatesgame - The current game instancemanager - The current isntance of IAssetManagerg - The current graphics contextfirstLineOffset - The offset between the first line and the other linesmaxLength - The maximum length before the info wraps aroundtext - The text to be displayedvoid drawHoverInfo(IGameInstance game, IAssetManager manager, org.newdawn.slick.Graphics g, float x, float y, float scale, boolean firstLineOffset, boolean canLeaveScreen, int maxLength, java.util.List<java.lang.String> text)
game - The current game instancemanager - The current isntance of IAssetManagerg - The current graphics contextx - The x coordinatey - The y coordinatescale - The scale of the infofirstLineOffset - The offset between the first line and the other linescanLeaveScreen - If the hover info can leave the screenmaxLength - The maximum length before the info wraps aroundtext - The text to be displayedint[] interpolateLight(IWorld world, int x, int y)
org.newdawn.slick.Color[] interpolateWorldColor(int[] interpolatedLight,
TileLayer layer)
org.newdawn.slick.Color getColorByLight(int light,
TileLayer layer)