Posted May 28, 20223 yr Hello, i have a strange problem: if i write a nbt in the inventoryTick method into the item, the item plays the equip anim. As example: @Override public void inventoryTick(ItemStack pStack, Level pLevel, Entity pEntity, int pSlotId, boolean pIsSelected) { if (pLevel instanceof ServerLevel SL) { CompoundTag pCompoundTag = pStack.getOrCreateTag(); if (pEntity instanceof Player player) { pCompoundTag.putFloat("lootdebugs.drills_rot", pEntity.getOnPos().getX());//Debug System.out.println(pEntity.getOnPos().getX()); } } super.inventoryTick(pStack, pLevel, pEntity, pSlotId, pIsSelected); } When I use this code, the item plays the equip-item animation every time I move in the x direction Also, I found out that I can't break blocks: the blockbreak animation stops when I move in the x-direction Can someone help me? Thanks
May 10, 20241 yr Hey! Could you please tell what was the solution to this problem since all the replies were deleted for some reason. I would be really grateful for a reply!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.