public class ChunkCollision
extends java.lang.Object
| Constructor and Description |
|---|
ChunkCollision() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canPlaceBlockAt(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.BlockPos pos,
net.minecraft.util.EnumFacing side)
Checks whether the block can be placed at the position.
|
static ChunkCollision |
get()
Gets the
ChunkCollision instance. |
void |
getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.util.AxisAlignedBB mask,
java.util.List<net.minecraft.util.AxisAlignedBB> list,
net.minecraft.entity.Entity entity)
Gets the collision bounding boxes for the intersecting chunks.
|
net.minecraft.util.MovingObjectPosition |
getRayTraceResult(net.minecraft.world.World world,
net.minecraft.util.MovingObjectPosition mop)
Gets the ray trace result.
|
void |
replaceBlocks(net.minecraft.world.World world,
MBlockState state)
Replaces to air all the blocks colliding with the
AxisAlignedBB of the MBlockState. |
void |
setRayTraceInfos(Point src,
Point dest)
Sets the ray trace infos.
|
void |
setRayTraceInfos(net.minecraft.util.Vec3 src,
net.minecraft.util.Vec3 dest)
Sets the ray trace infos.
|
void |
updateBlocks(net.minecraft.world.World world,
MBlockState state)
Notifies all the blocks colliding with the
AxisAlignedBB of the MBlockState. |
public void getCollisionBoundingBoxes(net.minecraft.world.World world,
net.minecraft.util.AxisAlignedBB mask,
java.util.List<net.minecraft.util.AxisAlignedBB> list,
net.minecraft.entity.Entity entity)
World.getCollidingBoundingBoxes(Entity, AxisAlignedBB)world - the worldmask - the masklist - the listentity - the entitypublic void setRayTraceInfos(net.minecraft.util.Vec3 src,
net.minecraft.util.Vec3 dest)
World.rayTraceBlocks(Vec3, Vec3, boolean, boolean, boolean)src - the srcdest - the destpublic void setRayTraceInfos(Point src, Point dest)
src - the srcdest - the destpublic net.minecraft.util.MovingObjectPosition getRayTraceResult(net.minecraft.world.World world,
net.minecraft.util.MovingObjectPosition mop)
World.rayTraceBlocks(Vec3, Vec3, boolean, boolean, boolean) before each return.world - the worldmop - the moppublic boolean canPlaceBlockAt(net.minecraft.item.ItemStack itemStack,
net.minecraft.entity.player.EntityPlayer player,
net.minecraft.world.World world,
net.minecraft.block.Block block,
net.minecraft.util.BlockPos pos,
net.minecraft.util.EnumFacing side)
ItemBlock.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumFacing, float, float, float) at the
beginning.IChunkCollidable) against the occupied blocks position, then against all the bounding
boxes of the IChunkCollidable available for those chunks.itemStack - the item stackplayer - the playerworld - the worldblock - the blockpos - the posside - the sidepublic void replaceBlocks(net.minecraft.world.World world,
MBlockState state)
AxisAlignedBB of the MBlockState.world - the worldstate - the statepublic void updateBlocks(net.minecraft.world.World world,
MBlockState state)
AxisAlignedBB of the MBlockState.world - the worldstate - the statepublic static ChunkCollision get()
ChunkCollision instance.