Pipez

Pipez

31M Downloads

Energy pipes do not accept pushed energy

RogueLogix opened this issue · 5 comments

commented

Bug description
Energy pipes do not accept pushed energy.

This goes against the general convention that energy is a push system, not a pull system. In some cases, you will not be able to pull energy out of mod's blocks, as seen in issue #15, #7, and #6.
Implementing a dummy energy storage and shoving it off on the other mod's author likely wont get anything fixed, because they (including me) are going to want to do the same thing. This is already the case with thermal, where it is in a wont-fix situation there. I have implemented energy extraction myself in BiR (as i mentioned in issue #6), however, this was simply an oversight on my part in the first place, other mods may have reasons for allowing push only where it wont be changed, and there should still be compatibility there as you don't have a reason/need to implement it as strict extract only.

The linked section of your energy pipe implementation needs to be re-done to allow for a push from IEnergyStorage$recieveEnergy to act the same as a normal tick. Most of the behavior already works in a way that will allow this to have no additional performance impact, and it is trivial to ensure that the pipes will only do one operation per tick if both pushing and pulling from a single tile would occur in the same tick.

https://github.com/henkelmax/pipez/blob/master/src/main/java/de/maxhenkel/pipez/blocks/tileentity/types/EnergyPipeType.java#L63-L136

Steps to reproduce the issue

  1. Attempt to use energy pipes with anything that does not allow energy to be pulled out

Expected behavior
PIpes accept energy with pushed into

Log files
N/A

Versions

  • Minecraft version: N/A
  • Forge version: N/A
  • Mod version: a219098

Other mods
Known incompatibilities:
ThermalSeries
RFTools
BiggerReactors (0.0.0 - 0.5.0-alpha.1, remedied in 0.5.0-beta)

commented

Yes, I am working on a way to allow energy to be pushed into them. There are some problems I have to overcome. For example how to detect if a block is able to push energy or not, without having energy stored in the pipe.

commented

It should be fixed in the latest version. But it may cause some problems, so consider this version unstable.

commented

We are already working on it.
But it is not a convention. It is just done to push energy to adjacent blocks to avoid using cables. But these blocks should still provide the energy storage capability.

commented

But it is not a convention.

Oh but it is. King Lemming and McJty generally set the convention for how stuff is done. Partially because their mods are large, partially because they have both been in the modding scene a looooong time, and partially because they know what they are doing. In this specific case KL is also the person that wrote the API in the first place, and he implements its as push only, so, it very much is the convention that its push. Pull is usually allowed, and usually works, but obviously not always. Another larger mod, and your comparison, Mekanism implements it as push-only by default, with attempting to pull being an option that must be manually selected. The only other energy pipe that used pull was.

Oh, and here is Mezz (of Forge and JEI, im sure you know who they are) saying exactly this about FE/RF in regards to EIO years ago, SleepyTrousers/EnderIO-1.5-1.12#4081 (comment)

commented

I would hope that “working on it” means that it’s going to be changed so that energy can be pushed into them. I would also agree with Rogue that pushing is in fact a convention used by modders for the reasons he has listed. I would also add to that, that Mcjtys tutorials are pushed very heavily in Forge Discord as well as MMD. His tutorials specifically teach to setup generators in a push configuration. We also have a generator in Resourceful Bees. Ours however does allow extraction in addition to push, but if it didn’t then our mods would not be compatible.