Class ModifierSpecificExpandEntityType

java.lang.Object
com.blamejared.crafttweaker.natives.loot.modifier.ModifierSpecificExpandEntityType

@ZenRegister public class ModifierSpecificExpandEntityType extends Object
Additional methods for easier modification of entity-related loot tables.
  • Constructor Details

    • ModifierSpecificExpandEntityType

      public ModifierSpecificExpandEntityType()
  • Method Details

    • addLootModifier

      public static void addLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, ILootModifier modifier)
      Adds an ILootModifier to the current entity.
      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      modifier - The loot modifier to add to the entity.
    • addPlayerOnlyLootModifier

      public static void addPlayerOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed by a player.
      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      modifier - The loot modifier to add to the entity.
    • addWeaponOnlyLootModifier

      public static void addWeaponOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon.

      Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      modifier - The loot modifier to add to the entity.
    • addWeaponOnlyLootModifier

      public static void addWeaponOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, boolean matchDamage, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon, optionally considering its damage.

      Additional parameters that further specify the weapon, such as NBT, or count, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      matchDamage - Whether to consider damage or not when identifying the weapon.
      modifier - The loot modifier to add to the entity.
    • addWeaponOnlyLootModifier

      public static void addWeaponOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, boolean matchDamage, boolean matchNbt, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed with the given weapon, optionally considering its damage and NBT data.

      Additional parameters that further specify the weapon, such as count, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      matchDamage - Whether to consider damage or not when identifying the weapon.
      matchNbt - Whether to consider NBT data or not when identifying the weapon.
      modifier - The loot modifier to add to the entity.
    • addWeaponAndPlayerOnlyLootModifier

      public static void addWeaponAndPlayerOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon.

      Additional parameters that further specify the weapon, such as NBT, count, or damage, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      modifier - The loot modifier to add to the entity.
    • addWeaponAndPlayerOnlyLootModifier

      public static void addWeaponAndPlayerOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, boolean matchDamage, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon, optionally considering its damage.

      Additional parameters that further specify the weapon, such as NBT, or count, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      matchDamage - Whether to consider damage or not when identifying the weapon.
      modifier - The loot modifier to add to the entity.
    • addWeaponAndPlayerOnlyLootModifier

      public static void addWeaponAndPlayerOnlyLootModifier(net.minecraft.world.entity.EntityType<net.minecraft.world.entity.Entity> internal, String name, IItemStack weapon, boolean matchDamage, boolean matchNbt, ILootModifier modifier)
      Adds an ILootModifier to the current entity that fires only if the entity was killed by a player with the given weapon, optionally considering its damage and NBT data.

      Additional parameters that further specify the weapon, such as count, are ignored.

      Parameters:
      internal - The entity to add the loot modifier to.
      name - The name of the loot modifier.
      weapon - The weapon that needs to be used to kill the entity.
      matchDamage - Whether to consider damage or not when identifying the weapon.
      matchNbt - Whether to consider NBT data or not when identifying the weapon.
      modifier - The loot modifier to add to the entity.