Class Carver<C extends CarverConfig>

java.lang.Object
net.minecraft.world.gen.carver.Carver<C>
Direct Known Subclasses:
CaveCarver, RavineCarver

public abstract class Carver<C extends CarverConfig>
extends Object
  • Field Details

  • Constructor Details

    • Carver

      public Carver​(com.mojang.serialization.Codec<C> configCodec, int heightLimit)
  • Method Details

    • register

      private static <C extends CarverConfig,​ F extends Carver<C>> F register​(String string, F f)
    • configure

      public ConfiguredCarver<C> configure​(C config)
    • getCodec

      public com.mojang.serialization.Codec<ConfiguredCarver<C>> getCodec()
    • getBranchFactor

      public int getBranchFactor()
    • carveRegion

      protected boolean carveRegion​(Chunk chunk, Function<BlockPos,​Biome> posToBiome, long seed, int seaLevel, int chunkX, int chunkZ, double x, double y, double z, double yaw, double pitch, BitSet carvingMask)
    • carveAtPoint

      protected boolean carveAtPoint​(Chunk chunk, Function<BlockPos,​Biome> posToBiome, BitSet carvingMask, Random random, BlockPos.Mutable mutable, BlockPos.Mutable mutable2, BlockPos.Mutable mutable3, int seaLevel, int mainChunkX, int mainChunkZ, int x, int z, int relativeX, int y, int relativeZ, MutableBoolean mutableBoolean)
    • carve

      public abstract boolean carve​(Chunk chunk, Function<BlockPos,​Biome> posToBiome, Random random, int seaLevel, int chunkX, int chunkZ, int mainChunkX, int mainChunkZ, BitSet carvingMask, C c)
    • shouldCarve

      public abstract boolean shouldCarve​(Random random, int chunkX, int chunkZ, C config)
    • canAlwaysCarveBlock

      protected boolean canAlwaysCarveBlock​(BlockState state)
    • canCarveBlock

      protected boolean canCarveBlock​(BlockState state, BlockState stateAbove)
    • isRegionUncarvable

      protected boolean isRegionUncarvable​(Chunk chunk, int mainChunkX, int mainChunkZ, int relMinX, int relMaxX, int minY, int maxY, int relMinZ, int relMaxZ)
    • isOnBoundary

      private boolean isOnBoundary​(int minX, int maxX, int minZ, int maxZ, int x, int z)
    • canCarveBranch

      protected boolean canCarveBranch​(int mainChunkX, int mainChunkZ, double x, double z, int branch, int branchCount, float baseWidth)
    • isPositionExcluded

      protected abstract boolean isPositionExcluded​(double scaledRelativeX, double scaledRelativeY, double scaledRelativeZ, int y)