@AutoLoad 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,
org.apache.commons.lang3.tuple.Pair<Point,Point> infos,
net.minecraft.util.math.RayTraceResult result,
boolean stopOnLiquid,
boolean ignoreBlockWithoutBoundingBox,
boolean returnLastUncollidableBlock)
Gets the ray trace result.
|
boolean |
isChunkCollidable(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
java.lang.Object... params) |
net.minecraft.util.math.RayTraceResult |
processCallbacks(net.minecraft.world.chunk.Chunk chunk,
Point src,
Point dest) |
void |
replaceBlocks(net.minecraft.world.World world,
MBlockState state)
Replaces to air all the blocks colliding with the
AxisAlignedBB of the MBlockState. |
org.apache.commons.lang3.tuple.Pair<Point,Point> |
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 boolean isChunkCollidable(net.minecraft.world.chunk.Chunk chunk,
net.minecraft.util.math.BlockPos listener,
java.lang.Object... params)
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 org.apache.commons.lang3.tuple.Pair<Point,Point> 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 net.minecraft.util.math.RayTraceResult getRayTraceResult(net.minecraft.world.World world,
org.apache.commons.lang3.tuple.Pair<Point,Point> infos,
net.minecraft.util.math.RayTraceResult result,
boolean stopOnLiquid,
boolean ignoreBlockWithoutBoundingBox,
boolean returnLastUncollidableBlock)
World.rayTraceBlocks(Vec3d, Vec3d, boolean, boolean, boolean) before each return.world - the worldresult - the moppublic net.minecraft.util.math.RayTraceResult processCallbacks(net.minecraft.world.chunk.Chunk chunk,
Point src,
Point dest)
public 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.