public class ChunkCollision
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
ChunkCollision.ChunkProcedure |
Modifier and Type | Field and Description |
---|---|
static ChunkCollision |
client |
static ChunkCollision |
server |
Modifier and Type | Method and Description |
---|---|
boolean |
canPlaceBlock(net.minecraft.world.World world,
net.minecraft.block.Block block,
int x,
int y,
int z)
Checks whether the block can be placed at the position.
|
static boolean |
canPlaceBlockAt(net.minecraft.world.World world,
net.minecraft.block.Block block,
int x,
int y,
int z)
Checks whether the block can be placed at the position.
|
static 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.
|
static net.minecraft.util.MovingObjectPosition |
getRayTraceResult(net.minecraft.world.World world,
net.minecraft.util.MovingObjectPosition mop)
Gets the ray trace result.
|
void |
onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
Server only.
|
void |
onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
On data load.
|
void |
onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event) |
void |
setCoords(int chunkX,
int chunkZ,
long[] coords)
Client only.
|
static void |
setRayTraceInfos(net.minecraft.world.World world,
Point src,
Point dest) |
static void |
setRayTraceInfos(net.minecraft.world.World world,
net.minecraft.util.Vec3 src,
net.minecraft.util.Vec3 dest)
Sets the ray trace infos.
|
java.lang.String |
toString() |
static void |
updateCollisionCoordinates(net.minecraft.world.chunk.Chunk chunk,
int x,
int y,
int z,
net.minecraft.block.Block old,
net.minecraft.block.Block block)
Update chunk collision coordinates.
|
public static ChunkCollision server
public static ChunkCollision client
public static void updateCollisionCoordinates(net.minecraft.world.chunk.Chunk chunk, int x, int y, int z, net.minecraft.block.Block old, net.minecraft.block.Block block)
Chunk.func_150807_a(int, int, int, Block, int)
(setBlock())chunk
- the chunkx
- the xy
- the yz
- the zold
- the oldblock
- the blockpublic static 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 static void setRayTraceInfos(net.minecraft.world.World world, net.minecraft.util.Vec3 src, net.minecraft.util.Vec3 dest)
World.func_147447_a(Vec3, Vec3, boolean, boolean, boolean)
(rayTrace())world
- the worldsrc
- the srcdest
- the destpublic static void setRayTraceInfos(net.minecraft.world.World world, Point src, Point dest)
public static net.minecraft.util.MovingObjectPosition getRayTraceResult(net.minecraft.world.World world, net.minecraft.util.MovingObjectPosition mop)
World.func_147447_a(Vec3, Vec3, boolean, boolean, boolean)
(rayTrace()) before each return.world
- the worldmop
- the moppublic static boolean canPlaceBlockAt(net.minecraft.world.World world, net.minecraft.block.Block block, int x, int y, int z)
World.canPlaceEntityOnSide(Block, int, int, int, boolean, int, Entity, net.minecraft.item.ItemStack)
at
the begining.world
- the worldblock
- the blockx
- the xy
- the yz
- the zpublic boolean canPlaceBlock(net.minecraft.world.World world, net.minecraft.block.Block block, int x, int y, int z)
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 onDataLoad(net.minecraftforge.event.world.ChunkDataEvent.Load event)
event
- the eventpublic void onDataSave(net.minecraftforge.event.world.ChunkDataEvent.Save event)
public void onChunkWatched(net.minecraftforge.event.world.ChunkWatchEvent.Watch event)
event
- the eventpublic void setCoords(int chunkX, int chunkZ, long[] coords)
ChunkCollisionMessage
.chunkX
- the chunk xchunkZ
- the chunk zcoords
- the coordspublic java.lang.String toString()
toString
in class java.lang.Object