public class Tile
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static BoundBox |
BOTTOM_LEFT |
static BoundBox |
BOTTOM_RIGHT |
static BoundBox[] |
CHISEL_BOUNDS |
static BoundBox |
DEFAULT_BOUNDS |
protected java.util.Map<ToolProperty,java.lang.Integer> |
effectiveToolProps |
protected boolean |
forceDrop |
protected float |
hardness |
protected boolean |
isChiselable |
protected ResourceName |
name |
static BoundBox |
TOP_LEFT |
static BoundBox |
TOP_RIGHT |
| 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 |
canLiquidSpread(IWorld world,
int x,
int y,
TileLiquid liquid,
Direction dir) |
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) |
boolean |
chisel(IWorld world,
int x,
int y,
TileState state,
double mouseX,
double mouseY)
Attempts to chisel a corner of the tile based on the cursor position.
|
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) |
protected java.util.List<BoundBox> |
getChiselBoundBoxes(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) |
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 |
hasProp(TileProp prop) |
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 |
isChiselable() |
boolean |
isChiseled(IWorld world,
int x,
int y,
TileLayer layer,
TileState state) |
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 |
setChiselable()
Call this to make your tile chiselable.
|
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
public static final BoundBox TOP_LEFT
public static final BoundBox TOP_RIGHT
public static final BoundBox BOTTOM_LEFT
public static final BoundBox BOTTOM_RIGHT
public static final BoundBox[] CHISEL_BOUNDS
protected final ResourceName name
protected java.util.Map<ToolProperty,java.lang.Integer> effectiveToolProps
protected boolean forceDrop
protected float hardness
protected boolean isChiselable
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)
protected java.util.List<BoundBox> getChiselBoundBoxes(IWorld world, int x, int y)
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 boolean chisel(IWorld world, int x, int y, TileState state, double mouseX, double mouseY)
isChiselable()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 isChiselable()
public Tile setChiselable()
register() method.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 hasProp(TileProp prop)
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 canLiquidSpread(IWorld world, int x, int y, TileLiquid liquid, Direction dir)
public boolean isLiquid()
public Tile setMaxAmount(int amount)
public boolean factorsIntoHeightMap(IWorld world, int x, int y, TileLayer layer)