MrJake222 / AUNIS

Stargate-inspired Minecraft Mod
GNU General Public License v3.0
44 stars 19 forks source link

Power not drawn until gate is closed (investigate) #303

Open Manglefan opened 3 years ago

Manglefan commented 3 years ago

in the latest beta when i dialed the gate the power drains the longer its open but in the latest alpha when i dial the gate the power doesnt drain or it doesnt lose power till the gate is shut down

xnerhu commented 3 years ago

It seems that this commit from @slava110 has broken power draw. After some investigation I found out that extractEnergy in StargateAbstractEnergyStorage doesn't work because energy property in this class is always 0.

@MrJake222

xnerhu commented 3 years ago

Also I think it has something with amount of naquadah in DHD. If it's around 0-700 then power draw is 0.

Manglefan commented 3 years ago

ive tried with a full DHD and it doesnt work what do i set the StargateAbstractEnergyStorage to

MrJake222 commented 3 years ago

@slava110

slava110 commented 3 years ago

After some investigation I found out that extractEnergy in StargateAbstractEnergyStorage doesn't work because energy property in this class is always 0.

StargateAbstractEnergyStorage wasn't modified in this commit And energy shouldn't be always 0 if deserialization and serialization works properly Checked code and it might be the problem https://github.com/sentialx/AUNIS/blob/7029efdcb88b49583520a0b49e76553ee8996fa6/src/main/java/mrjake/aunis/stargate/power/StargateItemEnergyStorage.java#L26

MrJake222 commented 3 years ago

Why y'all posting links to the sentialx repo?

slava110 commented 3 years ago

Why y'all posting links to the sentialx repo?

He sent link to my commit so it's easier for me to click on this link to find the problem

xnerhu commented 3 years ago

Why y'all posting links to the sentialx repo?

Yeah, sorry xd. I'm working with Sentialx to fix and add some stuff.

Manglefan commented 3 years ago

So this'll be fixed and how do I add it to my version