Update deps and mappings.

This commit is contained in:
modmuss50 2022-05-21 19:00:33 +01:00
parent b0ddb4cc95
commit 0ba85b37cc
22 changed files with 108 additions and 110 deletions

View file

@ -38,7 +38,7 @@ import reborncore.common.util.ItemUtils;
import techreborn.TechReborn;
import techreborn.utils.InitUtils;
import java.util.Random;
import net.minecraft.util.math.random.Random;
public class ChainsawItem extends AxeItem implements RcEnergyItem {
@ -72,8 +72,7 @@ public class ChainsawItem extends AxeItem implements RcEnergyItem {
// MiningToolItem
@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) {
if (worldIn.getRandom().nextInt(EnchantmentHelper.getLevel(Enchantments.UNBREAKING, stack) + 1) == 0) {
tryUseEnergy(stack, cost);
}
return true;

View file

@ -40,7 +40,7 @@ import techreborn.TechReborn;
import techreborn.utils.InitUtils;
import techreborn.utils.ToolsUtil;
import java.util.Random;
import net.minecraft.util.math.random.Random;
public class JackhammerItem extends PickaxeItem implements RcEnergyItem {
public final int maxCharge;
@ -85,8 +85,7 @@ public class JackhammerItem extends PickaxeItem implements RcEnergyItem {
// MiningToolItem
@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) {
if (worldIn.getRandom().nextInt(EnchantmentHelper.getLevel(Enchantments.UNBREAKING, stack) + 1) == 0) {
tryUseEnergy(stack, cost);
}
return true;

View file

@ -41,7 +41,7 @@ import techreborn.config.TechRebornConfig;
import techreborn.init.TRContent;
import techreborn.init.TRToolMaterials;
import java.util.Random;
import net.minecraft.util.math.random.Random;
public class RockCutterItem extends PickaxeItem implements RcEnergyItem {
@ -72,8 +72,7 @@ public class RockCutterItem extends PickaxeItem implements RcEnergyItem {
// MiningToolItem
@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) {
if (worldIn.getRandom().nextInt(EnchantmentHelper.getLevel(Enchantments.UNBREAKING, stack) + 1) == 0) {
tryUseEnergy(stack, cost);
}
return true;