mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-21 12:32:23 +00:00
Compiles for 1.9! Very buggy, some things are missing.
This commit is contained in:
1 parent
5d74c1254b
commit
7bf554b024
135 files changed
+1710
-1919
No files matched your search
@@ -10,37 +10,29 @@
|
||||
******************************************************************************/
|
||||
package forestry.mail.triggers;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
|
||||
import forestry.core.triggers.Trigger;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
|
||||
public class TriggerLowStamps extends Trigger {
|
||||
|
||||
private final int threshold;
|
||||
|
||||
public TriggerLowStamps(String tag, int threshold) {
|
||||
super(tag, "lowStamps");
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return super.getDescription() + " < " + threshold + "p";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTriggerActive(TileEntity tile, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
|
||||
if (!(tile instanceof TileTrader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !((TileTrader) tile).hasPostageMin(threshold);
|
||||
}
|
||||
// TODO: Buildcraft for 1.9
|
||||
public class TriggerLowStamps {//extends Trigger {
|
||||
//
|
||||
// private final int threshold;
|
||||
//
|
||||
// public TriggerLowStamps(String tag, int threshold) {
|
||||
// super(tag, "lowStamps");
|
||||
// this.threshold = threshold;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public String getDescription() {
|
||||
// return super.getDescription() + " < " + threshold + "p";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean isTriggerActive(TileEntity tile, EnumFacing side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
//
|
||||
// if (!(tile instanceof TileTrader)) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// return !((TileTrader) tile).hasPostageMin(threshold);
|
||||
// }
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user