/** * Think. * * @param chip */ @Override public void think(ChipState chip) { if (!chip.getIn(1).is() || !chip.getIn(1).isTriggered()) return; boolean damaged = damagePlayers( CraftBook.getWorld(chip.getCBWorld()), chip.getBlockPosition().getBlockX(), chip.getBlockPosition().getBlockY(), chip.getBlockPosition().getBlockZ(), Integer.parseInt(chip.getText().getLine4()), chip.getText().getLine3().toLowerCase()); chip.getOut(1).set(damaged); }
@Override public void think(ChipState chip) { chip.setOutput(0, hurt()); }
/** * Think. * * @param chip */ @Override public void think(ChipState chip) { chip.getOut(1).set(chip.getIn(1).is() && chip.getIn(2).is() && chip.getIn(3).is()); }