Skip to content

Commit

Permalink
Make wireless terminals / portable cells not consume power in creativ…
Browse files Browse the repository at this point in the history
…e mode
  • Loading branch information
shartte committed Oct 5, 2023
1 parent 68e87f6 commit 5c08df2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ protected boolean ensureItemStillInSlot() {
* Can only be used with a host that implements {@link IEnergySource} only call once per broadcastChanges()
*/
public boolean drainPower() {
// Do not drain power for creative players
if (player.isCreative()) {
return true;
}

if (this instanceof IEnergySource energySource) {
this.powerTicks++;
if (this.powerTicks > 10) {
Expand Down

0 comments on commit 5c08df2

Please sign in to comment.