public override void onRightClick() { base.onRightClick(); this.isOn = !this.isOn; this.dirty(); this.world.statManager.leversFlipped.increase(1); CellBehaviorLever.alertNeighborsOfFlip(this); }
public void setTripped(EntityMinecart cart) { if (this.tripper == null || (this.tripper != cart)) { this.tripper = cart; this.isTripped = !this.isTripped; this.dirty(); CellBehaviorLever.alertNeighborsOfFlip(this); } /* * this.tripTimer = 0.1f; * if(!this.isTripped) { * this.isTripped = true; * this.dirty(); * } */ }