46 lines
1.1 KiB
Java
Executable File
46 lines
1.1 KiB
Java
Executable File
package projectzombie.tiles;
|
|
|
|
import gl_engine.vec.Vec2i;
|
|
import projectzombie.entity.Entity;
|
|
import projectzombie.model.Model;
|
|
import projectzombie.util.math.TileState;
|
|
import projectzombie.world.chunk.Chunk;
|
|
import projectzombie.world.layer.Layer;
|
|
|
|
public abstract class Tile
|
|
{
|
|
public short id;
|
|
public boolean tileSolid = false;
|
|
public boolean tileWalkable = true;
|
|
public double tileHitbox = 0;
|
|
public double slowness = 0;
|
|
public boolean unbreakable = false;
|
|
protected double light_dissipation = 1/8.0;
|
|
public boolean emitsLight = false;
|
|
public boolean passNaturalLight = true;
|
|
|
|
public void onWalkedOn(Chunk chunk, Layer layer, Vec2i pos, Entity entity, TileState state) {
|
|
}
|
|
|
|
public TileState getDefaultState() {
|
|
return new TileState(this, 0);
|
|
}
|
|
|
|
public void onActivated(Layer layer, Vec2i tpos, Entity entity, TileState state) {
|
|
}
|
|
|
|
public double getLightDissipation(TileState state) {
|
|
return light_dissipation;
|
|
}
|
|
|
|
public double getLightLevel(TileState state, Vec2i pos) {
|
|
return 0;
|
|
}
|
|
|
|
public void tickRandomly(Layer layer, Chunk chunk, TileState state, Vec2i pos) {
|
|
|
|
}
|
|
|
|
public abstract Model getModel(byte meta);
|
|
}
|