slava_110

Results 68 comments of slava_110

Commit fd522562ac926ec24e4fd8d7db0454b88c1e89b1 fixed this issue as well as other issues (as discussed in #314). If **MrJake222** will approve my implementation this PR could be closed I think

Yep, there's a problem https://github.com/MrJake222/AUNIS/blob/master/src/main/java/mrjake/aunis/block/CapacitorBlock.java#L99 It's trying to cast item energy storage to abstract energy storage. To be fixed. Thanks for reporting!

@MrJake222, there's no `setEnergyStored` method in `IEnergyStorage` probably

Well... You'll need to override everything then. Because `StargateItemEnergyStorage` should modify `ItemStack` nbt, not `energy` field from `EnergyStorage`. And we'll get useless field in this object

Maybe... But if there's no actual reason for `StargateItemEnergyStorage` to extend `StargateAbstractEnergyStorage` other than code intuitivity then we can just rename this class/move it to `capability` package. Might be even...

Well, yes, basically variable duplicate. Power will be stored both in NBT and this variable and all operations will work with 2 similar variables (NBT and field). But... What for?...

> But still there will be a lot of code duplication handling exact same things (simulations when extracting/inserting energy for example). That's why we can create custom base class if...

As you wish ¯\_(ツ)_/¯ It's either code duplication or additional field for each capacitor storage object anyway

Btw, what's the point of [StargateAbstractEnergyStorage.receiveEnergyInternal](https://github.com/MrJake222/AUNIS/blob/master/src/main/java/mrjake/aunis/stargate/power/StargateAbstractEnergyStorage.java#L59)?

Hello, @VoxelTek. Interesting issue. Could you send your mod list and (if issue occurs in certain world only) world folder?