remove params from sub itema
This commit is contained in:
parent
12fb849fa3
commit
a080ed5583
5 changed files with 8 additions and 9 deletions
|
@ -123,7 +123,7 @@ public enum CheatTab {
|
||||||
public void filter(List<ItemStack> list) {
|
public void filter(List<ItemStack> list) {
|
||||||
for(Item item : ItemRegistry.items()) {
|
for(Item item : ItemRegistry.items()) {
|
||||||
if(item != null && item.getTab() == this) {
|
if(item != null && item.getTab() == this) {
|
||||||
item.getSubItems(item, this, list);
|
item.getSubItems(list);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,8 +205,8 @@ public class Item {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getSubItems(Item itemIn, CheatTab tab, List<ItemStack> subItems) {
|
public void getSubItems(List<ItemStack> subItems) {
|
||||||
subItems.add(new ItemStack(itemIn));
|
subItems.add(new ItemStack(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
public CheatTab getTab() {
|
public CheatTab getTab() {
|
||||||
|
|
|
@ -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)
|
* 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())
|
for (DyeColor color : DyeColor.values())
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,6 @@ import common.enchantment.EnchantmentHelper;
|
||||||
import common.enchantment.RngEnchantment;
|
import common.enchantment.RngEnchantment;
|
||||||
import common.entity.npc.EntityNPC;
|
import common.entity.npc.EntityNPC;
|
||||||
import common.init.Items;
|
import common.init.Items;
|
||||||
import common.item.CheatTab;
|
|
||||||
import common.item.Item;
|
import common.item.Item;
|
||||||
import common.item.ItemStack;
|
import common.item.ItemStack;
|
||||||
import common.item.RngLoot;
|
import common.item.RngLoot;
|
||||||
|
@ -35,11 +34,11 @@ public class ItemEnchantedBook extends Item
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void getSubItems(Item itemIn, CheatTab tab, List<ItemStack> subItems)
|
public void getSubItems(List<ItemStack> subItems)
|
||||||
{
|
{
|
||||||
for (Enchantment enchantment : Enchantment.values()) {
|
for (Enchantment enchantment : Enchantment.values()) {
|
||||||
if(enchantment != null && enchantment.getType() != null)
|
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())));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -578,9 +578,9 @@ public class PotionHelper
|
||||||
return p_77913_0_ & 32767;
|
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
|
static
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue