brucelee

stackupfix

Aug 11th, 2020 (edited)
2,038
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.49 KB | None | 0 0
  1. #priority -1
  2.  
  3. import crafttweaker.game.IGame;
  4. import crafttweaker.item.IItemStack;
  5. import crafttweaker.item.IItemDefinition;
  6.  
  7. var mapSizeChange = {
  8.     64 : 10000,
  9.     16 : 5000,
  10.     8 : 2500
  11. } as int[int];
  12.  
  13. for item in game.items {
  14.     if (item.name != "tile.air") {
  15.         var stackSize = item.makeStack().maxStackSize;
  16.         for old, new in mapSizeChange {
  17.             if (stackSize == old) {
  18.                 item.makeStack().maxStackSize = new;
  19.             }
  20.         }
  21.     }
  22. }
  23.  
Add Comment
Please, Sign In to add comment