Started by
DJSlimeball
on
Topic category: Help with Minecraft modding (Java Edition)
I'm using the random block to make a percent chance of your boots being damaged and you getting an item, the trigger is "on player tick update". When I do this; it constantly fluctuates the durability of the boots and how many items I have in my inventory, why is this?
on player tick update is per tick. 1 tick is roughly 0.05s, or 20 ticks are roughly 1s. Random [0,1] picks a number between 0 and 1, so you probably want something like:
if (random[0,1] < 0.05) {
deal 1 damage to item
}
I cannot tell you why its spawning itmes in your inventory without seeing your code
it's supposed to give me items too, that's intentional, and my code isn't any different than that, but the amount of both damage to the item, and items it's giving me (which are intentionally being given to me) are constantly fluctuating