Itemgroup filler moved to init utils.
This commit is contained in:
parent
62f1c521f0
commit
f9023d7b0f
21 changed files with 62 additions and 150 deletions
|
@ -26,10 +26,13 @@ package techreborn.utils;
|
|||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.sound.SoundEvent;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.util.Identifier;
|
||||
import net.minecraft.util.registry.Registry;
|
||||
import reborncore.RebornRegistry;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.TechReborn;
|
||||
|
||||
public class InitUtils {
|
||||
|
@ -47,4 +50,14 @@ public class InitUtils {
|
|||
Identifier identifier = new Identifier(TechReborn.MOD_ID, name);
|
||||
return Registry.register(Registry.SOUND_EVENT, identifier, new SoundEvent(identifier));
|
||||
}
|
||||
|
||||
public static void initPoweredItems(Item item, DefaultedList<ItemStack> itemList) {
|
||||
ItemStack uncharged = new ItemStack(item);
|
||||
ItemStack charged = new ItemStack(item);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(uncharged);
|
||||
itemList.add(charged);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue