* Safeguard against #840

* update Common caps

* Closes #839
This commit is contained in:
Brennan Ward 2017-07-08 14:56:24 -04:00 committed by Ellpeck
parent 9698d345a2
commit 978d624eeb
3 changed files with 6 additions and 3 deletions

View file

@ -49,7 +49,7 @@ repositories {
dependencies {
compile "net.darkhax.tesla:Tesla-1.12:1.0.59"
deobfCompile "mezz.jei:jei_1.12:4.7.0.68"
compileOnly "org.cyclops.commoncapabilities:CommonCapabilities:1.11.2-1.3.3-115"
deobfCompile "org.cyclops.commoncapabilities:CommonCapabilities:1.12-1.3.3+"
}
processResources {

View file

@ -1,6 +1,7 @@
package de.ellpeck.actuallyadditions.mod;
import de.ellpeck.actuallyadditions.mod.blocks.InitBlocks;
import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues;
import de.ellpeck.actuallyadditions.mod.crafting.InitCrafting;
import de.ellpeck.actuallyadditions.mod.gen.village.InitVillager;
import de.ellpeck.actuallyadditions.mod.items.InitItems;
@ -51,8 +52,8 @@ public class RegistryHandler{
public void onVillagerRegistry(Register<VillagerProfession> event){
InitVillager.init();
event.getRegistry().register(InitVillager.jamProfession);
event.getRegistry().register(InitVillager.engineerProfession);
if(ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.jamProfession);
if(ConfigBoolValues.ENGINEER_VILLAGER_EXISTS.isEnabled()) event.getRegistry().register(InitVillager.engineerProfession);
}
@SubscribeEvent

View file

@ -163,6 +163,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay{
TileEntity tile = theRelay.receiversAround.get(facing);
EnumFacing opp = facing.getOpposite();
if(tile != null){
if(tile.hasCapability(CapabilityEnergy.ENERGY, opp)){
IEnergyStorage cap = tile.getCapability(CapabilityEnergy.ENERGY, opp);
if(cap != null && cap.receiveEnergy(maxTransfer, true) > 0){
@ -178,6 +179,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay{
}
}
}
}
}
if(workedOnce){