Record Class MatchBlock

java.lang.Object
java.lang.Record
net.minecraft.world.level.storage.loot.predicates.MatchBlock
All Implemented Interfaces:
Predicate<LootContext>, LootContextUser, LootItemCondition, Validatable

public record MatchBlock(BlockPredicate predicate) extends Record implements LootItemCondition
  • Field Details

    • predicate

      private final BlockPredicate predicate
      The field for the predicate record component.
    • MAP_CODEC

      public static final com.mojang.serialization.MapCodec<MatchBlock> MAP_CODEC
  • Constructor Details

    • MatchBlock

      public MatchBlock(BlockPredicate predicate)
      Creates an instance of a MatchBlock record class.
      Parameters:
      predicate - the value for the predicate record component
  • Method Details