Started by
Plainside
on
Topic category: Help with Minecraft modding (Java Edition)
Weird issue im having today regarding the following procedure:
The idea is to check if its a player, if yes, check the item in the main hand, if its air or not-air (any other item), or a pickaxe made of gold (iron and diamond to be added) and if there is a efficiency enchant (based on the level a multiplier gets activated).
However with this, when i hit my boss... well it straight up crashes the game and freezes MCreator up and you cannot close it (only via killing the process of mcreator).
Edited by Plainside on Wed, 02/19/2020 - 18:29
You are dealing damage to the entity when it is hit which triggers your procedure again, making a loop and then crash.
You can add a cooldown. so check if nbt cd=0 {
<do this procedure>
cd=X;
}
on entity initial spawn
cd=X;
on tick update cd--;
(I mean cd=cd-1)
Bigger X is, longer the cooldown
And also F wording is not allowed on this website.
Solved it like this instead:
Can't loop if the statement doesnt allow for it :D
Is there away to check for type:Pickaxe with min harvest level 2?
Okay, somehow my workspace rolled back a little, above is still the solution only with the 'Efficiency' enchant. haha.
I think there is a procedure block for this