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>
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionBlockHolder(SolModContainer mod, String name, Supplier<net.minecraft.world.level.block.Block> entrySupplier) -
Method Summary
Modifier and TypeMethodDescriptioncutout()final BlockHolderdropsOther(Supplier<net.minecraft.world.level.ItemLike> drop) final BlockHolderdropsOther(Supplier<net.minecraft.world.level.ItemLike> drop, int count) final BlockHolderdropsOther(Supplier<net.minecraft.world.level.ItemLike> drop, net.minecraft.world.level.storage.loot.providers.number.NumberProvider count) Supplier<net.minecraft.world.level.ItemLike> getDrop()net.minecraft.world.level.storage.loot.providers.number.NumberProvidergetFence()getModel()net.minecraft.core.Registry<net.minecraft.world.level.block.Block> getSlab()Supplier<net.minecraft.world.level.block.Block> List<net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>> getTags()getWall()booleanhasDrop()booleanhasModel()booleanbooleanisCutout()booleanwithButton(Consumer<BlockHolder> consumer) withButton(net.minecraft.world.level.block.state.properties.BlockSetType type, int ticksPressed) withFence(Consumer<BlockHolder> consumer) withFenceGate(Consumer<BlockHolder> consumer) withFenceGate(net.minecraft.world.level.block.state.properties.WoodType woodType) withFlammability(int ignite, int spread) withItem()withItem(Consumer<ItemHolder> consumer) 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 usedwithPressurePlate(Consumer<BlockHolder> consumer) withPressurePlate(net.minecraft.world.level.block.state.properties.BlockSetType type) withSlab()withSlab(Consumer<BlockHolder> consumer) withStairs(Consumer<BlockHolder> consumer) withStripResult(Supplier<net.minecraft.world.level.block.Block> stripResult) Adds the ability to strip this block with an axefinal BlockHolderwithTags(net.minecraft.tags.TagKey<net.minecraft.world.level.block.Block>... tags) Registers this item to the supplied tagswithWall()withWall(Consumer<BlockHolder> consumer)
-
Constructor Details
-
BlockHolder
public BlockHolder(SolModContainer mod, String name, Supplier<net.minecraft.world.level.block.Block> entrySupplier)
-
-
Method Details
-
getRegistry
public net.minecraft.core.Registry<net.minecraft.world.level.block.Block> getRegistry()- Overrides:
getRegistryin classSHolder<net.minecraft.world.level.block.Block>
-
withItem
-
withItem
-
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
-
getDrop
-
getDropCount
public net.minecraft.world.level.storage.loot.providers.number.NumberProvider getDropCount() -
dropsSelf
-
dropsOther
-
dropsOther
-
dropsOther
public final BlockHolder dropsOther(Supplier<net.minecraft.world.level.ItemLike> drop, net.minecraft.world.level.storage.loot.providers.number.NumberProvider count) -
dropsWithSilk
-
hasDrop
public boolean hasDrop() -
withModel
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
-
cutout
-
isCutout
public boolean isCutout() -
withFlammability
-
isFlammable
public boolean isFlammable() -
getFlammability
-
withStripResult
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
-
withStairs
-
withStairs
-
getStairs
-
withSlab
-
withSlab
-
getSlab
-
withWall
-
withWall
-
getWall
-
withButton
public BlockHolder withButton(net.minecraft.world.level.block.state.properties.BlockSetType type, int ticksPressed) -
withButton
-
getButton
-
withPressurePlate
public BlockHolder withPressurePlate(net.minecraft.world.level.block.state.properties.BlockSetType type) -
withPressurePlate
-
getPressurePlate
-
withFence
-
withFence
-
getFence
-
withFenceGate
public BlockHolder withFenceGate(net.minecraft.world.level.block.state.properties.WoodType woodType) -
withFenceGate
-
getFenceGate
-
getBlockSet
-