Class WoodTypeBuilder
WoodType
s.
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
-
Method Summary
Modifier and TypeMethodDescriptionbuild
(Identifier id, BlockSetType setType) Builds aWoodType
from this builder's values without registering it.static WoodTypeBuilder
copyOf
(WoodTypeBuilder builder) Creates a newWoodTypeBuilder
that copies all of another builder's values.static WoodTypeBuilder
Creates a newWoodTypeBuilder
that 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 aWoodType
from 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 newWoodTypeBuilder
that copies all of another builder's values.- Parameters:
builder
- theWoodTypeBuilder
whose values are to be copied- Returns:
- the created copy
-
copyOf
Creates a newWoodTypeBuilder
that copies all of another wood type's values.- Parameters:
woodType
- theWoodType
whose values are to be copied- Returns:
- the created copy
-
register
Builds and registers aWoodType
from 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 builtWoodType
setType
- theBlockSetType
for the builtWoodType
- Returns:
- the built and registered
WoodType
-
build
Builds aWoodType
from 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 builtWoodType
setType
- theBlockSetType
for the builtWoodType
- Returns:
- the built
WoodType
-