mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-17 19:05:31 +00:00
BuildCraft support (#2158)
This commit is contained in:
1 parent
4515aa513a
commit
8feb3500a4
60 files changed
+1423
-767
No files matched your search
@@ -10,25 +10,33 @@
|
||||
******************************************************************************/
|
||||
package forestry.apiculture.trigger;
|
||||
|
||||
// TODO: Buildcraft for 1.9
|
||||
public class TriggerMissingDrone {//extends Trigger {
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
// public TriggerMissingDrone() {
|
||||
// super("missingDrone");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Return true if the tile given in parameter activates the trigger, given the parameters.
|
||||
// */
|
||||
// @Override
|
||||
// public boolean isTriggerActive(TileEntity tile, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
//
|
||||
// if (!(tile instanceof IErrorLogicSource)) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// IErrorLogicSource apiary = (IErrorLogicSource) tile;
|
||||
// return apiary.getErrorLogic().contains(EnumErrorCode.NO_DRONE);
|
||||
// }
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import forestry.api.core.IErrorLogicSource;
|
||||
import forestry.core.errors.EnumErrorCode;
|
||||
import forestry.core.triggers.Trigger;
|
||||
|
||||
public class TriggerMissingDrone extends Trigger {
|
||||
|
||||
public TriggerMissingDrone() {
|
||||
super("missingDrone", "missing_drone");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return true if the tile given in parameter activates the trigger, given the parameters.
|
||||
*/
|
||||
@Override
|
||||
public boolean isTriggerActive(TileEntity tile, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
|
||||
if (!(tile instanceof IErrorLogicSource)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
IErrorLogicSource apiary = (IErrorLogicSource) tile;
|
||||
return apiary.getErrorLogic().contains(EnumErrorCode.NO_DRONE);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user