public override void steppedOn(Level level, int x, int y, Entity entity) { if (entity is Mob) { level.setData(x, y, 10); } }
public override bool mayPass(Level level, int x, int y, Entity e) { return e.canSwim(); }
public override void touchedBy(Entity entity) { if (time > 30) entity.touchItem(this); }
public override bool mayPass(Level level, int x, int y, Entity e) { return false; }
public override void steppedOn(Level level, int xt, int yt, Entity entity) { if (random.nextInt(60) != 0) return; if (level.getData(xt, yt) < 5) return; level.setTile(xt, yt, Tile.dirt, 0); }
public override void bumpedInto(Level level, int x, int y, Entity entity) { entity.hurt(this, x, y, 3); }
public override void steppedOn(Level level, int xt, int yt, Entity entity) { if (random.nextInt(60) != 0) return; if (level.getData(xt, yt) < 2) return; harvest(level, xt, yt); }
public override void touchedBy(Entity entity) { if (entity is Player) { entity.hurt(this, lvl + 1, dir); } }
public override void touchedBy(Entity entity) { if (!(entity is Player)) { entity.touchedBy(this); } }
private int getAttackDamage(Entity e) { int dmg = random.nextInt(3) + 1; if (attackItem != null) { dmg += attackItem.getAttackDamageBonus(e); } return dmg; }
public override bool mayPass(Level level, int x, int y, Entity e) { if (e is AirWizard) return true; return false; }
public override bool blocks(Entity e) { return e.isBlockableBy(this); }