This commit is contained in:
modmuss50 2019-06-13 13:14:11 +01:00
parent 4479116d1c
commit f8f20ce6ba
81 changed files with 280 additions and 434 deletions

View file

@ -58,7 +58,7 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
}
@Override
public void onEntityTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
if (entityIn instanceof PlayerEntity) {
PlayerEntity player = (PlayerEntity) entityIn;
ItemPowerManager capEnergy = new ItemPowerManager(stack);
@ -79,8 +79,8 @@ public class ItemCloakingDevice extends ItemTRArmour implements IEnergyItemInfo
@Environment(EnvType.CLIENT)
@Override
public void appendItemsForGroup(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isInItemGroup(group)) {
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isIn(group)) {
return;
}
ItemStack uncharged = new ItemStack(TRContent.CLOAKING_DEVICE);

View file

@ -48,13 +48,13 @@ public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo,
public int transferLimit = 100_000;
public ItemLapotronicOrbpack() {
super(ArmorMaterials.DIAMOND, EquipmentSlot.CHEST, new Item.Settings().itemGroup(TechReborn.ITEMGROUP).stackSize(1));
super(ArmorMaterials.DIAMOND, EquipmentSlot.CHEST, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1));
}
// Item
@Override
public void appendItemsForGroup(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isInItemGroup(group)) {
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isIn(group)) {
return;
}
ItemStack uncharged = new ItemStack(TRContent.LAPOTRONIC_ORBPACK);
@ -66,7 +66,7 @@ public class ItemLapotronicOrbpack extends ArmorItem implements IEnergyItemInfo,
}
@Override
public void onEntityTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
if (entityIn instanceof PlayerEntity) {
ItemLithiumIonBatpack.EnvTypeributePowerToInventory(worldIn, (PlayerEntity) entityIn, stack,
(int) transferLimit);

View file

@ -49,7 +49,7 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
public int transferLimit = 2_000;
public ItemLithiumIonBatpack() {
super(ArmorMaterials.DIAMOND, EquipmentSlot.CHEST, new Item.Settings().itemGroup(TechReborn.ITEMGROUP).stackSize(1));
super(ArmorMaterials.DIAMOND, EquipmentSlot.CHEST, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1));
}
public static void EnvTypeributePowerToInventory(World world, PlayerEntity player, ItemStack itemStack, int maxSend) {
@ -69,7 +69,7 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
// Item
@Override
public void onEntityTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) {
if (entityIn instanceof PlayerEntity) {
EnvTypeributePowerToInventory(worldIn, (PlayerEntity) entityIn, stack, (int) transferLimit);
}
@ -92,8 +92,8 @@ public class ItemLithiumIonBatpack extends ArmorItem implements IEnergyItemInfo,
@Environment(EnvType.CLIENT)
@Override
public void appendItemsForGroup(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isInItemGroup(group)) {
public void appendStacks(ItemGroup group, DefaultedList<ItemStack> items) {
if (!isIn(group)) {
return;
}
ItemStack uncharged = new ItemStack(TRContent.LITHIUM_ION_BATPACK);

View file

@ -46,7 +46,7 @@ public class ItemTRArmour extends ArmorItem implements ItemDurabilityExtensions
}
public ItemTRArmour(ArmorMaterial material, EquipmentSlot slot, String repairOreDict) {
super(material, slot, (new Item.Settings()).itemGroup(TechReborn.ITEMGROUP).stackSize(1));
super(material, slot, (new Item.Settings()).group(TechReborn.ITEMGROUP).maxCount(1));
this.repairOreDict = repairOreDict;
if (slot == EquipmentSlot.HEAD)
//setTranslationKey(material.name().toLowerCase() + "Helmet");