Implement Timefall - #17
Conversation
5c5676e to
ee2b718
Compare
|
This branch is also on latest now |
|
I have a couple of thoughts regarding this item. First, it's going to be called Timefalleroni since it's a Kronii item. Second, I think that we should make it more general by simulating several random ticks in a small area around the player rather than just converting all of the copper. Also, it's going to always consume the item when you use it. And I just checked and Klin's version was called Timefalleronii. I'm not sure which name we want to go with. Need to go rewatch Kronii's streams and find out whether her items ended with |
|
Yeah, that sounds good to me. How many ticks/block should it be? Will do the |
|
For now, we don't really have to think about the random tick chance. We can kind of just loosely simulate it and call |
|
5 block cubed is like... Not much if you have to space the blocks around because it still has to go through the pre-oxidation phase. The minimum for 8 blocks in 3 dimentions is a 6x6x6 cube. I just drew on pen and paper though, didn't actually test in Minecraft. The most efficient one is apparently a 10x6 though. |
|
This won't require the blocks to be spaced though. Since we'll be calling |
|
If I'm reading this correctly the random tick only puts the block at pre-oxidization
Though tbh it still oxidizes anyway because of the sheer number of (called) random ticks, and we can just set an arbitrary number and let the players spam it. Maybe even automation is possible? |
|
Yeah, it's fine to make players spam it. We'll reimplement it like how I described. |
|
Same AoE? (5x5x5) |
|
For now, yes. It's easy to change later if we want to. |
Instead of oxidizing copper blocks by 1 level, random tick a random tickable block x (25) times.
|
So I implemented the changes and it seems like copper blocks are really not oxidizing when together. When separated, they oxidize as normal. Trees and seeds grow wonderfully though. One concern I have is that when I use the item, it takes a second to delete the placed block and complete the function. Not sure if the whole server freezes during this but if so, I'd like to know if there's a way to "asynchronously" (not freeze the server) run it. P.S. I didn't push yet because internet went out last night and now I'm at school :dum: |
Though it could just be my laptop's power saving clocking down my cpu. |
|
I don't understand what placed block you're referring to that has to be deleted. I have an idea of how I would implement this, and your implementation is probably different. So I'll wait for you to push it and we can deal with your concern after I review it. |
|
Yep, thankfully it's earlier dismissal today. The block I'm talking about is the placed powdered snow the bucket places before it's removed by presumably paper. I'll send a video of it when I push. |
|
Holy moly, those nested loops... It's no wonder the server freezes when you run all that in a single tick. Sorry for being blunt, but this implementation is whack. |
|
Oh yeah, I know. Credit to klin for the nested for loops lol But how else would I do it? Get all coords of the blocks in a 5x5x5 and random tick it off the thread? |
|
Also, now that I'm actually reviewing it, I don't understand why we are changing the powder snow bucket into an empty bucket only to remove it in the end. The implementation should be: |
|
So this is why math is important for programming huh. I'll try to find that formula and implement it today. And are we fine with not deleting the item and just returning the bucket? |
|
If we return the bucket, that makes the recipe even cheaper. But yeah, it's ok. Also, I've just noticed that you had changed the loop bounds into -5 to 5 which makes the area of effect 10 x 10 x 10. Thus the nested loops run 25,000 iterations. |
|
At this point I might rip the copypaste from klin and roll my own. Also, any starting searches for the math you mentioned above? |
|
Think about how you make a 3-dimensional array into a linear array. Now we want the reverse. |
|
I don't like math >.> One side effect of checking random tickability and not re-rolling is that the hit rate is quite low. It took 2 whole hotbars to grow an oak tree out of a 4x7 sapling field. |
|
Good, this is the implementation I was going for. Now that we have the basis for it, we can just adjust the numbers to make the hit rate more reasonable. I will be outside through the beginning of the day. After I get back, I'll do some testing. |
|
Try this and let me know what you think. |
|
It's... Okay? Maybe if it was stackable and you could just walk up to a patch of dirt, spam the whole hotbar and get a respectable patch of grass. Right now it takes like 2 hotbars to get 5 grass conversions. Copper though, is still quite bad. I think we won't be able to do anything about that because of the pre-oxidization thing. Growing trees is more economical via bone meal. If I were to use this in the server to grow or oxidize something, I'd rather use the bone blocks for bone meal and spread the copper apart and wait. Lava generation though, that's a lot faster. Wiki says 20m for a cauldron, got my first on ~1-1.5 hotbars. I think this item as is will be more for HD than the regular player. |
|
You were right about the mechanics of copper oxidation. You can improve the chances of successful random ticking though by placing fully oxidized blocks around the copper that you're trying to oxidize. A pattern like the following is good: As long as we're using powder snow bucket to represent the item, we can't do anything about it being unstackable. However, we could make each bucket have multiple uses. Maybe we should make the powder snow bucket have a low random chance of converting to an empty bucket. |
|
One random thought, what about placing blocks to extend the range, such as lightning rods? It would need to have a limit but it might be a nice mechanic. Alternatively, we just have it decrease durability, if that's possible with a bucket. |
|
And also, why is the center on the player and not the placed block? |
|
Items have to have ItemMeta that implements the Damageable interface to use vanilla durability mechanics, and buckets do not. Conversely, why do we want to have the center on the clicked block rather than on the player? It seems unintuitive to me if it's not centered on the player. Also, centering on the clicked block requires that the player clicks a block to activate the ability. I have changed it so the player could also click air. |
|
Well, how about this gets merged and we review this item once we get feedback? I feel like we're going to be wasting time chasing perfection especially since we have a lot of items left to go |
|
OK yeah, I agree. |
|
Converting to draft until #27 gets merged and I finish the writeup on the changes |
|
We also need to check what the correct naming scheme is supposed to be by reviewing Kronii's streams. |
|
Marking this as ready, we just need to check the naming scheme |
No description provided.