public class Tile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static BoundBox |
DEFAULT_BOUNDS |
protected java.util.Map<ToolType,java.lang.Integer> |
effectiveTools |
protected boolean |
forceDrop |
protected float |
hardness |
protected IResourceName |
name |
| Constructor and Description |
|---|
Tile(IResourceName name) |
| Modifier and Type | Method and Description |
|---|---|
Tile |
addEffectiveTool(ToolType type,
int level) |
Tile |
addProps(TileProp... props) |
Tile |
addResource(java.lang.String name) |
boolean |
canBreak(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canClimb(IWorld world,
int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
java.util.List<BoundBox> boxes,
Entity entity) |
boolean |
canGrassSpreadTo(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canKeepPlants(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canPlace(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canPlaceInLayer(TileLayer layer) |
boolean |
canProvideTileEntity() |
boolean |
canReplace(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canStay(IWorld world,
int x,
int y,
TileLayer layer,
int changedX,
int changedY,
TileLayer changedLayer) |
protected ItemTile |
createItemTile() |
void |
describeItem(IAssetManager manager,
ItemInstance instance,
java.util.List<java.lang.String> desc,
boolean isAdvanced) |
void |
doBreak(IWorld world,
int x,
int y,
TileLayer layer,
AbstractEntityPlayer breaker,
boolean isRightTool,
boolean allowDrop) |
void |
doPlace(IWorld world,
int x,
int y,
TileLayer layer,
ItemInstance instance,
AbstractEntityPlayer placer) |
BoundBox |
getBoundBox(IWorld world,
int x,
int y) |
java.util.List<BoundBox> |
getBoundBoxes(IWorld world,
int x,
int y) |
TileState |
getDefState() |
java.util.List<ItemInstance> |
getDrops(IWorld world,
int x,
int y,
TileLayer layer,
Entity destroyer) |
float |
getHardness(IWorld world,
int x,
int y,
TileLayer layer) |
Item |
getItem() |
int |
getLight(IWorld world,
int x,
int y,
TileLayer layer) |
IResourceName |
getName() |
TileState |
getPlacementState(IWorld world,
int x,
int y,
TileLayer layer,
ItemInstance instance,
AbstractEntityPlayer placer) |
java.util.List<TileProp> |
getProps() |
ITileRenderer |
getRenderer() |
float |
getTranslucentModifier(IWorld world,
int x,
int y,
TileLayer layer,
boolean skylight) |
protected boolean |
hasItem() |
boolean |
isAir() |
boolean |
isFullTile() |
boolean |
isToolEffective(IWorld world,
int x,
int y,
TileLayer layer,
ToolType type,
int level) |
boolean |
obscuresBackground() |
void |
onAdded(IWorld world,
int x,
int y,
TileLayer layer) |
void |
onChangeAround(IWorld world,
int x,
int y,
TileLayer layer,
int changedX,
int changedY,
TileLayer changedLayer) |
void |
onCollideWithEntity(IWorld world,
int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
java.util.List<BoundBox> boxes,
Entity entity) |
void |
onDestroyed(IWorld world,
int x,
int y,
Entity destroyer,
TileLayer layer,
boolean shouldDrop) |
boolean |
onInteractWith(IWorld world,
int x,
int y,
TileLayer layer,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
void |
onRemoved(IWorld world,
int x,
int y,
TileLayer layer) |
void |
onScheduledUpdate(IWorld world,
int x,
int y,
TileLayer layer) |
TileEntity |
provideTileEntity(IWorld world,
int x,
int y,
TileLayer layer) |
Tile |
register() |
Tile |
setForceDrop() |
Tile |
setHardness(float hardness) |
java.lang.String |
toString() |
void |
updateRandomly(IWorld world,
int x,
int y,
TileLayer layer) |
void |
updateRandomlyForRendering(IWorld world,
int x,
int y,
TileLayer layer,
AbstractEntityPlayer player) |
public static final BoundBox DEFAULT_BOUNDS
protected final IResourceName name
protected java.util.Map<ToolType,java.lang.Integer> effectiveTools
protected boolean forceDrop
protected float hardness
public Tile(IResourceName name)
public ITileRenderer getRenderer()
public boolean canPlaceInLayer(TileLayer layer)
public Tile register()
public Tile addResource(java.lang.String name)
protected ItemTile createItemTile()
protected boolean hasItem()
public Item getItem()
public boolean onInteractWith(IWorld world, int x, int y, TileLayer layer, double mouseX, double mouseY, AbstractEntityPlayer player)
public void onDestroyed(IWorld world, int x, int y, Entity destroyer, TileLayer layer, boolean shouldDrop)
public java.util.List<ItemInstance> getDrops(IWorld world, int x, int y, TileLayer layer, Entity destroyer)
public TileEntity provideTileEntity(IWorld world, int x, int y, TileLayer layer)
public boolean canProvideTileEntity()
public void onChangeAround(IWorld world, int x, int y, TileLayer layer, int changedX, int changedY, TileLayer changedLayer)
public boolean canStay(IWorld world, int x, int y, TileLayer layer, int changedX, int changedY, TileLayer changedLayer)
public boolean isFullTile()
public boolean obscuresBackground()
public void updateRandomlyForRendering(IWorld world, int x, int y, TileLayer layer, AbstractEntityPlayer player)
public void doBreak(IWorld world, int x, int y, TileLayer layer, AbstractEntityPlayer breaker, boolean isRightTool, boolean allowDrop)
public void doPlace(IWorld world, int x, int y, TileLayer layer, ItemInstance instance, AbstractEntityPlayer placer)
public TileState getPlacementState(IWorld world, int x, int y, TileLayer layer, ItemInstance instance, AbstractEntityPlayer placer)
public Tile setHardness(float hardness)
public Tile setForceDrop()
public boolean isToolEffective(IWorld world, int x, int y, TileLayer layer, ToolType type, int level)
public float getTranslucentModifier(IWorld world, int x, int y, TileLayer layer, boolean skylight)
public boolean isAir()
public IResourceName getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic boolean canClimb(IWorld world, int x, int y, TileLayer layer, TileState state, BoundBox entityBox, java.util.List<BoundBox> boxes, Entity entity)
public void onCollideWithEntity(IWorld world, int x, int y, TileLayer layer, TileState state, BoundBox entityBox, java.util.List<BoundBox> boxes, Entity entity)
public void describeItem(IAssetManager manager, ItemInstance instance, java.util.List<java.lang.String> desc, boolean isAdvanced)
public TileState getDefState()
public java.util.List<TileProp> getProps()