Class PNCUpgradeImpl

java.lang.Object
me.desht.pneumaticcraft.common.upgrades.PNCUpgradeImpl
All Implemented Interfaces:
PNCUpgrade

public class PNCUpgradeImpl extends Object implements PNCUpgrade
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    A numeric id for the upgrade which is not guaranteed to be persistent across game restarts.
    net.minecraft.resources.ResourceLocation
    Get the upgrade's unique ID
    final net.minecraft.world.item.Item
    getItem(int tier)
    Get the corresponding item for this upgrade and tier.
    final net.minecraft.resources.ResourceLocation
    Get the corresponding item registry name for this upgrade and tier.
    final net.minecraft.world.item.ItemStack
    getItemStack(int count)
    Get an itemstack for the given upgrade
    final int
    Get the max upgrade tier allowable for this upgrade.
    final boolean
    Check if this upgrade's dependent mods are loaded.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface me.desht.pneumaticcraft.api.upgrade.PNCUpgrade

    getItem, getItemRegistryName, getItemStack
  • Method Details

    • getId

      public net.minecraft.resources.ResourceLocation getId()
      Description copied from interface: PNCUpgrade
      Get the upgrade's unique ID
      Specified by:
      getId in interface PNCUpgrade
      Returns:
      the upgrade ID
    • getCacheId

      public int getCacheId()
      Description copied from interface: PNCUpgrade
      A numeric id for the upgrade which is not guaranteed to be persistent across game restarts. Used internally for performance; do not depend on the value of this.
      Specified by:
      getCacheId in interface PNCUpgrade
      Returns:
      a numeric ID, for internal use
    • getMaxTier

      public final int getMaxTier()
      Description copied from interface: PNCUpgrade
      Get the max upgrade tier allowable for this upgrade.
      Specified by:
      getMaxTier in interface PNCUpgrade
      Returns:
      the max tier
    • isDependencyLoaded

      public final boolean isDependencyLoaded()
      Description copied from interface: PNCUpgrade
      Check if this upgrade's dependent mods are loaded. Used to control whether the upgrade is added to the creative item list (and thus JEI), and whether any upgrade info is shown for it in GUI side tabs. Note that upgrades are always registered in Forge registries, even if dependent mods are missing.
      Specified by:
      isDependencyLoaded in interface PNCUpgrade
      Returns:
      true if this upgrade's dependencies are satisfied, false otherwise
    • getItemRegistryName

      public final net.minecraft.resources.ResourceLocation getItemRegistryName(int tier)
      Description copied from interface: PNCUpgrade
      Get the corresponding item registry name for this upgrade and tier. The item ID is determined by appending "_upgrade" to the upgrade's ID, followed by "_{tier-number}" if this upgrade has more than one tier.
      Specified by:
      getItemRegistryName in interface PNCUpgrade
      Parameters:
      tier - the upgrade tier
      Returns:
      an item registry name
    • getItem

      public final net.minecraft.world.item.Item getItem(int tier)
      Description copied from interface: PNCUpgrade
      Get the corresponding item for this upgrade and tier. The item ID is determined by appending "_upgrade" to th upgrade's ID, followed by "_{tier-number}" if this upgrade has more than one tier.
      Specified by:
      getItem in interface PNCUpgrade
      Parameters:
      tier - the upgrade tier
      Returns:
      a Minecraft item, or air if no corresponding item can be found
    • getItemStack

      public final net.minecraft.world.item.ItemStack getItemStack(int count)
      Description copied from interface: PNCUpgrade
      Get an itemstack for the given upgrade
      Specified by:
      getItemStack in interface PNCUpgrade
      Parameters:
      count - number of items in the stack
      Returns:
      an upgrade itemstack