Package api.world
Class WorldUtils
java.lang.Object
api.world.WorldUtils
Helper functions related to the world
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanMobsSpawnHere(World world, int i, int j, int k) static voidclearAnyGroundCoverOnBlock(World world, int i, int j, int k) static booleandoesBlockHaveCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) static booleandoesBlockHaveCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) static booleandoesBlockHaveLargeCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) static booleandoesBlockHaveLargeCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) static booleandoesBlockHaveSmallCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) static booleandoesBlockHaveSmallCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) static booleandoesBlockHaveSolidTopSurface(IBlockAccess blockAccess, int i, int j, int k) Functionality duplicated from world.java to allow use of blockAccess on serverstatic booleanstatic booleanstatic booleanstatic voidstatic voidstatic voidstatic longstatic booleanhasNeighborWithMortarInFullFaceContactToFacing(World world, int i, int j, int k, int iFacing) static booleanhasNeighborWithMortarInSlabSideContactToFacing(World world, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) static booleanhasNeighborWithMortarInStairNarrowVerticalContactToFacing(World world, int i, int j, int k, int iFacing, int iStairFacing) static booleanhasNeighborWithMortarInStairShapedContactToFacing(World world, int i, int j, int k, int iFacing) static booleanhasStickySnowNeighborInFullFaceContactToFacing(World world, int i, int j, int k, int iFacing) static booleanhasStickySnowNeighborInSlabSideContactToFacing(World world, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) static booleanisBlockRestingOnThatBelow(IBlockAccess blockAccess, int i, int j, int k) static booleanisGroundCoverOnBlock(IBlockAccess blockAccess, int i, int j, int k) static booleanisReplaceableBlock(World world, int i, int j, int k) static booleanisStairBlock(IBlockAccess blockAccess, int i, int j, int k) Used to determine if this is a stair block for purposes of connecting visually to othersstatic booleanisValidLightLevelForMobSpawning(World world, int x, int y, int z) static intisValidSourceForFluidBlockToFacing(World world, int i, int j, int k, int iFacing) Returns the height level of the source (0 to 8) if a valid source for the fluid block, -1 otherwisestatic booleanisWaterSourceBlock(World world, int i, int j, int k) static MovingObjectPositionrayTraceBlocksAlwaysHitWaterAndLava(World world, Vec3 vec3d, Vec3 vec3d1, boolean flag, boolean flag1) static MovingObjectPositionrayTraceBlocksAlwaysHitWaterAndLavaAndFire(World world, Vec3 vec3d, Vec3 vec3d1, boolean flag, boolean flag1) static introtateFacingForCoordBaseMode(int iFacing, int iCoordBaseMode) Used during structure (temples, etc.) generation to rotate block facings relative to the orientation of the structure.static voidsendPacketToAllPlayersTrackingEntity(WorldServer world, Entity entity, Packet packet) Naming wiggle to compensate for different deobfuscated function name on client and serverstatic voidsendPacketToPlayer(NetServerHandler handler, Packet packet) Naming wiggle to compensate for different deobfuscated function name on client and server
-
Constructor Details
-
WorldUtils
public WorldUtils()
-
-
Method Details
-
isReplaceableBlock
-
rayTraceBlocksAlwaysHitWaterAndLava
public static MovingObjectPosition rayTraceBlocksAlwaysHitWaterAndLava(World world, Vec3 vec3d, Vec3 vec3d1, boolean flag, boolean flag1) -
rayTraceBlocksAlwaysHitWaterAndLavaAndFire
public static MovingObjectPosition rayTraceBlocksAlwaysHitWaterAndLavaAndFire(World world, Vec3 vec3d, Vec3 vec3d1, boolean flag, boolean flag1) -
isValidSourceForFluidBlockToFacing
Returns the height level of the source (0 to 8) if a valid source for the fluid block, -1 otherwise -
isValidLightLevelForMobSpawning
-
canMobsSpawnHere
-
doesBlockHaveSmallCenterHardpointToFacing
public static boolean doesBlockHaveSmallCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) -
doesBlockHaveSmallCenterHardpointToFacing
public static boolean doesBlockHaveSmallCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
doesBlockHaveCenterHardpointToFacing
public static boolean doesBlockHaveCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) -
doesBlockHaveCenterHardpointToFacing
public static boolean doesBlockHaveCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
doesBlockHaveLargeCenterHardpointToFacing
public static boolean doesBlockHaveLargeCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing, boolean bIgnoreTransparency) -
doesBlockHaveLargeCenterHardpointToFacing
public static boolean doesBlockHaveLargeCenterHardpointToFacing(IBlockAccess blockAccess, int i, int j, int k, int iFacing) -
isBlockRestingOnThatBelow
-
doesBlockHaveSolidTopSurface
Functionality duplicated from world.java to allow use of blockAccess on server -
isStairBlock
Used to determine if this is a stair block for purposes of connecting visually to others -
getOverworldTimeServerOnly
public static long getOverworldTimeServerOnly() -
gameProgressHasNetherBeenAccessedServerOnly
public static boolean gameProgressHasNetherBeenAccessedServerOnly() -
gameProgressSetNetherBeenAccessedServerOnly
public static void gameProgressSetNetherBeenAccessedServerOnly() -
gameProgressHasWitherBeenSummonedServerOnly
public static boolean gameProgressHasWitherBeenSummonedServerOnly() -
gameProgressSetWitherHasBeenSummonedServerOnly
public static void gameProgressSetWitherHasBeenSummonedServerOnly() -
gameProgressHasEndDimensionBeenAccessedServerOnly
public static boolean gameProgressHasEndDimensionBeenAccessedServerOnly() -
gameProgressSetEndDimensionHasBeenAccessedServerOnly
public static void gameProgressSetEndDimensionHasBeenAccessedServerOnly() -
rotateFacingForCoordBaseMode
public static int rotateFacingForCoordBaseMode(int iFacing, int iCoordBaseMode) Used during structure (temples, etc.) generation to rotate block facings relative to the orientation of the structure. Largely copied out of a portion of StructureComponent.getMetadataWithOffset() -
sendPacketToAllPlayersTrackingEntity
public static void sendPacketToAllPlayersTrackingEntity(WorldServer world, Entity entity, Packet packet) Naming wiggle to compensate for different deobfuscated function name on client and server -
sendPacketToPlayer
Naming wiggle to compensate for different deobfuscated function name on client and server -
hasNeighborWithMortarInFullFaceContactToFacing
public static boolean hasNeighborWithMortarInFullFaceContactToFacing(World world, int i, int j, int k, int iFacing) -
hasNeighborWithMortarInSlabSideContactToFacing
public static boolean hasNeighborWithMortarInSlabSideContactToFacing(World world, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) -
hasNeighborWithMortarInStairShapedContactToFacing
public static boolean hasNeighborWithMortarInStairShapedContactToFacing(World world, int i, int j, int k, int iFacing) -
hasNeighborWithMortarInStairNarrowVerticalContactToFacing
public static boolean hasNeighborWithMortarInStairNarrowVerticalContactToFacing(World world, int i, int j, int k, int iFacing, int iStairFacing) -
hasStickySnowNeighborInFullFaceContactToFacing
public static boolean hasStickySnowNeighborInFullFaceContactToFacing(World world, int i, int j, int k, int iFacing) -
hasStickySnowNeighborInSlabSideContactToFacing
public static boolean hasStickySnowNeighborInSlabSideContactToFacing(World world, int i, int j, int k, int iFacing, boolean bIsSlabUpsideDown) -
clearAnyGroundCoverOnBlock
-
isGroundCoverOnBlock
-
isWaterSourceBlock
-