Stargate Network

Stargate Network

3M Downloads

ZPM Console interacts with the wrong side of FE Blocks

mallrat208 opened this issue ยท 3 comments

commented

So this is a bit of a weird one...

I've been playing around with using this in a modpack and ran into some shenanigans trying to get the ZPM Console to power FE accepting blocks. Using Immersive Engineering Capacitors, you have to enable power acceptance on the opposite side of the block you would expect. So if a ZPM Console has a HV Capacitor to the East, you need the East side of the Capacitor to accept power, not the WEST as you'd expect since that's the side actually in contact with the ZPM Console.

TileEntity tile = this.world.getTileEntity(this.pos.offset(side));
// Note: make sure the neighbor isn't also a ZpmConsoleTE otherwise a loopback is created. This only applies to forge based power with this update method.
if (tile != null && (!(tile instanceof ZpmConsoleTE))) {
if (tile.hasCapability(CapabilityEnergy.ENERGY, side)) {
if (tile.getCapability(CapabilityEnergy.ENERGY, side).getEnergyStored() < tile.getCapability(CapabilityEnergy.ENERGY, side).getMaxEnergyStored()) {
int max = tile.getCapability(CapabilityEnergy.ENERGY, side).receiveEnergy(this.extractEnergy(50000, true), true); // Prevent the draw of what ever the entery is going to > than capability.
tile.getCapability(CapabilityEnergy.ENERGY, side).receiveEnergy(this.extractEnergy(max, false), false);

references to side on lines 328 to 331 should probably refer to side.getOpposite()

This might also explain one or two of the other issues people have had with the Console seemingly not working at random despite working in testing. A block that doesn't care what side the energy is coming from would never run into this issue, only something setup to be sided would.

commented

I'm curious if you've tested that change by chance?

commented

I have looked at this again; give this a try:
http://solder.almuramc.com/downloads/SGCraft-2.0.4-beta-2.jar

commented

Confirmed fixed in version 2.0.4 beta 3 or newer.