Merge remote-tracking branch 'origin/1.15' into 1.15

This commit is contained in:
modmuss50 2020-01-26 18:18:04 +00:00
commit adf5c7aba2
5 changed files with 66 additions and 51 deletions

View file

@ -166,17 +166,17 @@ public class TechRebornConfig {
@Config(config = "items", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools") @Config(config = "items", category = "general", key = "enableGemTools", comment = "Enable Gem armor and tools")
public static boolean enableGemArmorAndTools = true; public static boolean enableGemArmorAndTools = true;
@Config(config = "items", category = "power", key = "nanoSaberCharge", comment = "Energy Capacity for Nano Saber (FE)") @Config(config = "items", category = "power", key = "nanoSaberCharge", comment = "Energy Capacity for Nano Saber")
public static int nanosaberCharge = 4_000_000; public static int nanosaberCharge = 1_000_000;
@Config(config = "items", category = "power", key = "nanoSaberCost", comment = "Energy Cost for Nano Saber (FE)") @Config(config = "items", category = "power", key = "nanoSaberCost", comment = "Energy Cost for Nano Saber")
public static int nanosaberCost = 250; 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; public static int electricTreetapCharge = 10_000;
@Config(config = "items", category = "power", key = "electricTreetapCost", comment = "Energy Cost for Electric Treetap (FE)") @Config(config = "items", category = "power", key = "electricTreetapCost", comment = "Energy Cost for Electric Treetap")
public static int electricTreetapCost = 20; public static int electricTreetapCost = 50;
@Config(config = "items", category = "power", key = "basicDrillCharge", comment = "Energy Capacity for Basic Drill") @Config(config = "items", category = "power", key = "basicDrillCharge", comment = "Energy Capacity for Basic Drill")
public static int basicDrillCharge = 10_000; 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") @Config(config = "items", category = "power", key = "industrialDrillCost", comment = "Energy Cost for Industrial Drill")
public static int industrialDrillCost = 150; public static int industrialDrillCost = 150;
@Config(config = "items", category = "power", key = "basicChainsawCharge", comment = "Energy Capacity for Basic Chainsaw (FE)") @Config(config = "items", category = "power", key = "basicChainsawCharge", comment = "Energy Capacity for Basic Chainsaw")
public static int basicChainsawCharge = 40_000; 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; public static int basicChainsawCost = 50;
@Config(config = "items", category = "power", key = "advancedChainsawCharge", comment = "Energy Capacity for Advanced Chainsaw (FE)") @Config(config = "items", category = "power", key = "advancedChainsawCharge", comment = "Energy Capacity for Advanced Chainsaw")
public static int advancedChainsawCharge = 400_000; 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; public static int advancedChainsawCost = 100;
@Config(config = "items", category = "power", key = "industrialChainsawCharge", comment = "Energy Capacity for Industrial Chainsaw (FE)") @Config(config = "items", category = "power", key = "industrialChainsawCharge", comment = "Energy Capacity for Industrial Chainsaw")
public static int industrialChainsawCharge = 4_000_000; public static int industrialChainsawCharge = 1_000_000;
@Config(config = "items", category = "power", key = "industrialChainsawCost", comment = "Energy Cost for Industrial Chainsaw (FE)") @Config(config = "items", category = "power", key = "industrialChainsawCost", comment = "Energy Cost for Industrial Chainsaw")
public static int industrialChainsawCost = 250; public static int industrialChainsawCost = 150;
@Config(config = "items", category = "power", key = "basicJackhammerCharge", comment = "Energy Capacity for Basic Jackhammer (FE)") @Config(config = "items", category = "power", key = "basicJackhammerCharge", comment = "Energy Capacity for Basic Jackhammer")
public static int basicJackhammerCharge = 40_000; 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; public static int basicJackhammerCost = 50;
@Config(config = "items", category = "power", key = "advancedJackhammerCharge", comment = "Energy Capacity for Advanced Jackhammer (FE)") @Config(config = "items", category = "power", key = "advancedJackhammerCharge", comment = "Energy Capacity for Advanced Jackhammer")
public static int advancedJackhammerCharge = 400_000; 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; public static int advancedJackhammerCost = 100;
@Config(config = "items", category = "power", key = "industrialJackhammerCharge", comment = "Energy Capacity for Industrial Jackhammer (FE)") @Config(config = "items", category = "power", key = "industrialJackhammerCharge", comment = "Energy Capacity for Industrial Jackhammer")
public static int industrialJackhammerCharge = 4_000_000; public static int industrialJackhammerCharge = 1_000_000;
@Config(config = "items", category = "power", key = "industrialJackhammerCost", comment = "Energy Cost for Industrial Jackhammer (FE)") @Config(config = "items", category = "power", key = "industrialJackhammerCost", comment = "Energy Cost for Industrial Jackhammer")
public static int industrialJackhammerCost = 250; public static int industrialJackhammerCost = 150;
@Config(config = "items", category = "power", key = "omniToolCharge", comment = "Energy Capacity for Omni Tool (FE)") @Config(config = "items", category = "power", key = "omniToolCharge", comment = "Energy Capacity for Omni Tool")
public static int omniToolCharge = 4_000_000; 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; 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; public static int omniToolHitCost = 125;
@Config(config = "items", category = "power", key = "rockCutterCharge", comment = "Energy Capacity for Rock Cutter (FE)") @Config(config = "items", category = "power", key = "rockCutterCharge", comment = "Energy Capacity for Rock Cutter (FE)")

View file

@ -25,9 +25,13 @@
package techreborn.items.tool; package techreborn.items.tool;
import net.minecraft.block.BlockState; import net.minecraft.block.BlockState;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.enchantment.Enchantments;
import net.minecraft.entity.LivingEntity; import net.minecraft.entity.LivingEntity;
import net.minecraft.item.*; import net.minecraft.item.*;
import net.minecraft.util.DefaultedList; import net.minecraft.util.DefaultedList;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import reborncore.common.powerSystem.PowerSystem; import reborncore.common.powerSystem.PowerSystem;
import reborncore.common.util.ItemDurabilityExtensions; import reborncore.common.util.ItemDurabilityExtensions;
import reborncore.common.util.ItemUtils; import reborncore.common.util.ItemUtils;
@ -38,6 +42,8 @@ import team.reborn.energy.EnergyTier;
import techreborn.TechReborn; import techreborn.TechReborn;
import techreborn.utils.InitUtils; import techreborn.utils.InitUtils;
import java.util.Random;
public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabilityExtensions { public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabilityExtensions {
public final int maxCharge; public final int maxCharge;
@ -76,6 +82,15 @@ public class DrillItem extends PickaxeItem implements EnergyHolder, ItemDurabili
return true; 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 // ToolItem
@Override @Override
public boolean canRepair(ItemStack itemStack_1, ItemStack itemStack_2) { public boolean canRepair(ItemStack itemStack_1, ItemStack itemStack_2) {

View file

@ -59,7 +59,7 @@ public class NanosaberItem extends SwordItem implements EnergyHolder, ItemDurabi
public static final int maxCharge = TechRebornConfig.nanosaberCharge; public static final int maxCharge = TechRebornConfig.nanosaberCharge;
public int cost = TechRebornConfig.nanosaberCost; public int cost = TechRebornConfig.nanosaberCost;
// 4M FE max charge with 1k charge rate // 4ME max charge with 1k charge rate
public NanosaberItem() { public NanosaberItem() {
super(ToolMaterials.DIAMOND, 1, 1, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1)); super(ToolMaterials.DIAMOND, 1, 1, new Item.Settings().group(TechReborn.ITEMGROUP).maxCount(1).maxDamage(-1));
this.addPropertyGetter(new Identifier("techreborn:active"), (stack, worldIn, entityIn) -> { this.addPropertyGetter(new Identifier("techreborn:active"), (stack, worldIn, entityIn) -> {

View file

@ -1,19 +1,19 @@
{ {
"type": "minecraft:crafting_shaped", "type": "minecraft:crafting_shaped",
"pattern": [ "pattern": [
"RRR", "RRR",
"RDR", "RDR",
"RRR" "RRR"
], ],
"key": { "key": {
"R": { "R": {
"item": "minecraft:redstone" "item": "minecraft:redstone"
}, },
"D": { "D": {
"item": "minecraft:diamond" "item": "minecraft:diamond"
} }
}, },
"result": { "result": {
"item": "techreborn:energy_crystal" "item": "techreborn:energy_crystal"
} }
} }

View file

@ -10,7 +10,7 @@
"results" : [ "results" : [
{ {
"item": "minecraft:glowstone_dust", "item": "minecraft:glowstone_dust",
"count": 5 "count": 4
} }
] ]
} }