mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-20 03:35:51 +00:00
Update src/main/java/io/github/thebusybiscuit/slimefun4/core/attributes/EnergyNetComponent.java
Co-authored-by: TheBusyBiscuit <TheBusyBiscuit@users.noreply.github.com>
This commit is contained in:
parent
40caa2d574
commit
09a40d036e
@ -66,7 +66,11 @@ public interface EnergyNetComponent extends ItemAttribute {
|
||||
*/
|
||||
default int getCharge(@Nonnull Location l) {
|
||||
Validate.notNull(l, "Location was null!");
|
||||
if (!isChargeable()) return 0;
|
||||
|
||||
// Emergency fallback, this cannot hold a charge, so we'll just return zero
|
||||
if (!isChargeable()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
String charge = BlockStorage.getLocationInfo(l, "energy-charge");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user