Record Class NeoForgeUnifiedRegistries.Blocks
java.lang.Object
java.lang.Record
net.rebel459.unified.neoforge.core.NeoForgeUnifiedRegistries.Blocks
- All Implemented Interfaces:
UnifiedRegistries.Blocks
- Enclosing class:
NeoForgeUnifiedRegistries
public static record NeoForgeUnifiedRegistries.Blocks(String modId)
extends Record
implements UnifiedRegistries.Blocks
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.modId()Returns the value of themodIdrecord component.static voidmodifyBlockEntities(net.neoforged.neoforge.event.BlockEntityTypeAddBlocksEvent event) <T extends net.minecraft.world.level.block.Block>
SuppliedBlockregister(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> blockProperties) <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity>
SuppliedBlockregister(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> blockProperties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) <T extends net.minecraft.world.level.block.Block>
SuppliedBlockregisterWithoutItem(String blockPath, String itemPath, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties) <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity>
SuppliedBlockregisterWithoutItem(String blockPath, String itemPath, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) <T extends net.minecraft.world.level.block.Block>
SuppliedBlockregisterWithoutItem(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties) <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity>
SuppliedBlockregisterWithoutItem(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
BLOCK_ENTITIES
-
-
Constructor Details
-
Blocks
Creates an instance of aBlocksrecord class.- Parameters:
modId- the value for themodIdrecord component
-
-
Method Details
-
register
public <T extends net.minecraft.world.level.block.Block> SuppliedBlock register(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> blockProperties) - Specified by:
registerin interfaceUnifiedRegistries.Blocks
-
register
public <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity> SuppliedBlock register(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> blockProperties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) - Specified by:
registerin interfaceUnifiedRegistries.Blocks
-
registerWithoutItem
public <T extends net.minecraft.world.level.block.Block> SuppliedBlock registerWithoutItem(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties) - Specified by:
registerWithoutItemin interfaceUnifiedRegistries.Blocks
-
registerWithoutItem
public <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity> SuppliedBlock registerWithoutItem(String path, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) - Specified by:
registerWithoutItemin interfaceUnifiedRegistries.Blocks
-
registerWithoutItem
public <T extends net.minecraft.world.level.block.Block> SuppliedBlock registerWithoutItem(String blockPath, String itemPath, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties) - Specified by:
registerWithoutItemin interfaceUnifiedRegistries.Blocks
-
registerWithoutItem
public <T extends net.minecraft.world.level.block.Block, Y extends net.minecraft.world.level.block.entity.BlockEntity> SuppliedBlock registerWithoutItem(String blockPath, String itemPath, Function<net.minecraft.world.level.block.state.BlockBehaviour.Properties, T> function, Supplier<net.minecraft.world.level.block.state.BlockBehaviour.Properties> properties, Supplier<net.minecraft.world.level.block.entity.BlockEntityType<Y>> type) - Specified by:
registerWithoutItemin interfaceUnifiedRegistries.Blocks
-
addAlias
public void addAlias(net.minecraft.resources.Identifier convertedFrom, net.minecraft.resources.Identifier convertedTo) - Specified by:
addAliasin interfaceUnifiedRegistries.Blocks
-
modifyBlockEntities
public static void modifyBlockEntities(net.neoforged.neoforge.event.BlockEntityTypeAddBlocksEvent event) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
modId
Returns the value of themodIdrecord component.- Specified by:
modIdin interfaceUnifiedRegistries.Blocks- Returns:
- the value of the
modIdrecord component
-