it compiles :D
This commit is contained in:
parent
500ff29dbd
commit
6b9f6cb4f8
142 changed files with 755 additions and 1724 deletions
|
@ -24,23 +24,19 @@
|
|||
|
||||
package techreborn.items.armor;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.powerSystem.PoweredItemContainerProvider;
|
||||
import reborncore.common.powerSystem.ItemPowerManager;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.registration.RebornRegister;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
|
@ -48,8 +44,6 @@ import techreborn.config.ConfigTechReborn;
|
|||
import techreborn.init.TRArmorMaterial;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@RebornRegister(TechReborn.MOD_ID)
|
||||
public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo {
|
||||
|
||||
|
@ -63,18 +57,11 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
|
|||
super(TRArmorMaterial.CLOAKING, EquipmentSlot.CHEST);
|
||||
}
|
||||
|
||||
// Item
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
|
||||
return "techreborn:" + "textures/models/armor/cloaking.png";
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onEntityTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
|
||||
if (entityIn instanceof PlayerEntity) {
|
||||
PlayerEntity player = (PlayerEntity) entityIn;
|
||||
IEnergyStorage capEnergy = new ItemPowerManager(stack);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(stack);
|
||||
if (capEnergy != null && capEnergy.getEnergyStored() >= usage) {
|
||||
capEnergy.extractEnergy(usage, false);
|
||||
player.setInvisible(true);
|
||||
|
|
|
@ -24,28 +24,23 @@
|
|||
|
||||
package techreborn.items.armor;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.powerSystem.PoweredItemContainerProvider;
|
||||
import reborncore.common.powerSystem.ItemPowerManager;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo, ItemDurabilityExtensions {
|
||||
|
||||
// 400M FE maxCharge and 100k FE\t charge rate. Fully charged in 3 mins.
|
||||
|
@ -93,13 +88,6 @@ public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo,
|
|||
return PowerSystem.getDisplayPower().colour;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
|
||||
return "techreborn:" + "textures/models/armor/lapotronpack.png";
|
||||
}
|
||||
|
||||
// IEnergyItemInfo
|
||||
@Override
|
||||
public int getCapacity() {
|
||||
|
|
|
@ -24,28 +24,24 @@
|
|||
|
||||
package techreborn.items.armor;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EquipmentSlot;
|
||||
import net.minecraft.entity.player.PlayerEntity;
|
||||
import net.minecraft.item.*;
|
||||
import net.minecraft.nbt.CompoundTag;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import net.minecraft.world.World;
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
|
||||
import reborncore.api.power.IEnergyItemInfo;
|
||||
import reborncore.common.powerSystem.ExternalPowerSystems;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.powerSystem.ItemPowerManager;
|
||||
import reborncore.common.powerSystem.PowerSystem;
|
||||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.config.ConfigTechReborn;
|
||||
import techreborn.init.TRContent;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo, ItemDurabilityExtensions {
|
||||
|
||||
// 8M FE maxCharge and 2k FE\t charge rate. Fully charged in 3 mins.
|
||||
|
@ -65,7 +61,8 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
|
|||
|
||||
for (int i = 0; i < player.inventory.getInvSize(); i++) {
|
||||
if (!player.inventory.getInvStack(i).isEmpty()) {
|
||||
ExternalPowerSystems.chargeItem(capEnergy, player.inventory.getInvStack(i));
|
||||
//TODO fix me
|
||||
//ExternalPowerSystems.chargeItem(capEnergy, player.inventory.getInvStack(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -93,12 +90,6 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
|
|||
return PowerSystem.getDisplayPower().colour;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Environment(EnvType.CLIENT)
|
||||
public String getArmorTexture(ItemStack stack, Entity entity, EquipmentSlot slot, String type) {
|
||||
return "techreborn:" + "textures/models/armor/lithiumbatpack.png";
|
||||
}
|
||||
|
||||
@Environment(EnvType.CLIENT)
|
||||
@Override
|
||||
public void appendItemsForGroup(ItemGroup group, DefaultedList<ItemStack> items) {
|
||||
|
|
|
@ -54,9 +54,10 @@ public class ItemTRArmour extends ArmorItem implements ItemDurabilityExtensions
|
|||
//setTranslationKey(material.name().toLowerCase() + "Chestplate");
|
||||
if (slot == EquipmentSlot.LEGS)
|
||||
//setTranslationKey(material.name().toLowerCase() + "Leggings");
|
||||
if (slot == EquipmentSlot.FEET)
|
||||
if (slot == EquipmentSlot.FEET) {
|
||||
|
||||
}
|
||||
//setTranslationKey(material.name().toLowerCase() + "Boots");
|
||||
TRRecipeHandler.hideEntry(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue