CC: Restitched

CC: Restitched

3M Downloads

[Feature] Support Tech Reborn Energy API

Merith-TK opened this issue ยท 5 comments

commented

Allow turtles to be powered by a "energy", via a tech reborn battery used as a peripheral attachment or other mods

https://github.com/TechReborn/Energy

commented

potential implementation to get atleast TR batteries to work

function move() {
  if peripheral.isPresent("techreborn:battery") then -- Using that item id as placeholder for this
    local  fuel = turtle.getFuelLevel()
    if fuel == 0 then
      -- Subtract 1 point of energy from battery
      -- Add 1 point of fuel to turtle
    end
  end
  -- do vanilla-cc movement
end
commented

i believe that tech reborn needs to add lua support not the other way arround

commented

or do you mean like edit the NBT data to take "fuel" from the battery?

commented

sorta, I am more meaning interacting with the TR Power API directly to take power from a battery at a certain rate for every action,