Record Class ProtectedBlockProcessor
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.templatesystem.ProtectedBlockProcessor
- All Implemented Interfaces:
StructureProcessor
public record ProtectedBlockProcessor(HolderSet<Block> cannotReplace)
extends Record
implements StructureProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionThe field for thecannotReplacerecord component.static final com.mojang.serialization.MapCodec<ProtectedBlockProcessor> -
Constructor Summary
ConstructorsConstructorDescriptionProtectedBlockProcessor(HolderSet<Block> cannotReplace) Creates an instance of aProtectedBlockProcessorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecannotReplacerecord component.com.mojang.serialization.MapCodec<ProtectedBlockProcessor> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.processBlock(LevelReader level, BlockPos targetPosition, BlockPos referencePos, BlockPos templateRelativePos, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) final StringtoString()Returns a string representation of this record class.Methods inherited from interface StructureProcessor
evaluatesEntirePieceState, finalizeProcessing, process, processEntity
-
Field Details
-
cannotReplace
-
MAP_CODEC
-
-
Constructor Details
-
ProtectedBlockProcessor
-
-
Method Details
-
processBlock
public @Nullable StructureTemplate.StructureBlockInfo processBlock(LevelReader level, BlockPos targetPosition, BlockPos referencePos, BlockPos templateRelativePos, StructureTemplate.StructureBlockInfo processedBlockInfo, StructurePlaceSettings settings) - Specified by:
processBlockin interfaceStructureProcessor
-
codec
- Specified by:
codecin interfaceStructureProcessor
-
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). -
cannotReplace
-