diff options
| author | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
|---|---|---|
| committer | Jason Mitchell <mitchej@gmail.com> | 2023-01-28 19:32:44 -0800 |
| commit | 55f64675b42ac8d3c557cc850f78664bee006f6f (patch) | |
| tree | 2afd26dd3d5e6f763119bc192b57c66a1a075922 /src/main/java/gtPlusPlus/xmod/gregtech/api/energy | |
| parent | 0f5dfd01b877b6a1019e0671b88d07974aae68c0 (diff) | |
| download | GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.gz GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.tar.bz2 GT5-Unofficial-55f64675b42ac8d3c557cc850f78664bee006f6f.zip | |
[ci skip] spotlessApply with the new settings
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/energy')
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java | 5 | ||||
| -rw-r--r-- | src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java | 65 |
2 files changed, 32 insertions, 38 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java index d4a7f97051..78b5cced08 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItem.java @@ -9,6 +9,7 @@ import net.minecraft.item.ItemStack; * The item should have a maximum damage of 13. */ public interface IC2ElectricItem { + /** * Determine if the item can be used in a machine or as an armor part to supply energy. * @@ -38,8 +39,8 @@ public interface IC2ElectricItem { double getMaxCharge(ItemStack itemStack); /** - * Get the item's tier, lower tiers can't send energy to higher ones. - * Batteries are Tier 1, Energy Crystals are Tier 2, Lapotron Crystals are Tier 3. + * Get the item's tier, lower tiers can't send energy to higher ones. Batteries are Tier 1, Energy Crystals are Tier + * 2, Lapotron Crystals are Tier 3. * * @return Item's tier */ diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java index 4ec01ce63c..007d66de66 100644 --- a/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java +++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/energy/IC2ElectricItemManager.java @@ -6,26 +6,24 @@ import net.minecraft.item.ItemStack; /** * This interface specifies a manager to handle the various tasks for electric items. * - * The default implementation does the following: - * - store and retrieve the charge - * - handle charging, taking amount, tier, transfer limit, canProvideEnergy and simulate into account - * - replace item IDs if appropriate (getChargedItemId() and getEmptyItemId()) - * - update and manage the damage value for the visual charge indicator + * The default implementation does the following: - store and retrieve the charge - handle charging, taking amount, + * tier, transfer limit, canProvideEnergy and simulate into account - replace item IDs if appropriate + * (getChargedItemId() and getEmptyItemId()) - update and manage the damage value for the visual charge indicator * - * @note If you're implementing your own variant (ISpecialElectricItem), you can delegate to the - * default implementations through ElectricItem.rawManager. The default implementation is designed - * to minimize its dependency on its own constraints/structure and delegates most work back to the - * more atomic features in the gateway manager. + * @note If you're implementing your own variant (ISpecialElectricItem), you can delegate to the default implementations + * through ElectricItem.rawManager. The default implementation is designed to minimize its dependency on its own + * constraints/structure and delegates most work back to the more atomic features in the gateway manager. */ public interface IC2ElectricItemManager { + /** * Charge an item with a specified amount of energy. * - * @param itemStack electric item's stack - * @param amount amount of energy to charge in EU - * @param tier tier of the charging device, has to be at least as high as the item to charge + * @param itemStack electric item's stack + * @param amount amount of energy to charge in EU + * @param tier tier of the charging device, has to be at least as high as the item to charge * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param simulate don't actually change the item, just determine the return value + * @param simulate don't actually change the item, just determine the return value * @return Energy transferred into the electric item */ double charge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean simulate); @@ -33,20 +31,15 @@ public interface IC2ElectricItemManager { /** * Discharge an item by a specified amount of energy * - * @param itemStack electric item's stack - * @param amount amount of energy to discharge in EU - * @param tier tier of the discharging device, has to be at least as high as the item to discharge + * @param itemStack electric item's stack + * @param amount amount of energy to discharge in EU + * @param tier tier of the discharging device, has to be at least as high as the item to discharge * @param ignoreTransferLimit ignore the transfer limit specified by getTransferLimit() - * @param externally use the supplied item externally, i.e. to power something else as if it was a battery - * @param simulate don't actually discharge the item, just determine the return value + * @param externally use the supplied item externally, i.e. to power something else as if it was a battery + * @param simulate don't actually discharge the item, just determine the return value * @return Energy retrieved from the electric item */ - double discharge( - ItemStack stack, - double amount, - int tier, - boolean ignoreTransferLimit, - boolean externally, + double discharge(ItemStack stack, double amount, int tier, boolean ignoreTransferLimit, boolean externally, boolean simulate); /** @@ -58,34 +51,34 @@ public interface IC2ElectricItemManager { double getCharge(ItemStack stack); /** - * Determine if the specified electric item has at least a specific amount of EU. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * BatPacks are not taken into account. + * Determine if the specified electric item has at least a specific amount of EU. This is supposed to be used in the + * item code during operation, for example if you want to implement your own electric item. BatPacks are not taken + * into account. * * @param itemStack electric item's stack - * @param amount minimum amount of energy required + * @param amount minimum amount of energy required * @return true if there's enough energy */ boolean canUse(ItemStack stack, double amount); /** - * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. + * Try to retrieve a specific amount of energy from an Item, and if applicable, a BatPack. This is supposed to be + * used in the item code during operation, for example if you want to implement your own electric item. * * @param itemStack electric item's stack - * @param amount amount of energy to discharge in EU - * @param entity entity holding the item + * @param amount amount of energy to discharge in EU + * @param entity entity holding the item * @return true if the operation succeeded */ boolean use(ItemStack stack, double amount, EntityLivingBase entity); /** - * Charge an item from the BatPack a player is wearing. - * This is supposed to be used in the item code during operation, for example if you want to implement your own electric item. - * use() already contains this functionality. + * Charge an item from the BatPack a player is wearing. This is supposed to be used in the item code during + * operation, for example if you want to implement your own electric item. use() already contains this + * functionality. * * @param itemStack electric item's stack - * @param entity entity holding the item + * @param entity entity holding the item */ void chargeFromArmor(ItemStack stack, EntityLivingBase entity); |
