Guild icon
Gamemode 4 Labs
mending-tanks
Avatar
BluePsychoRanger 24-Apr-19 03:10 PM
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.
Avatar
Kroppeb 24-Apr-19 03:15 PM
question: should the tank repair the tool in one go or in steps?
Avatar
BluePsychoRanger 24-Apr-19 03:16 PM
In steps
Avatar
Kroppeb 24-Apr-19 03:16 PM
how big should they be?
Avatar
BluePsychoRanger 24-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
Avatar
Kroppeb 24-Apr-19 03:19 PM
Xp is stored as points, not as levels
iirc
Avatar
BluePsychoRanger 24-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
Avatar
Kroppeb 24-Apr-19 03:20 PM
yes
Avatar
BluePsychoRanger 24-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
Avatar
Sparks 24-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
Avatar
Misode 24-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
Avatar
SpecialBuilder32 24-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
Avatar
Kroppeb 24-Apr-19 06:33 PM
yeah, as each mending operation is gonna need to do a nbt read and an nbt write
Avatar
Misode 24-Apr-19 07:12 PM
Doing 16 points per cycle should fix that
Avatar
Lue 24-Apr-19 07:41 PM
@SpecialBuilder32 1 point for 2 durability (edited)
Avatar
SpecialBuilder32 24-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
Avatar
Misode 24-Apr-19 08:45 PM
That's true
Avatar
SpecialBuilder32 24-Apr-19 09:02 PM
IMO the more polished feel of 20hz editing might be worth it
Avatar
Lue 24-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
Avatar
Kroppeb 24-Apr-19 09:33 PM
Yeah I saw
Avatar
Kroppeb 07-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
?
Avatar
Lue 07-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.
Avatar
Misode 07-May-19 08:17 PM
It can be either, but as long as its not 🇦
Avatar
Dennis 07-May-19 08:42 PM
^
I'm gonna vote B to make a tie >:)
Avatar
Sander 07-May-19 08:43 PM
lets make it 4 4 xd
😄
Avatar
Lue 07-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"
Avatar
Dennis 07-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
Avatar
Lue 07-May-19 08:44 PM
exactly (edited)
Avatar
Sander 07-May-19 08:44 PM
i think B best?
Avatar
Dennis 07-May-19 08:45 PM
what happens when you don't change a thing for the 1 durability case? B?
Avatar
Misode 07-May-19 08:46 PM
Yeah B is probably the most trivial to implement
Avatar
Lue 07-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)
Avatar
Kroppeb 07-May-19 08:52 PM
I think i'm gonna have to get the damage add 1 and divide by 2
Avatar
Lue 07-May-19 08:55 PM
that would mean: Damage: 0 => 0 cost Damage: 1 => 1 cost Damage: 2 => 1 cost Damage: 3 => 2 cost Damage: 4 => 2 cost Damage: 5 => 3 cost Damage: 6 => 3 cost
this is the logical way IMO but it's not how MC does it
honestly I am leaning towards C now
I only want B if it means this: Damage:0 => 0 cost Damage: 1 => 1 cost Damage: 2 => 1 cost Damage: 3 => 1 cost Damage: 4 => 2 cost Damage: 5 => 2 cost Damage: 6 => 3 cost (edited)
i.e. reflect vanilla except for Damage:1
but this is just strange looking
Avatar
Kroppeb 10-May-19 02:19 PM
tries to make mending tanks
sees a bunch of problems with liquid tanks that he didn't notice before
Avatar
Kroppeb 10-May-19 05:03 PM
@Lab Manager module is ready for review and maybe also a channel for liquid minecarts
Avatar
Avatar
Qbert 10-May-19 05:49 PM
are there liquid minecarts?
Avatar
Lue 10-May-19 06:50 PM
Liquid minecarts thinkplode
Avatar
Misode 10-May-19 06:59 PM
Yes, Sparks made a module
Avatar
Kroppeb 10-May-19 08:05 PM
Gamemode 4 Datapacks. Contribute to Gamemode4Dev/GM4_Datapacks development by creating an account on GitHub.
Avatar
Misode 10-May-19 08:05 PM
Wait it uses the custom name to detect what type it is?
Avatar
Kroppeb 10-May-19 08:05 PM
It used to only use the custom name
Avatar
Misode 10-May-19 08:05 PM
😬
Avatar
Kroppeb 10-May-19 08:05 PM
But that alowed for liquid change (edited)
Avatar
Misode 10-May-19 08:06 PM
So why does it have those name checks?
Avatar
Kroppeb 10-May-19 08:06 PM
And special refuses to remove those
Avatar
Misode 10-May-19 08:06 PM
Hmm
@SpecialBuilder32 Why are these checks here?
Avatar
Kroppeb 10-May-19 08:09 PM
The annoying part is that those are not checked for interactions (cow's, furnaces ...)
Avatar
SpecialBuilder32 10-May-19 08:14 PM
Because it's already checking nbt for the items and double checking that the tank wasn't messed with or broken dosent hurt
Utility interactions dont inspect the nbt of the hopper
Avatar
Misode 10-May-19 08:15 PM
It will break when it gets updated to use translation keys for example
👆 1
Avatar
Kroppeb 10-May-19 08:15 PM
Well we should remove them in 1.14 it as we might want to change them to use translations
Avatar
Misode 10-May-19 08:16 PM
Checking for a custom name is bad practice anyways
Even if the player managed to break and replace the hopper with their own, what could go wrong?
Avatar
SpecialBuilder32 10-May-19 08:19 PM
If translation keys break it then they can be removed
Avatar
Kroppeb 10-May-19 09:14 PM
@Sparks I made a 1.14 version
Avatar
Sander 10-May-19 09:15 PM
nice
Exported 90 message(s)