mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-27 01:08:34 +01:00
made laser relays not try to input back into the thing they got energy from
This commit is contained in:
parent
2cc5d02814
commit
d8af7636ee
2 changed files with 12 additions and 0 deletions
|
@ -123,7 +123,13 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay implements
|
||||||
TileEntity relayTile = this.worldObj.getTileEntity(relay);
|
TileEntity relayTile = this.worldObj.getTileEntity(relay);
|
||||||
if(relayTile instanceof TileEntityLaserRelayEnergy){
|
if(relayTile instanceof TileEntityLaserRelayEnergy){
|
||||||
TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy)relayTile;
|
TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy)relayTile;
|
||||||
|
|
||||||
int amount = theRelay.receiversAround.size();
|
int amount = theRelay.receiversAround.size();
|
||||||
|
if(theRelay == this && theRelay.receiversAround.containsKey(from)){
|
||||||
|
//So that the tile energy was gotten from isn't factored into the amount
|
||||||
|
amount--;
|
||||||
|
}
|
||||||
|
|
||||||
if(amount > 0){
|
if(amount > 0){
|
||||||
relaysThatWork.add(theRelay);
|
relaysThatWork.add(theRelay);
|
||||||
totalReceiverAmount += amount;
|
totalReceiverAmount += amount;
|
||||||
|
|
|
@ -117,7 +117,13 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay implements
|
||||||
TileEntity relayTile = this.worldObj.getTileEntity(relay);
|
TileEntity relayTile = this.worldObj.getTileEntity(relay);
|
||||||
if(relayTile instanceof TileEntityLaserRelayFluids){
|
if(relayTile instanceof TileEntityLaserRelayFluids){
|
||||||
TileEntityLaserRelayFluids theRelay = (TileEntityLaserRelayFluids)relayTile;
|
TileEntityLaserRelayFluids theRelay = (TileEntityLaserRelayFluids)relayTile;
|
||||||
|
|
||||||
int amount = theRelay.receiversAround.size();
|
int amount = theRelay.receiversAround.size();
|
||||||
|
if(theRelay == this && theRelay.receiversAround.containsKey(from)){
|
||||||
|
//So that the tile energy was gotten from isn't factored into the amount
|
||||||
|
amount--;
|
||||||
|
}
|
||||||
|
|
||||||
if(amount > 0){
|
if(amount > 0){
|
||||||
relaysThatWork.add(theRelay);
|
relaysThatWork.add(theRelay);
|
||||||
totalReceiverAmount += amount;
|
totalReceiverAmount += amount;
|
||||||
|
|
Loading…
Reference in a new issue