public class Tile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static BoundBox |
DEFAULT_BOUNDS |
protected java.util.Map<ToolProperty,java.lang.Integer> |
effectiveToolProps |
protected boolean |
forceDrop |
protected float |
hardness |
protected ResourceName |
name |
| Constructor and Description |
|---|
Tile(ResourceName name) |
| Modifier and Type | Method and Description |
|---|---|
Tile |
addEffectiveTool(ToolProperty property,
int level) |
Tile |
addProps(TileProp... props) |
boolean |
canBreak(IWorld world,
int x,
int y,
TileLayer layer,
AbstractEntityPlayer player,
boolean isRightTool) |
boolean |
canClimb(IWorld world,
int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes,
Entity entity) |
boolean |
canGrassSpreadTo(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canKeepFarmablePlants(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canKeepPlants(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
canLiquidSpreadInto(IWorld world,
int x,
int y,
TileLiquid liquid) |
boolean |
canPlace(IWorld world,
int x,
int y,
TileLayer layer,
AbstractEntityPlayer player) |
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) |
boolean |
canSwim(IWorld world,
int x,
int y,
TileLayer layer,
Entity entity) |
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) |
boolean |
doesSustainLeaves(IWorld world,
int x,
int y,
TileLayer layer) |
void |
doPlace(IWorld world,
int x,
int y,
TileLayer layer,
ItemInstance instance,
AbstractEntityPlayer placer) |
boolean |
factorsIntoHeightMap(IWorld world,
int x,
int y,
TileLayer layer) |
BoundBox |
getActualBoundBox(IWorld world,
TileState state,
int x,
int y,
TileLayer layer) |
BoundBox |
getBoundBox(IWorld world,
int x,
int y,
TileLayer layer)
Deprecated.
|
BoundBox |
getBoundBox(IWorld world,
TileState state,
int x,
int y,
TileLayer layer) |
java.util.List<BoundBox> |
getBoundBoxes(IWorld world,
int x,
int y,
TileLayer layer,
MovableWorldObject object,
BoundBox objectBox,
BoundBox objectBoxMotion)
Deprecated.
|
java.util.List<BoundBox> |
getBoundBoxes(IWorld world,
TileState state,
int x,
int y,
TileLayer layer,
MovableWorldObject object,
BoundBox objectBox,
BoundBox objectBoxMotion) |
ResourceName |
getBreakSound(IWorld world,
int x,
int y,
TileLayer layer,
Entity destroyer) |
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) |
int |
getInteractionPriority(IWorld world,
int x,
int y,
TileLayer layer,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
Item |
getItem() |
int |
getLight(IWorld world,
int x,
int y,
TileLayer layer) |
double |
getMaxInteractionDistance(IWorld world,
int x,
int y,
TileLayer layer,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
ResourceName |
getName() |
TileState |
getPlacementState(IWorld world,
int x,
int y,
TileLayer layer,
ItemInstance instance,
AbstractEntityPlayer placer) |
ResourceName |
getPlaceSound(IWorld world,
int x,
int y,
TileLayer layer,
Entity placer,
TileState state) |
java.util.List<TileProp> |
getProps() |
ITileRenderer |
getRenderer() |
float |
getTranslucentModifier(IWorld world,
int x,
int y,
TileLayer layer,
boolean skylight) |
protected boolean |
hasItem() |
boolean |
hasSolidSurface(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
hasState(ResourceName name,
java.util.Map<java.lang.String,java.lang.Comparable> props) |
boolean |
isAir() |
boolean |
isFullTile() |
boolean |
isLiquid() |
boolean |
isToolEffective(IWorld world,
int x,
int y,
TileLayer layer,
ToolProperty property,
int level) |
boolean |
makesGrassSnowy(IWorld world,
int x,
int y,
TileLayer layer) |
boolean |
obscuresBackground(IWorld world,
int x,
int y,
TileLayer layer) |
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,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes,
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) |
boolean |
onInteractWithBreakKey(IWorld world,
int x,
int y,
TileLayer layer,
double mouseX,
double mouseY,
AbstractEntityPlayer player) |
void |
onIntersectWithEntity(IWorld world,
int x,
int y,
TileLayer layer,
TileState state,
BoundBox entityBox,
BoundBox entityBoxMotion,
java.util.List<BoundBox> tileBoxes,
Entity entity) |
void |
onRemoved(IWorld world,
int x,
int y,
TileLayer layer) |
void |
onScheduledUpdate(IWorld world,
int x,
int y,
TileLayer layer,
int scheduledMeta) |
TileEntity |
provideTileEntity(IWorld world,
int x,
int y,
TileLayer layer) |
Tile |
register() |
Tile |
setForceDrop() |
Tile |
setHardness(float hardness) |
Tile |
setMaxAmount(int amount) |
java.lang.String |
toString() |
void |
updateRandomly(IWorld world,
int x,
int y,
TileLayer layer) |
void |
updateRandomlyInPlayerView(IWorld world,
int x,
int y,
TileLayer layer,
TileState state,
IParticleManager manager) |
public static final BoundBox DEFAULT_BOUNDS
protected final ResourceName name
protected java.util.Map<ToolProperty,java.lang.Integer> effectiveToolProps
protected boolean forceDrop
protected float hardness
public Tile(ResourceName name)
public ITileRenderer getRenderer()
public BoundBox getActualBoundBox(IWorld world, TileState state, int x, int y, TileLayer layer)
public BoundBox getBoundBox(IWorld world, TileState state, int x, int y, TileLayer layer)
@Deprecated public BoundBox getBoundBox(IWorld world, int x, int y, TileLayer layer)
public java.util.List<BoundBox> getBoundBoxes(IWorld world, TileState state, int x, int y, TileLayer layer, MovableWorldObject object, BoundBox objectBox, BoundBox objectBoxMotion)
@Deprecated public java.util.List<BoundBox> getBoundBoxes(IWorld world, int x, int y, TileLayer layer, MovableWorldObject object, BoundBox objectBox, BoundBox objectBoxMotion)
public boolean canBreak(IWorld world, int x, int y, TileLayer layer, AbstractEntityPlayer player, boolean isRightTool)
public boolean canPlace(IWorld world, int x, int y, TileLayer layer, AbstractEntityPlayer player)
public boolean canPlaceInLayer(TileLayer layer)
public Tile register()
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 boolean onInteractWithBreakKey(IWorld world, int x, int y, TileLayer layer, double mouseX, double mouseY, AbstractEntityPlayer player)
public int getInteractionPriority(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 void updateRandomlyInPlayerView(IWorld world, int x, int y, TileLayer layer, TileState state, IParticleManager manager)
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, ToolProperty property, int level)
public Tile addEffectiveTool(ToolProperty property, int level)
public float getTranslucentModifier(IWorld world, int x, int y, TileLayer layer, boolean skylight)
public boolean isAir()
public ResourceName getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic void onScheduledUpdate(IWorld world, int x, int y, TileLayer layer, int scheduledMeta)
public boolean canClimb(IWorld world, int x, int y, TileLayer layer, TileState state, BoundBox entityBox, BoundBox entityBoxMotion, java.util.List<BoundBox> tileBoxes, Entity entity)
public void onCollideWithEntity(IWorld world, int x, int y, TileLayer layer, TileState state, BoundBox entityBox, BoundBox entityBoxMotion, java.util.List<BoundBox> tileBoxes, Entity entity)
public void onIntersectWithEntity(IWorld world, int x, int y, TileLayer layer, TileState state, BoundBox entityBox, BoundBox entityBoxMotion, java.util.List<BoundBox> tileBoxes, Entity entity)
public void describeItem(IAssetManager manager, ItemInstance instance, java.util.List<java.lang.String> desc, boolean isAdvanced)
public boolean canKeepFarmablePlants(IWorld world, int x, int y, TileLayer layer)
public TileState getDefState()
public java.util.List<TileProp> getProps()
public boolean hasState(ResourceName name, java.util.Map<java.lang.String,java.lang.Comparable> props)
public ResourceName getBreakSound(IWorld world, int x, int y, TileLayer layer, Entity destroyer)
public ResourceName getPlaceSound(IWorld world, int x, int y, TileLayer layer, Entity placer, TileState state)
public double getMaxInteractionDistance(IWorld world, int x, int y, TileLayer layer, double mouseX, double mouseY, AbstractEntityPlayer player)
public boolean canLiquidSpreadInto(IWorld world, int x, int y, TileLiquid liquid)
public boolean isLiquid()
public Tile setMaxAmount(int amount)
public boolean factorsIntoHeightMap(IWorld world, int x, int y, TileLayer layer)