This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Cruor's profile picture

[Turtle] Refuel overflow

Started by Cruor, 17 January 2013 - 09:23 AM
Cruor #1
Posted 17 January 2013 - 10:23 AM
CC Version
1.481

Bug summary
Refuel at max fuel level(2^31-1) will give you a overflow and give you negative fuel level.

What you did
Edited the NBT on my turtle to max value, then refueled with coal.

What you expected to happen
The java side code to prevent me from adding fuel beyond max value.

What actually happened
I got negative fuel level.
http://puu.sh/1OAlb
GopherAtl #2
Posted 17 January 2013 - 10:59 AM
Note to self: never fuel a new turtle with more than 53,687,091 pieces of coal at once.
Cloudy #3
Posted 17 January 2013 - 11:10 AM
You'd need 1073742 buckets of lavq to reach that value. That just isn't going to happen.
Ballistic Buddha #4
Posted 17 January 2013 - 12:04 PM
With vanilla CC fueling, I couldn't ever see this happening. However, with some peripheral addons (such as with misc. Peripherals' charging station), I could possibly imagine a turtle reaching Max fuel. Now, I still don't know what would happen as even with my turtles almost always docked at their charge stations while in a constantly loaded chunk, I am still not even 10% there after about 10 days. But in a few months or so, I might eventually see it happen. And if it does roll over, it might be the fault of misc. Peripherals, and not CC. But I might try out putting a piece of coal and trying to fuel if it ever does happen.
Cranium #5
Posted 17 January 2013 - 12:06 PM
Wow….nice job breaking things, Cruor! This is why we can't have nice things…..
PixelToast #6
Posted 17 January 2013 - 02:41 PM
now everyone is using that in game nbt editor :3
theoriginalbit #7
Posted 17 January 2013 - 10:46 PM
Might be fixed if Cloudy actually did talk to Dan and they plan on doing this
http://www.computercraft.info/forums2/index.php?/topic/8404-146-turtle-fuel-limit/
Sebra #8
Posted 18 January 2013 - 04:37 AM
With vanilla CC fueling, I couldn't ever see this happening. However, with some peripheral addons (such as with misc. Peripherals' charging station), I could possibly imagine a turtle reaching Max fuel. Now, I still don't know what would happen as even with my turtles almost always docked at their charge stations while in a constantly loaded chunk, I am still not even 10% there after about 10 days. But in a few months or so, I might eventually see it happen. And if it does roll over, it might be the fault of misc. Peripherals, and not CC. But I might try out putting a piece of coal and trying to fuel if it ever does happen.
Good luck to wait about 3,4 year of real time ;)/> Doubt any server will have such uptime with current update rate.
PixelToast #9
Posted 18 January 2013 - 04:51 AM
Good luck to wait about 3,4 year of real time ;)/> Doubt any server will have such uptime with current update rate.
/me emagines a tekkit server that has been abandoned for 3 or 4 years
or cheat engine's speedhack :3