Guest User

BackpackType.java

a guest
Nov 24th, 2025
35
0
132 days
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. package info.u_team.useful_backpacks.type;
  2.  
  3. import net.minecraft.world.item.Rarity;
  4.  
  5. public enum BackpackType {
  6.  
  7. SMALL("small", Rarity.COMMON, 5, 2, 44, 24, 8, 64, 176, 142),
  8. MEDIUM("medium", Rarity.UNCOMMON, 7, 3, 26, 24, 8, 82, 176, 218),
  9. LARGE("large", Rarity.RARE, 9, 4, 8, 24, 8, 100, 176, 218);
  10.  
  11. private final String name;
  12. private final Rarity rarity;
  13. private final int inventoryWidth, inventoryHeight;
  14. private final int slotBackpackX, slotBackpackY;
  15. private final int slotPlayerX, slotPlayerY;
  16. private final int textureSizeX, textureSizeY;
  17.  
  18. private BackpackType(String name, Rarity rarity, int inventoryWidth, int inventoryHeight, int slotBackpackX, int slotBackpackY, int slotPlayerX, int slotPlayerY, int textureSizeX, int textureSizeY) {
  19. this.name = name;
  20. this.rarity = rarity;
  21. this.inventoryWidth = inventoryWidth;
  22. this.inventoryHeight = inventoryHeight;
  23. this.slotBackpackX = slotBackpackX;
  24. this.slotBackpackY = slotBackpackY;
  25. this.slotPlayerX = slotPlayerX;
  26. this.slotPlayerY = slotPlayerY;
  27. this.textureSizeX = textureSizeX;
  28. this.textureSizeY = textureSizeY;
  29. }
  30.  
  31. public String getName() {
  32. return name;
  33. }
  34.  
  35. public Rarity getRarity() {
  36. return rarity;
  37. }
  38.  
  39. public int getInventoryWidth() {
  40. return inventoryWidth;
  41. }
  42.  
  43. public int getInventoryHeight() {
  44. return inventoryHeight;
  45. }
  46.  
  47. public int getInventorySize() {
  48. return inventoryWidth * inventoryHeight;
  49. }
  50.  
  51. public int getSlotBackpackX() {
  52. return slotBackpackX;
  53. }
  54.  
  55. public int getSlotBackpackY() {
  56. return slotBackpackY;
  57. }
  58.  
  59. public int getSlotPlayerX() {
  60. return slotPlayerX;
  61. }
  62.  
  63. public int getSlotPlayerY() {
  64. return slotPlayerY;
  65. }
  66.  
  67. public int getTextureSizeX() {
  68. return textureSizeX;
  69. }
  70.  
  71. public int getTextureSizeY() {
  72. return textureSizeY;
  73. }
  74. }
  75.  
Advertisement
Add Comment
Please, Sign In to add comment