diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java index 2da7462ef..e58210083 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy.Mode; +import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntity; @@ -36,7 +37,7 @@ import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ - public final ConcurrentHashMap receiversAround = new ConcurrentHashMap(); + public final ConcurrentHashMap handlersAround = new ConcurrentHashMap(); private final IFluidHandler[] fluidHandlers = new IFluidHandler[6]; private Mode mode = Mode.BOTH; @@ -69,6 +70,19 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ } } + @Override + public void updateEntity(){ + super.updateEntity(); + + if(!this.world.isRemote){ + if(this.mode == Mode.INPUT_ONLY){ + for(EnumFacing side : this.handlersAround.keySet()){ + WorldUtil.doFluidInteraction(this.handlersAround.get(side), this, side.getOpposite(), Integer.MAX_VALUE); + } + } + } + } + @Override public boolean shouldSaveDataOnChangeOrWorldStart(){ return true; @@ -76,16 +90,16 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ @Override public void saveDataOnChangeOrWorldStart(){ - Map old = new HashMap(this.receiversAround); + Map old = new HashMap(this.handlersAround); boolean change = false; - this.receiversAround.clear(); + this.handlersAround.clear(); for(EnumFacing side : EnumFacing.values()){ BlockPos pos = this.getPos().offset(side); TileEntity tile = this.world.getTileEntity(pos); if(tile != null && !(tile instanceof TileEntityLaserRelay)){ if(tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, side.getOpposite())){ - this.receiversAround.put(side, tile); + this.handlersAround.put(side, tile); TileEntity oldTile = old.get(side); if(oldTile == null || !tile.equals(oldTile)){ @@ -95,7 +109,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ } } - if(change || old.size() != this.receiversAround.size()){ + if(change || old.size() != this.handlersAround.size()){ Network network = ActuallyAdditionsAPI.connectionHandler.getNetworkFor(this.getPos(), this.getWorld()); if(network != null){ network.changeAmount++; @@ -137,9 +151,9 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ if(theRelay.mode != Mode.INPUT_ONLY){ boolean workedOnce = false; - for(EnumFacing facing : theRelay.receiversAround.keySet()){ + for(EnumFacing facing : theRelay.handlersAround.keySet()){ if(theRelay != this || facing != from){ - TileEntity tile = theRelay.receiversAround.get(facing); + TileEntity tile = theRelay.handlersAround.get(facing); EnumFacing opp = facing.getOpposite(); if(tile.hasCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, opp)){ @@ -168,7 +182,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay{ } for(TileEntityLaserRelayFluids theRelay : relaysThatWork){ - for(Map.Entry receiver : theRelay.receiversAround.entrySet()){ + for(Map.Entry receiver : theRelay.handlersAround.entrySet()){ if(receiver != null){ EnumFacing side = receiver.getKey(); EnumFacing opp = side.getOpposite(); diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index e1ece5d02..681aa2ff5 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -1084,7 +1084,7 @@ booklet.actuallyadditions.chapter.empowerer.text.3=Because every mod booklet.actuallyadditions.chapter.empowerer.text.4=The Display Stand can also be used for other things! See the Blocks that use CF section for more info about it! booklet.actuallyadditions.chapter.fluidLaser.name=Fluid Laser Relays -booklet.actuallyadditions.chapter.fluidLaser.text.1=The Fluid Laser Relays work much in the same way that normal Laser Relays do, however the thing that makes the Fluid Laser Relay different from the Energy Laser Relay, however, is that it transfers fluids from internal tanks of blocks into other blocks. Fluid Laser Relays can not be connected by Phantomfaces. +booklet.actuallyadditions.chapter.fluidLaser.text.1=The Fluid Laser Relays work much in the same way that normal Laser Relays do, however the thing that makes the Fluid Laser Relay different from the Energy Laser Relay, however, is that it transfers fluids from internal tanks of blocks into other blocks. Fluid Laser Relays can not be connected by Phantomfaces. Note that when they are toggled to Only out of adjacent Blocks mode, they will actively pull fluids out of containers around them. booklet.actuallyadditions.chapter.distributorItem.name=Item Distributor booklet.actuallyadditions.chapter.distributorItem.text.1=The Item Distributor is a simple way to split up items and make them go in different directions. The distributor will pull items into it from the top by itself, and then split them up and put them out into inventories connected to all of the other sides of it. It tries to do split the items equally, however this works best when inputting one item at a time, which its pulling feature does automatically.