Barrel with specific amount of items

Started by buggyruy1 on

Topic category: Help with Minecraft modding (Java Edition)

Joined May 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Barrel with specific amount of items

so i need help in java so i was trying to make that procedure will give player an barrel with items that has really specific count(ss can go only form 0 to 15) by my formula:

        // Calculate the maximum number of items based on inputed signal strength
int items = Math.min((ss + 1) * 115 - 1, 1728);

// find count of stacks and stack remainder
int barrelfullStacks = items / 64;
int barrelremainder = items % 64;