remove params from sub itema

This commit is contained in:
Sen 2025-06-29 00:16:29 +02:00
parent 12fb849fa3
commit a080ed5583
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
5 changed files with 8 additions and 9 deletions

View file

@ -123,7 +123,7 @@ public enum CheatTab {
public void filter(List<ItemStack> list) {
for(Item item : ItemRegistry.items()) {
if(item != null && item.getTab() == this) {
item.getSubItems(item, this, list);
item.getSubItems(list);
}
}
}

View file

@ -205,8 +205,8 @@ public class Item {
return 0;
}
public void getSubItems(Item itemIn, CheatTab tab, List<ItemStack> subItems) {
subItems.add(new ItemStack(itemIn));
public void getSubItems(List<ItemStack> subItems) {
subItems.add(new ItemStack(this));
}
public CheatTab getTab() {

View file

@ -157,7 +157,7 @@ public class ItemBanner extends Item
/**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/
public void getSubItems(Item itemIn, CheatTab tab, List<ItemStack> subItems)
public void getSubItems(List<ItemStack> subItems)
{
for (DyeColor color : DyeColor.values())
{

View file

@ -9,7 +9,6 @@ import common.enchantment.EnchantmentHelper;
import common.enchantment.RngEnchantment;
import common.entity.npc.EntityNPC;
import common.init.Items;
import common.item.CheatTab;
import common.item.Item;
import common.item.ItemStack;
import common.item.RngLoot;
@ -35,11 +34,11 @@ public class ItemEnchantedBook extends Item
return false;
}
public void getSubItems(Item itemIn, CheatTab tab, List<ItemStack> subItems)
public void getSubItems(List<ItemStack> subItems)
{
for (Enchantment enchantment : Enchantment.values()) {
if(enchantment != null && enchantment.getType() != null)
subItems.add(Items.enchanted_book.getEnchantedItemStack(new RngEnchantment(enchantment, enchantment.getMaxLevel())));
subItems.add(this.getEnchantedItemStack(new RngEnchantment(enchantment, enchantment.getMaxLevel())));
}
}

View file

@ -578,9 +578,9 @@ public class PotionHelper
return p_77913_0_ & 32767;
}
public static int getPotionPrefixIndexFlags(int p_77908_0_, int p_77908_1_, int p_77908_2_, int p_77908_3_, int p_77908_4_, int p_77908_5_)
public static int getPotionPrefixIndexFlags(int data, int v1, int v2, int v3, int v4, int v5)
{
return (checkFlag(p_77908_0_, p_77908_1_) ? 16 : 0) | (checkFlag(p_77908_0_, p_77908_2_) ? 8 : 0) | (checkFlag(p_77908_0_, p_77908_3_) ? 4 : 0) | (checkFlag(p_77908_0_, p_77908_4_) ? 2 : 0) | (checkFlag(p_77908_0_, p_77908_5_) ? 1 : 0);
return (checkFlag(data, v1) ? 16 : 0) | (checkFlag(data, v2) ? 8 : 0) | (checkFlag(data, v3) ? 4 : 0) | (checkFlag(data, v4) ? 2 : 0) | (checkFlag(data, v5) ? 1 : 0);
}
static