Itemgroup filler moved to init utils.
This commit is contained in:
parent
62f1c521f0
commit
f9023d7b0f
21 changed files with 62 additions and 150 deletions
|
@ -41,6 +41,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRArmorMaterial;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo {
|
||||
|
||||
|
@ -76,16 +77,11 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> itemList) {
|
||||
if (!isIn(group)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(TRContent.CLOAKING_DEVICE);
|
||||
ItemStack charged = new ItemStack(TRContent.CLOAKING_DEVICE);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.CLOAKING_DEVICE, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -31,13 +31,13 @@ import net.minecraft.item.*;
|
|||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo, ItemDurabilityExtensions {
|
||||
|
||||
|
@ -51,16 +51,11 @@ public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo,
|
|||
|
||||
// Item
|
||||
@Override
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> itemList) {
|
||||
if (!isIn(group)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(TRContent.LAPOTRONIC_ORBPACK);
|
||||
ItemStack charged = new ItemStack(TRContent.LAPOTRONIC_ORBPACK);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.LAPOTRONIC_ORBPACK, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -40,6 +40,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo, ItemDurabilityExtensions {
|
||||
|
||||
|
@ -91,16 +92,11 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
|
|||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
|
||||
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> itemList) {
|
||||
if (!isIn(group)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(TRContent.LITHIUM_ION_BATPACK);
|
||||
ItemStack charged = new ItemStack(TRContent.LITHIUM_ION_BATPACK);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.LITHIUM_ION_BATPACK, itemList);
|
||||
}
|
||||
|
||||
// IEnergyItemInfo
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue