diff --git a/src/main/java/techreborn/config/TechRebornConfig.java b/src/main/java/techreborn/config/TechRebornConfig.java index b61a961da..279533ad5 100644 --- a/src/main/java/techreborn/config/TechRebornConfig.java +++ b/src/main/java/techreborn/config/TechRebornConfig.java @@ -166,17 +166,17 @@ public class TechRebornConfig { @Config(config = "items", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools") public static boolean enableGemArmorAndTools = true; - @Config(config = "items", category = "power", key = "nanoSaberCharge", comment = "Energy Capacity for Nano Saber (FE)") - public static int nanosaberCharge = 4_000_000; + @Config(config = "items", category = "power", key = "nanoSaberCharge", comment = "Energy Capacity for Nano Saber") + public static int nanosaberCharge = 1_000_000; - @Config(config = "items", category = "power", key = "nanoSaberCost", comment = "Energy Cost for Nano Saber (FE)") - public static int nanosaberCost = 250; + @Config(config = "items", category = "power", key = "nanoSaberCost", comment = "Energy Cost for Nano Saber") + public static int nanosaberCost = 150; - @Config(config = "items", category = "power", key = "electricTreetapCharge", comment = "Energy Capacity for Electric Treetap (FE)") + @Config(config = "items", category = "power", key = "electricTreetapCharge", comment = "Energy Capacity for Electric Treetap") public static int electricTreetapCharge = 10_000; - @Config(config = "items", category = "power", key = "electricTreetapCost", comment = "Energy Cost for Electric Treetap (FE)") - public static int electricTreetapCost = 20; + @Config(config = "items", category = "power", key = "electricTreetapCost", comment = "Energy Cost for Electric Treetap") + public static int electricTreetapCost = 50; @Config(config = "items", category = "power", key = "basicDrillCharge", comment = "Energy Capacity for Basic Drill") public static int basicDrillCharge = 10_000; @@ -196,49 +196,49 @@ public class TechRebornConfig { @Config(config = "items", category = "power", key = "industrialDrillCost", comment = "Energy Cost for Industrial Drill") public static int industrialDrillCost = 150; - @Config(config = "items", category = "power", key = "basicChainsawCharge", comment = "Energy Capacity for Basic Chainsaw (FE)") - public static int basicChainsawCharge = 40_000; + @Config(config = "items", category = "power", key = "basicChainsawCharge", comment = "Energy Capacity for Basic Chainsaw") + public static int basicChainsawCharge = 10_000; - @Config(config = "items", category = "power", key = "basicChainsawCost", comment = "Energy Cost for Basic Chainsaw (FE)") + @Config(config = "items", category = "power", key = "basicChainsawCost", comment = "Energy Cost for Basic Chainsaw") public static int basicChainsawCost = 50; - @Config(config = "items", category = "power", key = "advancedChainsawCharge", comment = "Energy Capacity for Advanced Chainsaw (FE)") - public static int advancedChainsawCharge = 400_000; + @Config(config = "items", category = "power", key = "advancedChainsawCharge", comment = "Energy Capacity for Advanced Chainsaw") + public static int advancedChainsawCharge = 100_000; - @Config(config = "items", category = "power", key = "advancedChainsawCost", comment = "Energy Cost for Advanced Chainsaw (FE)") + @Config(config = "items", category = "power", key = "advancedChainsawCost", comment = "Energy Cost for Advanced Chainsaw") public static int advancedChainsawCost = 100; - @Config(config = "items", category = "power", key = "industrialChainsawCharge", comment = "Energy Capacity for Industrial Chainsaw (FE)") - public static int industrialChainsawCharge = 4_000_000; + @Config(config = "items", category = "power", key = "industrialChainsawCharge", comment = "Energy Capacity for Industrial Chainsaw") + public static int industrialChainsawCharge = 1_000_000; - @Config(config = "items", category = "power", key = "industrialChainsawCost", comment = "Energy Cost for Industrial Chainsaw (FE)") - public static int industrialChainsawCost = 250; + @Config(config = "items", category = "power", key = "industrialChainsawCost", comment = "Energy Cost for Industrial Chainsaw") + public static int industrialChainsawCost = 150; - @Config(config = "items", category = "power", key = "basicJackhammerCharge", comment = "Energy Capacity for Basic Jackhammer (FE)") - public static int basicJackhammerCharge = 40_000; + @Config(config = "items", category = "power", key = "basicJackhammerCharge", comment = "Energy Capacity for Basic Jackhammer") + public static int basicJackhammerCharge = 10_000; - @Config(config = "items", category = "power", key = "basicJackhammerCost", comment = "Energy Cost for Basic Jackhammer (FE)") + @Config(config = "items", category = "power", key = "basicJackhammerCost", comment = "Energy Cost for Basic Jackhammer") public static int basicJackhammerCost = 50; - @Config(config = "items", category = "power", key = "advancedJackhammerCharge", comment = "Energy Capacity for Advanced Jackhammer (FE)") - public static int advancedJackhammerCharge = 400_000; + @Config(config = "items", category = "power", key = "advancedJackhammerCharge", comment = "Energy Capacity for Advanced Jackhammer") + public static int advancedJackhammerCharge = 100_000; - @Config(config = "items", category = "power", key = "advancedJackhammerCost", comment = "Energy Cost for Advanced Jackhammer (FE)") + @Config(config = "items", category = "power", key = "advancedJackhammerCost", comment = "Energy Cost for Advanced Jackhammer") public static int advancedJackhammerCost = 100; - @Config(config = "items", category = "power", key = "industrialJackhammerCharge", comment = "Energy Capacity for Industrial Jackhammer (FE)") - public static int industrialJackhammerCharge = 4_000_000; + @Config(config = "items", category = "power", key = "industrialJackhammerCharge", comment = "Energy Capacity for Industrial Jackhammer") + public static int industrialJackhammerCharge = 1_000_000; - @Config(config = "items", category = "power", key = "industrialJackhammerCost", comment = "Energy Cost for Industrial Jackhammer (FE)") - public static int industrialJackhammerCost = 250; + @Config(config = "items", category = "power", key = "industrialJackhammerCost", comment = "Energy Cost for Industrial Jackhammer") + public static int industrialJackhammerCost = 150; - @Config(config = "items", category = "power", key = "omniToolCharge", comment = "Energy Capacity for Omni Tool (FE)") - public static int omniToolCharge = 4_000_000; + @Config(config = "items", category = "power", key = "omniToolCharge", comment = "Energy Capacity for Omni Tool") + public static int omniToolCharge = 1_000_000; - @Config(config = "items", category = "power", key = "omniToolCost", comment = "Energy Cost for Omni Tool (FE)") + @Config(config = "items", category = "power", key = "omniToolCost", comment = "Energy Cost for Omni Tool") public static int omniToolCost = 100; - @Config(config = "items", category = "power", key = "omniToolHitCost", comment = "Hit Energy Cost for Omni Tool (FE)") + @Config(config = "items", category = "power", key = "omniToolHitCost", comment = "Hit Energy Cost for Omni Tool") public static int omniToolHitCost = 125; @Config(config = "items", category = "power", key = "rockCutterCharge", comment = "Energy Capacity for Rock Cutter (FE)") diff --git a/src/main/java/techreborn/items/tool/DrillItem.java b/src/main/java/techreborn/items/tool/DrillItem.java index d4a47e2c9..ea4420cd4 100644 --- a/src/main/java/techreborn/items/tool/DrillItem.java +++ b/src/main/java/techreborn/items/tool/DrillItem.java @@ -25,9 +25,13 @@ package techreborn.items.tool; import net.minecraft.block.BlockState; +import net.minecraft.enchantment.EnchantmentHelper; +import net.minecraft.enchantment.Enchantments; import net.minecraft.entity.LivingEntity; import net.minecraft.item.*; import net.minecraft.util.DefaultedList; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; import reborncore.common.powerSystem.PowerSystem; import reborncore.common.util.ItemDurabilityExtensions; import reborncore.common.util.ItemUtils; @@ -38,6 +42,8 @@ import team.reborn.energy.EnergyTier; import techreborn.TechReborn; import techreborn.utils.InitUtils; +import java.util.Random; + public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabilityExtensions { public final int maxCharge; @@ -76,6 +82,15 @@ public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabili return true; } + @Override + public boolean postMine(ItemStack stack, World worldIn, BlockState blockIn, BlockPos pos, LivingEntity entityLiving) { + Random rand = new Random(); + if (rand.nextInt(EnchantmentHelper.getLevel(Enchantments.UNBREAKING, stack) + 1) == 0) { + Energy.of(stack).use(cost); + } + return true; + } + // ToolItem @Override public boolean canRepair(ItemStack itemStack_1, ItemStack itemStack_2) { diff --git a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java index 126bcafa5..12d04bd59 100644 --- a/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java +++ b/src/main/java/techreborn/items/tool/industrial/NanosaberItem.java @@ -59,7 +59,7 @@ public class NanosaberItem extends SwordItem implements EnergyHolder, ItemDurabi public static final int maxCharge = TechRebornConfig.nanosaberCharge; public int cost = TechRebornConfig.nanosaberCost; - // 4M FE max charge with 1k charge rate + // 4ME max charge with 1k charge rate public NanosaberItem() { super(ToolMaterials.DIAMOND, 1, 1, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1)); this.addPropertyGetter(new Identifier("techreborn:active"), (stack, worldIn, entityIn) -> { diff --git a/src/main/resources/data/techreborn/recipes/crafting_table/parts/energy_crystal.json b/src/main/resources/data/techreborn/recipes/crafting_table/battery/energy_crystal.json similarity index 93% rename from src/main/resources/data/techreborn/recipes/crafting_table/parts/energy_crystal.json rename to src/main/resources/data/techreborn/recipes/crafting_table/battery/energy_crystal.json index 8a29f3c34..55cf1e2ff 100644 --- a/src/main/resources/data/techreborn/recipes/crafting_table/parts/energy_crystal.json +++ b/src/main/resources/data/techreborn/recipes/crafting_table/battery/energy_crystal.json @@ -1,19 +1,19 @@ -{ - "type": "minecraft:crafting_shaped", - "pattern": [ - "RRR", - "RDR", - "RRR" - ], - "key": { - "R": { - "item": "minecraft:redstone" - }, - "D": { - "item": "minecraft:diamond" - } - }, - "result": { - "item": "techreborn:energy_crystal" - } +{ + "type": "minecraft:crafting_shaped", + "pattern": [ + "RRR", + "RDR", + "RRR" + ], + "key": { + "R": { + "item": "minecraft:redstone" + }, + "D": { + "item": "minecraft:diamond" + } + }, + "result": { + "item": "techreborn:energy_crystal" + } } \ No newline at end of file diff --git a/src/main/resources/data/techreborn/recipes/grinder/glowstone_dust.json b/src/main/resources/data/techreborn/recipes/grinder/glowstone_dust.json index df8f327a3..ea85d2095 100644 --- a/src/main/resources/data/techreborn/recipes/grinder/glowstone_dust.json +++ b/src/main/resources/data/techreborn/recipes/grinder/glowstone_dust.json @@ -10,7 +10,7 @@ "results" : [ { "item": "minecraft:glowstone_dust", - "count": 5 + "count": 4 } ] } \ No newline at end of file