Class LodestoneWorldgenBuilderEntry

java.lang.Object
team.lodestar.lodestone.systems.worldgen.LodestoneWorldgenBuilderEntry

public class LodestoneWorldgenBuilderEntry extends Object
  • Field Details

    • pos

      protected net.minecraft.core.BlockPos pos
    • state

      protected net.minecraft.world.level.block.state.BlockState state
    • placementCondition

      protected PlacementCondition placementCondition
    • additionalPlacement

      protected AdditionalPlacement additionalPlacement
    • important

      protected boolean important
  • Constructor Details

    • LodestoneWorldgenBuilderEntry

      public LodestoneWorldgenBuilderEntry(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
  • Method Details

    • position

      public net.minecraft.core.BlockPos position()
    • blockState

      public net.minecraft.world.level.block.state.BlockState blockState()
    • changePos

      public LodestoneWorldgenBuilderEntry changePos(Function<net.minecraft.core.BlockPos,net.minecraft.core.BlockPos> function)
      Changes the position of this entry using a function.
      Parameters:
      function - The function to apply to the current position.
    • changePos

      public LodestoneWorldgenBuilderEntry changePos(net.minecraft.core.BlockPos pos)
      Changes the position of this entry using a new position.
      Parameters:
      pos - The new position to set for this entry.
    • changeState

      public LodestoneWorldgenBuilderEntry changeState(Function<net.minecraft.world.level.block.state.BlockState,net.minecraft.world.level.block.state.BlockState> function)
      Changes the block state of this entry using a function.
      Parameters:
      function - The function to apply to the current block state.
    • changeState

      public LodestoneWorldgenBuilderEntry changeState(net.minecraft.world.level.block.state.BlockState state)
      Changes the block state of this entry.
      Parameters:
      state - The new block state to set for this entry.
    • addPlacementCondition

      public LodestoneWorldgenBuilderEntry addPlacementCondition(PlacementCondition placementCondition)
      Adds a condition to the placement of this entry, which will be checked before placing the block.
      Parameters:
      placementCondition - The placement condition to add to this entry.
    • addAdditionalPlacement

      public LodestoneWorldgenBuilderEntry addAdditionalPlacement(AdditionalPlacement additionalPlacement)
      Adds additional placement behavior to this entry which will be executed after the block is placed.
      Parameters:
      additionalPlacement - The additional placement to add to this entry.
    • setImportant

      public LodestoneWorldgenBuilderEntry setImportant()
      \ Marks this entry as important, meaning it will be placed even if a previous layer already placed a block at the same position.
    • isImportant

      public boolean isImportant()
    • hasPlacementCondition

      public boolean hasPlacementCondition()
    • hasAdditionalPlacement

      public boolean hasAdditionalPlacement()
    • canPlace

      public boolean canPlace(net.minecraft.world.level.WorldGenLevel level)
    • tryPlace

      public boolean tryPlace(net.minecraft.world.level.WorldGenLevel level)
    • place

      public void place(net.minecraft.world.level.WorldGenLevel level)
    • place

      public void place(net.minecraft.world.level.WorldGenLevel level, net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state)
      Places a block at the specified position. For use with the additional placement.
      Parameters:
      level - The world to place the block in.
      pos - The position to place the block at.
      state - The block state to place at the position.