Class ExpandLootContextParams

java.lang.Object
com.blamejared.crafttweaker.natives.loot.param.ExpandLootContextParams

@ZenRegister public final class ExpandLootContextParams extends Object
These are pre-registered params that are used by vanilla.

You can also create your own using getOrCreate

  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.entity.BlockEntity>
    Gets the 'block_entity' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.state.BlockState>
    Gets the 'block_state' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.damagesource.DamageSource>
    Gets the 'damage_source' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity>
    Gets the 'direct_killer_entity' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<Float>
    Gets the 'explosion_radius' param.
    static <T> net.minecraft.world.level.storage.loot.parameters.LootContextParam<T>
    getOrCreate(net.minecraft.resources.ResourceLocation name, Class<T> tClass)
    Gets or creates a new parameter with the given name, using the given type.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity>
    Gets the 'killer_entity' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.player.Player>
    Gets the 'last_damage_player' parameter.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.phys.Vec3>
    Gets the 'origin' param.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity>
    Gets the 'this_entity' parameter.
    static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.item.ItemStack>
    Gets the 'tool' param.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ExpandLootContextParams

      public ExpandLootContextParams()
  • Method Details

    • thisEntity

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> thisEntity()
      Gets the 'this_entity' parameter.
      Returns:
      The 'this_entity' parameter.
    • lastDamagePlayer

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.player.Player> lastDamagePlayer()
      Gets the 'last_damage_player' parameter.
      Returns:
      The 'last_damage_player' parameter.
    • damageSource

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.damagesource.DamageSource> damageSource()
      Gets the 'damage_source' param.
      Returns:
      The 'damage_source' param.
    • killerEntity

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> killerEntity()
      Gets the 'killer_entity' param.
      Returns:
      The 'killer_entity' param.
    • directKillerEntity

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.entity.Entity> directKillerEntity()
      Gets the 'direct_killer_entity' param.
      Returns:
      The 'direct_killer_entity' param.
    • origin

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.phys.Vec3> origin()
      Gets the 'origin' param.
      Returns:
      The 'origin' param.
    • blockState

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.state.BlockState> blockState()
      Gets the 'block_state' param.
      Returns:
      The 'block_state' param.
    • blockEntity

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.level.block.entity.BlockEntity> blockEntity()
      Gets the 'block_entity' param.
      Returns:
      The 'block_entity' param.
    • tool

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<net.minecraft.world.item.ItemStack> tool()
      Gets the 'tool' param.
      Returns:
      The 'tool' param.
    • explosionRadius

      public static net.minecraft.world.level.storage.loot.parameters.LootContextParam<Float> explosionRadius()
      Gets the 'explosion_radius' param.
      Returns:
      The 'explosion_radius' param.
    • getOrCreate

      public static <T> net.minecraft.world.level.storage.loot.parameters.LootContextParam<T> getOrCreate(net.minecraft.resources.ResourceLocation name, Class<T> tClass)
      Gets or creates a new parameter with the given name, using the given type.
      Type Parameters:
      T - The type that the parameter acts on.
      Parameters:
      name - The name of the parameter.
      Returns:
      The parameter with the given name or a new parameter if there are no registered parameters with the name.
      DocParam:
      name "height"