mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-25 22:34:33 +00:00
Carrot is not fruit (#27)
* Carrot is not fruit * updateBuildScript & spotlessApply
This commit is contained in:
1 parent
6973dbc80d
commit
c5c3aee2fb
1345 files changed
+92079
-90006
No files matched your search
@@ -10,37 +10,35 @@
|
||||
******************************************************************************/
|
||||
package forestry.mail.triggers;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import forestry.core.triggers.Trigger;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import forestry.core.triggers.Trigger;
|
||||
import forestry.mail.tiles.TileTrader;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
public class TriggerLowInput extends Trigger {
|
||||
|
||||
private final float threshold;
|
||||
private final float threshold;
|
||||
|
||||
public TriggerLowInput(String tag, float threshold) {
|
||||
super(tag, "lowInput");
|
||||
this.threshold = threshold;
|
||||
}
|
||||
public TriggerLowInput(String tag, float threshold) {
|
||||
super(tag, "lowInput");
|
||||
this.threshold = threshold;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return super.getDescription() + " < " + threshold * 100 + "%";
|
||||
}
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return super.getDescription() + " < " + threshold * 100 + "%";
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isTriggerActive(TileEntity tile, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
@Override
|
||||
public boolean isTriggerActive(
|
||||
TileEntity tile, ForgeDirection side, IStatementContainer source, IStatementParameter[] parameters) {
|
||||
|
||||
if (!(tile instanceof TileTrader)) {
|
||||
return false;
|
||||
}
|
||||
if (!(tile instanceof TileTrader)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return !((TileTrader) tile).hasInputBufMin(threshold);
|
||||
}
|
||||
return !((TileTrader) tile).hasInputBufMin(threshold);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user