Model for lithium batpack
This commit is contained in:
parent
79af5c0a15
commit
f9c484090f
4 changed files with 11 additions and 10 deletions
|
@ -40,6 +40,7 @@ import reborncore.common.powerSystem.PowerSystem;
|
||||||
import reborncore.common.powerSystem.PoweredItemContainerProvider;
|
import reborncore.common.powerSystem.PoweredItemContainerProvider;
|
||||||
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
|
import reborncore.common.powerSystem.forge.ForgePowerItemManager;
|
||||||
import reborncore.common.util.ItemUtils;
|
import reborncore.common.util.ItemUtils;
|
||||||
|
import techreborn.TechReborn;
|
||||||
import techreborn.config.ConfigTechReborn;
|
import techreborn.config.ConfigTechReborn;
|
||||||
import techreborn.init.TRContent;
|
import techreborn.init.TRContent;
|
||||||
|
|
||||||
|
@ -52,7 +53,7 @@ public class ItemLithiumIonBatpack extends ItemArmor implements IEnergyItemInfo
|
||||||
public int transferLimit = 2_000;
|
public int transferLimit = 2_000;
|
||||||
|
|
||||||
public ItemLithiumIonBatpack() {
|
public ItemLithiumIonBatpack() {
|
||||||
super(ArmorMaterial.DIAMOND, EntityEquipmentSlot.CHEST, new Item.Properties().maxStackSize(1));
|
super(ArmorMaterial.DIAMOND, EntityEquipmentSlot.CHEST, new Item.Properties().group(TechReborn.ITEMGROUP).maxStackSize(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void distributePowerToInventory(World world, EntityPlayer player, ItemStack itemStack, int maxSend) {
|
public static void distributePowerToInventory(World world, EntityPlayer player, ItemStack itemStack, int maxSend) {
|
||||||
|
@ -101,7 +102,7 @@ public class ItemLithiumIonBatpack extends ItemArmor implements IEnergyItemInfo
|
||||||
@Override
|
@Override
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {
|
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {
|
||||||
return "techreborn:" + "textures/models/lithiumbatpack.png";
|
return "techreborn:" + "textures/models/armor/lithiumbatpack.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
@OnlyIn(Dist.CLIENT)
|
@OnlyIn(Dist.CLIENT)
|
||||||
|
@ -110,8 +111,8 @@ public class ItemLithiumIonBatpack extends ItemArmor implements IEnergyItemInfo
|
||||||
if (!isInGroup(group)) {
|
if (!isInGroup(group)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
ItemStack uncharged = new ItemStack(TRContent.LITHIUM_ION_BATTERY);
|
ItemStack uncharged = new ItemStack(TRContent.LITHIUM_ION_BATPACK);
|
||||||
ItemStack charged = new ItemStack(TRContent.LITHIUM_ION_BATTERY);
|
ItemStack charged = new ItemStack(TRContent.LITHIUM_ION_BATPACK);
|
||||||
ForgePowerItemManager capEnergy = new ForgePowerItemManager(charged);
|
ForgePowerItemManager capEnergy = new ForgePowerItemManager(charged);
|
||||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||||
items.add(uncharged);
|
items.add(uncharged);
|
||||||
|
|
|
@ -1,6 +0,0 @@
|
||||||
{
|
|
||||||
"parent": "techreborn:item/techrebornItem",
|
|
||||||
"textures": {
|
|
||||||
"layer0": "techreborn:items/armor/lithium_batpack"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "techreborn:item/armor/lithium_batpack"
|
||||||
|
}
|
||||||
|
}
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
Loading…
Add table
Reference in a new issue