View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0001109 | Industrial-Craft² | crossmod-compatibility / submodules / API | public | 2014-07-14 17:40 | 2014-08-04 07:54 |
Reporter | Sangar | Assigned To | Player | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Summary | 0001109: IEnergySink.injectEnergy is always called with ForgeDirection.UNKNOWN | ||||
Description | I'm not sure this has been reported before, but I didn't find a ticket on it, so here goes. Also not sure if this is the right category... it's API from my point of view. In IEnergySink.injectEnergy (prev. injectEnergyUnits), the passed direction is always 'unknown'. I didn't notice this until now, because most of the time it doesn't matter, but for tile entities with multiple internal (side-specific) energy buffers it does. This happens at least since 2.0.397 (which I'm using to test on 1.6.4) and still happens in 2.2.508 (which I'm using to test on 1.7.10). Will I have to work around this by just inserting in the next-best buffer when the energy is provided by IC2, or is this a bug that will be fixed (in 1.7.10)? Thanks. ---- PS: slightly different topic, but also injectEnergy related; while it is documented that it is 'recommended to accept all energy', the returned value seems to be completely ignored. If this is by design, it might be clearer to remove the 'recommended' note and make the method return nothing at all? | ||||
Steps To Reproduce | - Have a tile entity implement IEnergySink. - Place it's block next to a full MFSU's output side. - Set a breakpoint in injectEnergy, see that side is always unknown. | ||||
Tags | No tags attached. | ||||
Minecraft Version | |||||
|
what can I say EnergyNet is still WIP...assigne to Player as hint: IEnergySink extends IEnergyAcceptor and IEnergyAcceptor call boolean acceptsEnergyFrom(TileEntity emitter, ForgeDirection direction) and the direction (direction)is correctly specified |
|
OK, good to know I'm not necessarily doing something wrong ;-) Thanks, I already use acceptsEnergyFrom to control connectivity; from what I can tell it's only called once on connecting to the enet, though - which makes sense. And using a temporary field to keep the last queried direction to then use it in injectEnergy would feel really hacky anyway (I have multiple accepting sides). For now I'll just distribute it to all accepting sides equally, which is good enough (tm) for my use-case. |
|
This is a temporary limitation of the current implementation which I can hopefully lift later on. |
|
The direction should be set correctly now. |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-07-14 17:40 | Sangar | New Issue | |
2014-07-14 19:07 | Thunderdark | Note Added: 0002787 | |
2014-07-14 19:07 | Thunderdark | Assigned To | => Player |
2014-07-14 19:07 | Thunderdark | Status | new => assigned |
2014-07-14 19:19 | Sangar | Note Added: 0002788 | |
2014-07-15 03:48 | Player | Note Added: 0002791 | |
2014-08-04 07:54 | Player | Note Added: 0003000 | |
2014-08-04 07:54 | Player | Status | assigned => resolved |
2014-08-04 07:54 | Player | Resolution | open => fixed |