BlockBuilder
The blockbuilder is used to... build blocks (you totally didn't see that one coming, right... right?).
Once you created it you can set various properties which will be outlined by the separate methods. You can also change the block's type to create a more specialized form of block (e.g. stairs or Blocks that can be rotated in the same way logs can). Pour dire à CoT que vous voulez que le bloc apparaisse en jeu, vous devez appeler mods.contenttweaker.block.BlockBuilder#build(String) et spécifier un chemin d'emplacement de ressource valide.
This class was added by a mod with mod-id contenttweaker
. So you need to have this mod installed if you want to use this feature.
Importing the class
It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import.
Implemented Interfaces
BlockBuilder implements the following interfaces. That means any method available to them can also be used on this class.
Constructors
Creates a new BlockBuilder. Rappelez-vous que cela ne va pas créer un nouveau bloc dans le jeu, tu dois appeler mods.contenttweaker.block.BlockBuilder#build(String) pour cela.
Methods
build
Instructs CoT to actually build whatever this builder is supposed to be building.
withHardnessAndResistance
Sets the block's hardness and resistance levels. Unlike the other method, this one only accepts one parameter and will use that value for both properties.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
Sets the block's hardness and resistance levels. Unlike the other method, this one allows you to set each property one to a separate value.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withHarvestLevel
Sets the mining level required to mine this block
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withHarvestTool
Sets the tool required to harvest this block
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withItemGroup
Sets the item group in which this block will appear
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withLightValue
Sets the block's light value.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withLootFrom
Will instruct CoT to override this block's loot table with the one of the block Provided. Currently this will still create a loot table entry, though it will be ignored by the game.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withMaxStackSize
Sets the maximum Stack size that this block can have when in your inventory. Will be 64 if unchanged.
Returns: This builder, used for chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withRarity
Allows you to set the rarity of this block.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withSlipperiness
Sets the slipperiness.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withType
Sets the specific type of this block. After this method is called the builder's context will switch to the more provided type builder. That means that the methods of this builder will no longer be available, so any properties you wish to set should be set before you call this method.
Returns: A builder with the given block.
Return type: T
withoutDrops
Will instruct CoT that this block will not have any loot entries. Currently this will still create a loot table entry, though it will be ignored by the game.
Returns: This builder, used for method chaining
Type de retour : mods.contenttweaker.block.BlockBuilder
withoutMovementBlocking
Instructs CoT that this block will does not block movement.
Returns: This builder, used for chaining
Type de retour : mods.contenttweaker.block.BlockBuilder