Package api.world

Class WorldUtils

java.lang.Object
api.world.WorldUtils

public class WorldUtils extends Object
Helper functions related to the world
  • Constructor Details

    • WorldUtils

      public WorldUtils()
  • Method Details

    • isReplaceableBlock

      public static boolean isReplaceableBlock(World world, int i, int j, int k)
    • 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

      public static int isValidSourceForFluidBlockToFacing(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 otherwise
    • isValidLightLevelForMobSpawning

      public static boolean isValidLightLevelForMobSpawning(World world, int x, int y, int z)
    • canMobsSpawnHere

      public static boolean canMobsSpawnHere(World world, int i, int j, int k)
    • 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

      public static boolean isBlockRestingOnThatBelow(IBlockAccess blockAccess, int i, int j, int k)
    • doesBlockHaveSolidTopSurface

      public static boolean doesBlockHaveSolidTopSurface(IBlockAccess blockAccess, int i, int j, int k)
      Functionality duplicated from world.java to allow use of blockAccess on server
    • isStairBlock

      public static boolean isStairBlock(IBlockAccess blockAccess, int i, int j, int k)
      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

      public static void sendPacketToPlayer(NetServerHandler handler, Packet packet)
      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

      public static void clearAnyGroundCoverOnBlock(World world, int i, int j, int k)
    • isGroundCoverOnBlock

      public static boolean isGroundCoverOnBlock(IBlockAccess blockAccess, int i, int j, int k)
    • isWaterSourceBlock

      public static boolean isWaterSourceBlock(World world, int i, int j, int k)