public interface IItemRegistry
PneumaticRegistry.IPneumaticCraftInterface#getItemRegistry()| Modifier and Type | Method and Description |
|---|---|
void |
addTooltip(EnumUpgrade upgrade,
java.util.List<net.minecraft.util.text.ITextComponent> tooltip)
Can be used for custom upgrade items to handle tooltips.
|
boolean |
doesItemMatchFilter(net.minecraft.item.ItemStack filterStack,
net.minecraft.item.ItemStack stack,
boolean checkDurability,
boolean checkNBT,
boolean checkModSimilarity)
Convenience method to check if an item matches a given filter item.
|
int |
getModifiedVolume(net.minecraft.item.ItemStack stack,
int originalVolume)
Get the modified volume for a given item, based on the volume modifiers registered with
registerPneumaticVolumeModifier(ItemVolumeModifier). |
ISpawnerCoreStats |
getSpawnerCoreStats(net.minecraft.item.ItemStack stack)
Get some information for the given Spawner Core item.
|
IAirHandlerItem.Provider |
makeItemAirHandlerProvider(net.minecraft.item.ItemStack stack,
float maxPressure)
Create an instance of PneumaticCraft's default item air handler provider, suitable for returning
from
IForgeItem.initCapabilities(ItemStack, CompoundNBT). |
void |
registerInventoryItem(IInventoryItem handler)
Register a third-party class that can contain items.
|
void |
registerMagnetSuppressor(IMagnetSuppressor suppressor)
Register a magnet suppressor; an object which can prevent the Magnet Upgrade from pulling in (usually item)
entities.
|
void |
registerPneumaticVolumeModifier(ItemVolumeModifier modifierFunc)
Register a handler to modify the effective volume of a pneumatic item (i.e.
|
void |
registerUpgradeAcceptor(IUpgradeAcceptor upgradeAcceptor)
Register an item or block as being able to accept PneumaticCraft upgrades.
|
void registerInventoryItem(IInventoryItem handler)
IInventoryItem directly.handler - instance of any class that implements IInventoryItemvoid registerUpgradeAcceptor(IUpgradeAcceptor upgradeAcceptor)
upgradeAcceptor - the upgrade acceptorvoid addTooltip(EnumUpgrade upgrade, java.util.List<net.minecraft.util.text.ITextComponent> tooltip)
registerUpgradeAcceptor(IUpgradeAcceptor). This is intended to be called from
Item.appendHoverText(ItemStack, World, List, ITooltipFlag) method to display
which machines and/or items accept it.upgrade - the upgrade itemtooltip - the tooltip string list to append tovoid registerMagnetSuppressor(IMagnetSuppressor suppressor)
suppressor - a suppressor objectboolean doesItemMatchFilter(@Nonnull
net.minecraft.item.ItemStack filterStack,
@Nonnull
net.minecraft.item.ItemStack stack,
boolean checkDurability,
boolean checkNBT,
boolean checkModSimilarity)
ITagFilteringItem, so parameter order is important;
provide the filtering item first, and the item to check second.filterStack - the item to check againststack - the item being checkedcheckDurability - true if item durability should be taken into accountcheckNBT - true if item NBT should be taken into accountcheckModSimilarity - true to just match by the two items' mod IDsvoid registerPneumaticVolumeModifier(ItemVolumeModifier modifierFunc)
modifierFunc - a volume modifier functionint getModifiedVolume(net.minecraft.item.ItemStack stack,
int originalVolume)
registerPneumaticVolumeModifier(ItemVolumeModifier).stack - the ItemStack to checkoriginalVolume - the original volume, which is the item's base volume,
possibly already modified by Volume UpgradesISpawnerCoreStats getSpawnerCoreStats(net.minecraft.item.ItemStack stack)
stack - an ItemStack, which must be a Spawner Corejava.lang.IllegalArgumentException - if the passed ItemStack is not a Spawner CoreIAirHandlerItem.Provider makeItemAirHandlerProvider(net.minecraft.item.ItemStack stack, float maxPressure)
IForgeItem.initCapabilities(ItemStack, CompoundNBT).
You can use this method for your own air-handling items, provided that your item implements
IPressurizableItem. If you want to avoid a hard dependency on
PneumaticCraft, then create your own custom implementation of IAirHandlerItem,
and attach that implementation to your item via AttachCapabilitiesEvent.
stack - the ItemStackmaxPressure - the maximum pressure allowed for the item