프로퍼티 | 타입 | 설명 |
---|
메소드 | 설명 | |
---|---|---|
BlockUpdate ( |
This method is called on blocks next to a position that was changed.
|
|
CanPlace ( |
Override this to provide change the block placement checks.
|
|
Destroy ( |
Attempt to destroy the block in the world. Will always fail if there is a different block at the given position.
|
|
EntityCollision ( PhysicsEntity entity, Vector3i position ) : void |
This method is called when an entity collides with this block.
|
|
EntityInteract ( PhysicsEntity entity, Vector3i position ) : void |
Called when a block and an entity collide.
|
|
GetBoundingBox ( |
Returns the bounding box of this block if it would be at the given position.
|
|
GetMesh ( BlockMeshInfo info ) : BlockMeshData |
Returns the mesh of a block side at given conditions.
|
|
Place ( |
Attempt to place the block in the world.
|
|
RandomUpdate ( |
This method is called randomly on some blocks every update.
|
|
ToString ( ) : string |
메소드 | 설명 | |
---|---|---|
Block ( string name, string namedId, BlockFlags flags, BoundingBox boundingBox, TargetBuffer targetBuffer ) : System.Diagnostics |
Create a new block.
|
|
CanDestroy ( |
Override this to change the block destruction checks.
|
|
DoDestroy ( |
Override this to change the block destruction logic. The block destruction must always be successful. If checks are required, override CanDestroy.
|
|
DoPlace ( |
Override this to change the block placement logic. The block placement must always be successful. If checks are required, override CanPlace.
|
|
EntityCollision ( PhysicsEntity entity, Vector3i position, data ) : void |
Override to provide custom entity collision logic.
|
|
EntityInteract ( PhysicsEntity entity, Vector3i position, data ) : void |
Override to provide custom entity interaction logic.
|
|
GetBoundingBox ( data ) : BoundingBox |
Override this to provide a custom bounding box for this block, depending on the block data.
|
|
ScheduledUpdate ( |
This method is called for scheduled updates.
|
|
Setup ( ITextureIndexProvider indexProvider ) : void |
Called when loading blocks, meant to setup vertex data, indices etc.
|
protected Block ( string name, string namedId, BlockFlags flags, BoundingBox boundingBox, TargetBuffer targetBuffer ) : System.Diagnostics | ||
name | string | The name of the block. Can be localized. |
namedId | string | The named ID of the block. A unique and unlocalized identifier. |
flags | BlockFlags | The block flags setting specific options. |
boundingBox | BoundingBox | The base bounding box for this block. Is used for placement checks. |
targetBuffer | TargetBuffer | The target rendering buffer. |
리턴 | System.Diagnostics |
public BlockUpdate ( |
||
world | The containing world. | |
position | Vector3i | The block position. |
data | The data of the block next to the changed position. | |
side | BlockSide | The side of the block where the change happened. |
리턴 | void |
protected CanDestroy ( |
||
world | The world in which the placement occurs. | |
position | Vector3i | The position at which the placement is requested. |
data | The block data. | |
entity | PhysicsEntity? | The entity that performs placement. |
리턴 | bool |
public CanPlace ( |
||
world | The world in which the placement occurs. | |
position | Vector3i | The position at which the placement is requested. |
entity | PhysicsEntity? | The entity that performs placement. |
리턴 | bool |
public Destroy ( |
||
world | The world in which to destroy the block. | |
position | Vector3i | The position at which to destroy to block. |
entity | PhysicsEntity? | The entity destroying the block. |
리턴 | bool |
protected DoDestroy ( |
||
world | The world in which the placement occurs. | |
position | Vector3i | The position at which the placement is requested. |
data | The block data. | |
entity | PhysicsEntity? | The entity that performs placement. |
리턴 | void |
protected DoPlace ( |
||
world | The world in which the placement occurs. | |
position | Vector3i | The position at which the placement is requested. |
entity | PhysicsEntity? | The entity that performs placement. |
리턴 | void |
public EntityCollision ( PhysicsEntity entity, Vector3i position ) : void | ||
entity | PhysicsEntity | The entity that caused the collision. |
position | Vector3i | The block position. |
리턴 | void |
protected EntityCollision ( PhysicsEntity entity, Vector3i position, data ) : void | ||
entity | PhysicsEntity | The entity that collided with this block. |
position | Vector3i | The position of the block. |
data | The block data of this block. | |
리턴 | void |
public EntityInteract ( PhysicsEntity entity, Vector3i position ) : void | ||
entity | PhysicsEntity | The entity that collided with the block. |
position | Vector3i | The block position. |
리턴 | void |
protected EntityInteract ( PhysicsEntity entity, Vector3i position, data ) : void | ||
entity | PhysicsEntity | The entity that interacted with this block. |
position | Vector3i | The position of the block. |
data | The block data of this block. | |
리턴 | void |
protected GetBoundingBox ( data ) : BoundingBox | ||
data | The block data. | |
리턴 | BoundingBox |
public GetBoundingBox ( |
||
world | The world in which the block is. | |
position | Vector3i | The position of the block. |
리턴 | BoundingBox |
public abstract GetMesh ( BlockMeshInfo info ) : BlockMeshData | ||
info | BlockMeshInfo | Information about the conditions the mesh should be created in. |
리턴 | BlockMeshData |
public Place ( |
||
world | The world in which to place the block. | |
position | Vector3i | The position at which to place the block. |
entity | PhysicsEntity? | The entity that is placing the block. |
리턴 | bool |
public RandomUpdate ( |
||
world | ||
position | Vector3i | |
리턴 | void |
protected ScheduledUpdate ( |
||
world | ||
position | Vector3i | |
리턴 | void |
protected Setup ( ITextureIndexProvider indexProvider ) : void | ||
indexProvider | ITextureIndexProvider | |
리턴 | void |