Railcraft

Railcraft

34M Downloads

Crash when placing TR solar next to Railcraft EU loader

ElectroBot opened this issue ยท 3 comments

commented

Crossposted from TechReborn/TechReborn#1652

Minecraft: 1.12.2
Forge: 14.23.5.2806
Tech Reborn: 2.20.1.889
Reborn Core: 3.13.0.400
IC2: 2.8.106-ex112
Railcraft: 12.0.0-beta-2

Placing a TR solar (not sure about other power sources), next to a Railcraft EU loader (which does say that it only accepts EU) hard crashes the game. It does work properly with IC2.

latest.log https://paste.dimdev.org/ohepoyovis.md
last section of debug.log https://paste.dimdev.org/qakohiqino.sql

commented

@Chocohead The solution is to add support for both ILocatable and TileEntity for position, right?

commented

You can do it manually or get the enet to do it for you. EnergyNet.instance.getWorld and getPos both take IEnergyTiles so as long as the IEnergyTile is a valid implementation it will find a valid return.

commented

We only use that object for an instanceof test. It doesn't need to be cast to TileEntity, we can't use IEnergyEmitter in the delegate prototype because its part of the IC2 API and the entire point of the delegates is to separate the IC2 code from our code so that they never interact directly. In which case changing the delegate to take an Object works fine.