Class BlockHolder

java.lang.Object
net.lcc.sollib.api.common.registry.SHolder<net.minecraft.world.level.block.Block>
net.lcc.sollib.api.common.registry.holder.BlockHolder
All Implemented Interfaces:
Supplier<net.minecraft.world.level.block.Block>

public class BlockHolder extends SHolder<net.minecraft.world.level.block.Block>
  • Constructor Details

  • Method Details

    • getRegistry

      public net.minecraft.core.Registry<net.minecraft.world.level.block.Block> getRegistry()
      Overrides:
      getRegistry in class SHolder<net.minecraft.world.level.block.Block>
    • withItem

      public BlockHolder withItem()
    • withItem

      public BlockHolder withItem(Consumer<ItemHolder> consumer)
    • withTags

      @SafeVarargs public final BlockHolder withTags(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>... tags)
      Registers this item to the supplied tags
      Parameters:
      tags - the tag keys to register the item to
    • getTags

      public List<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> getTags()
    • getDrop

      public Supplier<net.minecraft.world.level.ItemLike> getDrop()
    • getDropCount

      public net.minecraft.world.level.storage.loot.providers.number.NumberProvider getDropCount()
    • dropsSelf

      public BlockHolder dropsSelf()
    • dropsOther

      public final BlockHolder dropsOther(Supplier<net.minecraft.world.level.ItemLike> drop)
    • dropsOther

      public final BlockHolder dropsOther(Supplier<net.minecraft.world.level.ItemLike> drop, int count)
    • dropsOther

      public final BlockHolder dropsOther(Supplier<net.minecraft.world.level.ItemLike> drop, net.minecraft.world.level.storage.loot.providers.number.NumberProvider count)
    • dropsWithSilk

      public BlockHolder dropsWithSilk()
    • hasDrop

      public boolean hasDrop()
    • withModel

      public BlockHolder withModel(BlockModel model)
      The model type of this block for datagen If any of the blockset are added to this block, this value will be ignored and CUBE will be used
    • hasModel

      public boolean hasModel()
    • getModel

      public BlockModel getModel()
    • cutout

      public BlockHolder cutout()
    • isCutout

      public boolean isCutout()
    • withFlammability

      public BlockHolder withFlammability(int ignite, int spread)
    • isFlammable

      public boolean isFlammable()
    • getFlammability

      public Flammability getFlammability()
    • withStripResult

      public BlockHolder withStripResult(Supplier<net.minecraft.world.level.block.Block> stripResult)
      Adds the ability to strip this block with an axe
      Parameters:
      stripResult - the block to set it to when it gets stripped
    • hasStripResult

      public boolean hasStripResult()
    • getStripResult

      public Supplier<net.minecraft.world.level.block.Block> getStripResult()
    • withStairs

      public BlockHolder withStairs()
    • withStairs

      public BlockHolder withStairs(Consumer<BlockHolder> consumer)
    • getStairs

      public BlockHolder getStairs()
    • withSlab

      public BlockHolder withSlab()
    • withSlab

      public BlockHolder withSlab(Consumer<BlockHolder> consumer)
    • getSlab

      public BlockHolder getSlab()
    • withWall

      public BlockHolder withWall()
    • withWall

      public BlockHolder withWall(Consumer<BlockHolder> consumer)
    • getWall

      public BlockHolder getWall()
    • withButton

      public BlockHolder withButton(net.minecraft.world.level.block.state.properties.BlockSetType type, int ticksPressed)
    • withButton

      public BlockHolder withButton(Consumer<BlockHolder> consumer)
    • getButton

      public BlockHolder getButton()
    • withPressurePlate

      public BlockHolder withPressurePlate(net.minecraft.world.level.block.state.properties.BlockSetType type)
    • withPressurePlate

      public BlockHolder withPressurePlate(Consumer<BlockHolder> consumer)
    • getPressurePlate

      public BlockHolder getPressurePlate()
    • withFence

      public BlockHolder withFence()
    • withFence

      public BlockHolder withFence(Consumer<BlockHolder> consumer)
    • getFence

      public BlockHolder getFence()
    • withFenceGate

      public BlockHolder withFenceGate(net.minecraft.world.level.block.state.properties.WoodType woodType)
    • withFenceGate

      public BlockHolder withFenceGate(Consumer<BlockHolder> consumer)
    • getFenceGate

      public BlockHolder getFenceGate()
    • getBlockSet

      public Map<BlockModel,BlockHolder> getBlockSet()