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.math.BlockPos pos,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side)
Checks whether the block can be placed at the position.
|
static ChunkCollision |
get()
Gets the
ChunkCollision instance. |
void |
getCollisionBoxes(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB mask,
java.util.List<net.minecraft.util.math.AxisAlignedBB> list,
net.minecraft.entity.Entity entity)
Gets the collision bounding boxes for the intersecting chunks.
|
net.minecraft.util.math.RayTraceResult |
getRayTraceResult(net.minecraft.world.World world,
net.minecraft.util.math.RayTraceResult 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.math.Vec3d src,
net.minecraft.util.math.Vec3d 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 getCollisionBoxes(net.minecraft.world.World world,
net.minecraft.util.math.AxisAlignedBB mask,
java.util.List<net.minecraft.util.math.AxisAlignedBB> list,
net.minecraft.entity.Entity entity)
World.getCollisionBoxes(Entity, AxisAlignedBB)world - the worldmask - the masklist - the listentity - the entitypublic void setRayTraceInfos(net.minecraft.util.math.Vec3d src,
net.minecraft.util.math.Vec3d dest)
World.rayTraceBlocks(Vec3d, Vec3d, boolean, boolean, boolean)src - the srcdest - the destpublic void setRayTraceInfos(Point src, Point dest)
src - the srcdest - the destpublic net.minecraft.util.math.RayTraceResult getRayTraceResult(net.minecraft.world.World world,
net.minecraft.util.math.RayTraceResult mop)
World.rayTraceBlocks(Vec3d, Vec3d, 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.math.BlockPos pos,
net.minecraft.util.EnumHand hand,
net.minecraft.util.EnumFacing side)
ItemBlock.onItemUse(ItemStack, EntityPlayer, World, BlockPos, EnumHand, 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.