mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-09 07:15:11 -04:00
Creative tablets won't run out of energy anymore...
This commit is contained in:
parent
db9b373d12
commit
4e4e5d3ba3
@ -25,6 +25,7 @@ import li.cil.oc.api.driver.item.Chargeable
|
||||
import li.cil.oc.api.driver.item.Container
|
||||
import li.cil.oc.api.internal
|
||||
import li.cil.oc.api.machine.MachineHost
|
||||
import li.cil.oc.api.network.Connector
|
||||
import li.cil.oc.api.network.Message
|
||||
import li.cil.oc.api.network.Node
|
||||
import li.cil.oc.client.KeyBindings
|
||||
@ -239,6 +240,8 @@ class TabletWrapper(var stack: ItemStack, var player: EntityPlayer) extends Comp
|
||||
|
||||
private var lastRunning = false
|
||||
|
||||
def isCreative = data.tier == Tier.Four
|
||||
|
||||
def items = data.items
|
||||
|
||||
override def facing = RotationHelper.fromYaw(player.rotationYaw)
|
||||
@ -403,6 +406,9 @@ class TabletWrapper(var stack: ItemStack, var player: EntityPlayer) extends Comp
|
||||
}
|
||||
}
|
||||
if (!world.isRemote) {
|
||||
if (isCreative && world.getTotalWorldTime % Settings.get.tickFrequency == 0) {
|
||||
machine.node.asInstanceOf[Connector].changeBuffer(Double.PositiveInfinity)
|
||||
}
|
||||
machine.update()
|
||||
updateComponents()
|
||||
data.isRunning = machine.isRunning
|
||||
|
Loading…
x
Reference in New Issue
Block a user