Class WoodTypeBuilder
WoodTypes.
A WoodType is used to tell the game what textures signs should use, as well as sounds for both signs and fence gates.
Regular sign textures are stored at [namespace]/textures/entity/signs/[path].png.
Hanging sign textures are stored at [namespace]/textures/entity/signs/hanging/[path].png.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(Identifier id, BlockSetType setType) Builds aWoodTypefrom this builder's values without registering it.static WoodTypeBuildercopyOf(WoodTypeBuilder builder) Creates a newWoodTypeBuilderthat copies all of another builder's values.static WoodTypeBuilderCreates a newWoodTypeBuilderthat copies all of another wood type's values.fenceGateCloseSound(SoundEvent fenceGateCloseSound) Sets this wood type's fence gate close sound.fenceGateOpenSound(SoundEvent fenceGateOpenSound) Sets this wood type's fence gate open sound.hangingSignSoundGroup(BlockSoundGroup hangingSignSoundGroup) Sets this wood type's hanging sign sound group.register(Identifier id, BlockSetType setType) Builds and registers aWoodTypefrom this builder's values.soundGroup(BlockSoundGroup soundGroup) Sets this wood type's sound group.
-
Constructor Details
-
WoodTypeBuilder
public WoodTypeBuilder()
-
-
Method Details
-
soundGroup
Sets this wood type's sound group.Defaults to
BlockSoundGroup.WOOD.- Returns:
- this builder for chaining
-
hangingSignSoundGroup
Sets this wood type's hanging sign sound group.Defaults to
BlockSoundGroup.HANGING_SIGN.- Returns:
- this builder for chaining
-
fenceGateCloseSound
Sets this wood type's fence gate close sound.Defaults to
SoundEvents.BLOCK_FENCE_GATE_CLOSE.- Returns:
- this builder for chaining
-
fenceGateOpenSound
Sets this wood type's fence gate open sound.Defaults to
SoundEvents.BLOCK_FENCE_GATE_OPEN.- Returns:
- this builder for chaining
-
copyOf
Creates a newWoodTypeBuilderthat copies all of another builder's values.- Parameters:
builder- theWoodTypeBuilderwhose values are to be copied- Returns:
- the created copy
-
copyOf
Creates a newWoodTypeBuilderthat copies all of another wood type's values.- Parameters:
woodType- theWoodTypewhose values are to be copied- Returns:
- the created copy
-
register
Builds and registers aWoodTypefrom this builder's values.Alternatively, you can use
build(Identifier, BlockSetType)to build without registering.
ThenWoodType.register(WoodType)can be used to register it later.- Parameters:
id- the id for the builtWoodTypesetType- theBlockSetTypefor the builtWoodType- Returns:
- the built and registered
WoodType
-
build
Builds aWoodTypefrom this builder's values without registering it.Use
WoodType.register(WoodType)to register it later.
Alternatively, you can useregister(Identifier, BlockSetType)to build and register it now.- Parameters:
id- the id for the builtWoodTypesetType- theBlockSetTypefor the builtWoodType- Returns:
- the built
WoodType
-