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,
int x,
int y,
int z,
int side)
Checks whether the block can be placed at the position.
|
static ChunkCollision |
get() |
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,
BlockState state) |
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,
BlockState state) |
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,
int x,
int y,
int z,
int side)
World.canPlaceEntityOnSide(Block, int, int, int, boolean, int, Entity, net.minecraft.item.ItemStack) at
the begining.IChunkCollidable) against the occupied blocks position, then against all the bounding
boxes of the IChunkCollidable available for those chunks.world - the worldblock - the blockx - the xy - the yz - the zpublic void replaceBlocks(net.minecraft.world.World world,
BlockState state)
public void updateBlocks(net.minecraft.world.World world,
BlockState state)
public static ChunkCollision get()