Merge branch '1.14' of https://github.com/TechReborn/TechReborn into 1.14.4
This commit is contained in:
commit
75d9bccd6a
30 changed files with 137 additions and 176 deletions
|
@ -83,7 +83,7 @@ group = 'TechReborn'
|
|||
dependencies {
|
||||
minecraft "com.mojang:minecraft:1.14.4"
|
||||
mappings "net.fabricmc:yarn:1.14.4+build.2"
|
||||
modCompile "net.fabricmc:fabric-loader:0.4.8+build.157"
|
||||
modCompile "net.fabricmc:fabric-loader:0.4.8+build.159"
|
||||
|
||||
//Fabric api
|
||||
modCompile "net.fabricmc.fabric-api:fabric-api:0.3.1+build.208"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemEnergyCrystal extends ItemBattery {
|
||||
|
||||
|
@ -42,15 +42,10 @@ public class ItemEnergyCrystal extends ItemBattery {
|
|||
|
||||
@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.ENERGY_CRYSTAL);
|
||||
ItemStack charged = new ItemStack(TRContent.ENERGY_CRYSTAL);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.ENERGY_CRYSTAL, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemLapotronCrystal extends ItemBattery {
|
||||
|
||||
|
@ -42,15 +42,10 @@ public class ItemLapotronCrystal extends ItemBattery {
|
|||
|
||||
@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.LAPOTRON_CRYSTAL);
|
||||
ItemStack charged = new ItemStack(TRContent.LAPOTRON_CRYSTAL);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.LAPOTRON_CRYSTAL, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,9 +29,9 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemLapotronicOrb extends ItemBattery {
|
||||
|
||||
|
@ -42,15 +42,10 @@ public class ItemLapotronicOrb extends ItemBattery {
|
|||
|
||||
@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.LAPOTRONIC_ORB);
|
||||
ItemStack charged = new ItemStack(TRContent.LAPOTRONIC_ORB);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.LAPOTRONIC_ORB, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -29,8 +29,8 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemLithiumIonBattery extends ItemBattery {
|
||||
|
||||
|
@ -41,16 +41,11 @@ public class ItemLithiumIonBattery extends ItemBattery {
|
|||
|
||||
@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_BATTERY);
|
||||
ItemStack charged = new ItemStack(TRContent.LITHIUM_ION_BATTERY);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.LITHIUM_ION_BATTERY, itemList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ import net.fabricmc.api.Environment;
|
|||
import net.minecraft.item.ItemGroup;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemRedCellBattery extends ItemBattery {
|
||||
|
||||
|
@ -41,15 +41,10 @@ public class ItemRedCellBattery extends ItemBattery {
|
|||
|
||||
@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.RED_CELL_BATTERY);
|
||||
ItemStack charged = new ItemStack(TRContent.RED_CELL_BATTERY);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
items.add(uncharged);
|
||||
items.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.RED_CELL_BATTERY, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
|
||||
package techreborn.items.tool;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.enchantment.EnchantmentHelper;
|
||||
import net.minecraft.enchantment.Enchantments;
|
||||
import net.minecraft.entity.LivingEntity;
|
||||
|
@ -42,8 +42,6 @@ import reborncore.common.powerSystem.PowerSystem;
|
|||
import reborncore.common.util.ItemDurabilityExtensions;
|
||||
import reborncore.common.util.ItemUtils;
|
||||
import techreborn.TechReborn;
|
||||
import techreborn.utils.TagUtils;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
public class ItemJackhammer extends PickaxeItem implements IEnergyItemInfo, ItemDurabilityExtensions {
|
||||
|
@ -60,8 +58,7 @@ public class ItemJackhammer extends PickaxeItem implements IEnergyItemInfo, Item
|
|||
// ItemPickaxe
|
||||
@Override
|
||||
public float getMiningSpeed(ItemStack stack, BlockState state) {
|
||||
if ((TagUtils.isOre(state, "stone") || state.getBlock() == Blocks.STONE)
|
||||
&& new ItemPowerManager(stack).getEnergyStored() >= cost) {
|
||||
if (Block.isNaturalStone(state.getBlock()) && new ItemPowerManager(stack).getEnergyStored() >= cost) {
|
||||
return miningSpeed;
|
||||
} else {
|
||||
return 0.5F;
|
||||
|
|
|
@ -32,10 +32,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemChainsaw;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemAdvancedChainsaw extends ItemChainsaw {
|
||||
|
||||
|
@ -52,13 +52,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.ADVANCED_CHAINSAW);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.ADVANCED_CHAINSAW, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,10 +32,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemDrill;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemAdvancedDrill extends ItemDrill {
|
||||
|
||||
|
@ -52,13 +52,7 @@ public class ItemAdvancedDrill extends ItemDrill {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.ADVANCED_DRILL);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.ADVANCED_DRILL, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,10 +30,10 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemJackhammer;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemAdvancedJackhammer extends ItemJackhammer {
|
||||
|
||||
|
@ -50,12 +50,6 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.ADVANCED_JACKHAMMER);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.ADVANCED_JACKHAMMER, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ public class ItemRockCutter extends PickaxeItem implements IEnergyItemInfo, Item
|
|||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(uncharged);
|
||||
// itemList.add(charged);
|
||||
itemList.add(charged);
|
||||
}
|
||||
|
||||
// IEnergyItemInfo
|
||||
|
|
|
@ -32,10 +32,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemChainsaw;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemBasicChainsaw extends ItemChainsaw {
|
||||
|
||||
|
@ -50,13 +50,7 @@ public class ItemBasicChainsaw extends ItemChainsaw {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.BASIC_CHAINSAW);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.BASIC_CHAINSAW, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -32,10 +32,10 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.item.Items;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemDrill;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemBasicDrill extends ItemDrill {
|
||||
|
||||
|
@ -50,13 +50,7 @@ public class ItemBasicDrill extends ItemDrill {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.BASIC_DRILL);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.BASIC_DRILL, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -30,10 +30,10 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemJackhammer;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemBasicJackhammer extends ItemJackhammer {
|
||||
|
||||
|
@ -48,12 +48,6 @@ public class ItemBasicJackhammer extends ItemJackhammer {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.BASIC_JACKHAMMER);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.BASIC_JACKHAMMER, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,13 +31,13 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
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.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
/**
|
||||
* Created by modmuss50 on 05/11/2016.
|
||||
|
@ -72,13 +72,7 @@ public class ItemElectricTreetap extends Item implements IEnergyItemInfo, ItemDu
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(TRContent.ELECTRIC_TREE_TAP);
|
||||
ItemStack charged = new ItemStack(TRContent.ELECTRIC_TREE_TAP);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(uncharged);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.ELECTRIC_TREE_TAP, itemList);
|
||||
}
|
||||
|
||||
// IEnergyItemInfo
|
||||
|
|
|
@ -51,6 +51,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemChainsaw;
|
||||
import techreborn.utils.InitUtils;
|
||||
import techreborn.utils.MessageIDs;
|
||||
import techreborn.utils.TagUtils;
|
||||
|
||||
|
@ -76,13 +77,7 @@ public class ItemIndustrialChainsaw extends ItemChainsaw {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.INDUSTRIAL_CHAINSAW);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.INDUSTRIAL_CHAINSAW, itemList);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -54,6 +54,7 @@ import reborncore.common.util.ItemUtils;
|
|||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemDrill;
|
||||
import techreborn.utils.InitUtils;
|
||||
import techreborn.utils.MessageIDs;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
@ -71,7 +72,7 @@ public class ItemIndustrialDrill extends ItemDrill {
|
|||
this.transferLimit = 1000;
|
||||
}
|
||||
|
||||
public Set<BlockPos> getTargetBlocks(World worldIn, BlockPos pos, @Nullable PlayerEntity playerIn) {
|
||||
private Set<BlockPos> getTargetBlocks(World worldIn, BlockPos pos, @Nullable PlayerEntity playerIn) {
|
||||
Set<BlockPos> targetBlocks = new HashSet<BlockPos>();
|
||||
if (playerIn == null) {
|
||||
return new HashSet<>();
|
||||
|
@ -117,7 +118,7 @@ public class ItemIndustrialDrill extends ItemDrill {
|
|||
return targetBlocks;
|
||||
}
|
||||
|
||||
public void breakBlock(BlockPos pos, World world, PlayerEntity playerIn, ItemStack drill) {
|
||||
private void breakBlock(BlockPos pos, World world, PlayerEntity playerIn, ItemStack drill) {
|
||||
BlockState blockState = world.getBlockState(pos);
|
||||
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(drill);
|
||||
|
@ -243,12 +244,6 @@ public class ItemIndustrialDrill extends ItemDrill {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.INDUSTRIAL_DRILL);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.INDUSTRIAL_DRILL, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,10 +30,10 @@ import net.minecraft.item.ItemGroup;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.ToolMaterials;
|
||||
import net.minecraft.util.DefaultedList;
|
||||
import reborncore.api.power.ItemPowerManager;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.items.tool.ItemJackhammer;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
public class ItemIndustrialJackhammer extends ItemJackhammer {
|
||||
|
||||
|
@ -51,12 +51,6 @@ public class ItemIndustrialJackhammer extends ItemJackhammer {
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack stack = new ItemStack(TRContent.INDUSTRIAL_JACKHAMMER);
|
||||
ItemStack charged = stack.copy();
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(stack);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.INDUSTRIAL_JACKHAMMER, itemList);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,6 +49,7 @@ import reborncore.common.util.TorchHelper;
|
|||
import techreborn.TechReborn;
|
||||
import techreborn.config.TechRebornConfig;
|
||||
import techreborn.init.TRContent;
|
||||
import techreborn.utils.InitUtils;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
@ -157,13 +158,7 @@ public class ItemOmniTool extends PickaxeItem implements IEnergyItemInfo, ItemDu
|
|||
if (!isIn(par2ItemGroup)) {
|
||||
return;
|
||||
}
|
||||
ItemStack uncharged = new ItemStack(TRContent.OMNI_TOOL);
|
||||
ItemStack charged = new ItemStack(TRContent.OMNI_TOOL);
|
||||
ItemPowerManager capEnergy = new ItemPowerManager(charged);
|
||||
capEnergy.setEnergyStored(capEnergy.getMaxEnergyStored());
|
||||
|
||||
itemList.add(uncharged);
|
||||
itemList.add(charged);
|
||||
InitUtils.initPoweredItems(TRContent.OMNI_TOOL, itemList);
|
||||
}
|
||||
|
||||
// IEnergyItemInfo
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -652,5 +652,41 @@
|
|||
"techreborn:recycler": "Recycler",
|
||||
"techreborn:scrapbox": "Scrapbox",
|
||||
"techreborn:vacuum_freezer": "Vacuum Freezer",
|
||||
"techreborn:fluid_replicator": "Fluid Replicator"
|
||||
"techreborn:fluid_replicator": "Fluid Replicator",
|
||||
|
||||
"_comment26": "Fluid buckets",
|
||||
"item.techreborn.beryllium_bucket": "Beryllium",
|
||||
"item.techreborn.calcium_bucket": "Calcium",
|
||||
"item.techreborn.calciumcarbonate_bucket": "Calcium Carbonate",
|
||||
"item.techreborn.carbon_bucket": "Carbon",
|
||||
"item.techreborn.carbon_fiber_bucket": "Carbon Fiber",
|
||||
"item.techreborn.chlorite_bucket": "Chlorite",
|
||||
"item.techreborn.compressed_air_bucket": "Compressed Air",
|
||||
"item.techreborn.deuterium_bucket": "Deuterium",
|
||||
"item.techreborn.diesel_bucket": "Diesel",
|
||||
"item.techreborn.electrolyzed_water_bucket": "Electrolyzed Water",
|
||||
"item.techreborn.glyceryl_bucket": "Glyceryl",
|
||||
"item.techreborn.helium_bucket": "Helium",
|
||||
"item.techreborn.helium3_bucket": "Helium3",
|
||||
"item.techreborn.heliumplasma_bucket": "Heliumplasma",
|
||||
"item.techreborn.hydrogen_bucket": "Hydrogen",
|
||||
"item.techreborn.lithium_bucket": "Lithium",
|
||||
"item.techreborn.mercury_bucket": "Mercury",
|
||||
"item.techreborn.methane_bucket": "Methane",
|
||||
"item.techreborn.nitro_carbon_bucket": "Nitrocarbon",
|
||||
"item.techreborn.nitrocoal_fuel_bucket": "Nitrocoal Fuel",
|
||||
"item.techreborn.nitro_diesel_bucket": "Nitro Diesel",
|
||||
"item.techreborn.nitrofuel_bucket": "Nitrofuel",
|
||||
"item.techreborn.nitrogen_bucket": "Nitrogen",
|
||||
"item.techreborn.nitrogen_dioxide_bucket": "Nitrogen Dioxide",
|
||||
"item.techreborn.oil_bucket": "Oil",
|
||||
"item.techreborn.potassium_bucket": "Potassium",
|
||||
"item.techreborn.silicon_bucket": "Silicon",
|
||||
"item.techreborn.sodium_bucket": "Sodium",
|
||||
"item.techreborn.sodium_persulfate_bucket": "Sodium Persulfate",
|
||||
"item.techreborn.sodium_sulfide_bucket": "Sodium Sulfide",
|
||||
"item.techreborn.sulfur_bucket": "Sulfur",
|
||||
"item.techreborn.sulfuric_acid_bucket": "Sulfuric Acid",
|
||||
"item.techreborn.tritium_bucket": "Tritium",
|
||||
"item.techreborn.wolframium_bucket": "Wolframium"
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"CCC",
|
||||
"C C",
|
||||
"CCC"
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "techreborn:carbon_bucket"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "techreborn:carbon_fiber"
|
||||
}
|
||||
}
|
|
@ -1,14 +1,14 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"CC"
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "techreborn:carbon_fiber"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "techreborn:carbon_mesh"
|
||||
}
|
||||
}
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "techreborn:carbon_fiber"
|
||||
},
|
||||
{
|
||||
"item": "techreborn:carbon_fiber"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "techreborn:carbon_mesh"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"tag": "c:tin_ingot"
|
||||
},
|
||||
"C": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:helium_bucket"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
"tag": "c:tin_ingot"
|
||||
},
|
||||
"S": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:sodium_bucket"
|
||||
},
|
||||
"P": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:potassium_bucket"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -13,10 +13,10 @@
|
|||
"tag": "c:tin_ingot"
|
||||
},
|
||||
"P": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:potassium_bucket"
|
||||
},
|
||||
"S": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:sodium_bucket"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"item": "techreborn:neutron_reflector"
|
||||
},
|
||||
"C": {
|
||||
"item": "techreborn:cell"
|
||||
"item": "techreborn:beryllium_bucket"
|
||||
}
|
||||
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue