Kroppeb
Module: LT Mending Repair (plz give me a good name)
Main Feature: Adding tools with mending to a xp tank will repair them
Pinned a message.
Kroppeb24-Apr-19 03:15 PM
question: should the tank repair the tool in one go or in steps?
BluePsychoRanger24-Apr-19 03:16 PM
In steps
Kroppeb24-Apr-19 03:16 PM
how big should they be?
BluePsychoRanger24-Apr-19 03:17 PM
I had this idea, so I already thought out some of the details. Each level of the tank should repair 7 durability because a bottle o' enchanting gives 3-11 experience points at a time
Kroppeb24-Apr-19 03:19 PM
Xp is stored as points, not as levels
iirc
BluePsychoRanger24-Apr-19 03:19 PM
In XP Storage it's points, but in Liquid Tanks it's levels. Unless something was changed between 1.12 and 1.13
Kroppeb24-Apr-19 03:20 PM
yes
BluePsychoRanger24-Apr-19 03:26 PM
Oh yeah, you're right
I'd say go by 20 durability at a time(edited)
1 XP point = 2 Durability
Sparks24-Apr-19 04:17 PM
You could consume 1 level from the tank but work out how many XP that level contained to affect the repair
Misode24-Apr-19 04:19 PM
It would also make sense if you think of it like charging a battery, the last bits would be slower
SpecialBuilder3224-Apr-19 06:00 PM
XP has always been stored in points
And it should be a one-to-one conversion like normal mending.
(Mending uses 1 pt for 1 durability right?)
If you wanted it to thematically fit with how the other xp interactions are, I'd say repair one point per game tick at 20hz. That's how regular mending absorbs orbs, and how tanks deposit and retrieve xp
You'd have to weigh in the lag thou
Kroppeb24-Apr-19 06:33 PM
yeah, as each mending operation is gonna need to do a nbt read and an nbt write
Misode24-Apr-19 07:12 PM
Doing 16 points per cycle should fix that
Lue24-Apr-19 07:41 PM
@SpecialBuilder32 1 point for 2 durability(edited)
SpecialBuilder3224-Apr-19 08:40 PM
Really? That's wierd
Regarding the nbt write, it's likely that a 20hz nbt read/write would be negligible, as the highest nunber of tanks performing repairs will be low to none at any given moment.
As long as the 20hz isn't active when there's no tool capable of being repaired in the tank
Misode24-Apr-19 08:45 PM
That's true
SpecialBuilder3224-Apr-19 09:02 PM
IMO the more polished feel of 20hz editing might be worth it
Lue24-Apr-19 09:31 PM
it is indeed negligible so long as the item is inside of the tank
tag tag tags are not serialized or copied, because they are stored internally as NBT
the only serialization is that of the hopper block entity and the Count, Slot, id
as of 1.13, Damage is a tag tag tag
Kroppeb24-Apr-19 09:33 PM
Yeah I saw
Kroppeb07-May-19 08:10 PM
Poll: if a item is put in with Damage:1 what should happen?
Do nothing
Use 1 xp to fix 1 durability (instead of the normal ratio of 1 xp/2 durability
Fix the item for free (this is what mc does)
Use 1 xp but add a tag to the tank so the next time it happens it is done for free so the ratio is kept (please no)
Use a randomiser to choose between costing 1 or 0 xp so that on average the ratio is kept (please also no)
1
11
8
1
1
You can select multiple if you want
?
Lue07-May-19 08:15 PM
Ha it's funny that mc does C
I would have expected that it would do B
However IMO since you're enabling something that the game specifically avoids (using stored XP to mend gear), you should do B rather than C.
Misode07-May-19 08:17 PM
It can be either, but as long as its not
Dennis07-May-19 08:42 PM
^
I'm gonna vote B to make a tie >:)
Sander07-May-19 08:43 PM
lets make it 4 4 xd
Lue07-May-19 08:44 PM
I don't care too much whether B or C is picked, but I definitely think it should cost something to mend gear no matter what
in vanilla, it costs the ability to repurpose that XP orb for anything else
even though it's "free"
Dennis07-May-19 08:44 PM
But tbh B or C both are good, 1 xp is not really a thing that's gonna be missed if needed
Lue07-May-19 08:44 PM
exactly(edited)
Sander07-May-19 08:44 PM
i think B best?
Dennis07-May-19 08:45 PM
what happens when you don't change a thing for the 1 durability case? B?
Misode07-May-19 08:46 PM
Yeah B is probably the most trivial to implement
Lue07-May-19 08:47 PM
actually C is probably more trivial
with C, if you store the result of data get block Items[0].tag.Damage 0.5, you get the XP it should use to set Damage to 0(edited)
due to it being C, if Damage:0 or Damage:1, the XP cost is 0
with B, you need to make a special case for Damage:1, then do data get block Items[0].tag.Damage 0.5 otherwise(edited)
(technically that's not the way it would be done, let me show you)
Kroppeb07-May-19 08:52 PM
I think i'm gonna have to get the damage add 1 and divide by 2