Merge branch '1.12' of https://github.com/TechReborn/TechReborn.git into feature/solar-panles

This commit is contained in:
drcrazy 2017-11-29 17:13:36 +03:00
commit f6fca1c623
13 changed files with 29 additions and 23 deletions

View file

@ -88,7 +88,7 @@ if (ENV.BUILD_NUMBER) {
minecraft {
version = "1.12.2-14.23.0.2552"
mappings = "snapshot_20170624"
mappings = "snapshot_20171003"
replace "@MODVERSION@", project.version
useDepAts = true
runDir = "run"

View file

@ -82,8 +82,8 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
}
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
return super.getStrVsBlock(stack, state);
public float getDestroySpeed(ItemStack stack, IBlockState state) {
return super.getDestroySpeed(stack, state);
}
@Override

View file

@ -38,7 +38,7 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
public ItemAdvancedJackhammer() {
super(ToolMaterial.IRON, "techreborn.advancedJackhammer", ConfigTechReborn.AdvancedJackhammerCharge);
this.cost = 250;
this.efficiencyOnProperMaterial = 60F;
this.efficiency = 60F;
}
@SideOnly(Side.CLIENT)

View file

@ -60,7 +60,7 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo, IEnergyInt
public ItemChainsaw(ToolMaterial material, String unlocalizedName, int energyCapacity,
float unpoweredSpeed) {
super(material);
efficiencyOnProperMaterial = 20F;
efficiency = 20F;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);

View file

@ -38,7 +38,7 @@ public class ItemDiamondJackhammer extends ItemJackhammer {
public ItemDiamondJackhammer() {
super(ToolMaterial.DIAMOND, "techreborn.diamondJackhammer", ConfigTechReborn.DiamondJackhammerCharge);
this.cost = 100;
this.efficiencyOnProperMaterial = 16F;
this.efficiency = 16F;
}
@SideOnly(Side.CLIENT)

View file

@ -54,7 +54,7 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo, IEnergyIn
public ItemDrill(ToolMaterial material, String unlocalizedName, int energyCapacity, float unpoweredSpeed, float efficiencyOnProperMaterial) {
super(material);
this.efficiencyOnProperMaterial = efficiencyOnProperMaterial;
this.efficiency = efficiencyOnProperMaterial;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setUnlocalizedName(unlocalizedName);
@ -73,15 +73,15 @@ public class ItemDrill extends ItemPickaxe implements IEnergyItemInfo, IEnergyIn
}
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
public float getDestroySpeed(ItemStack stack, IBlockState state) {
if (!PoweredItem.canUseEnergy(cost, stack)) {
return unpoweredSpeed;
}
if (Items.WOODEN_PICKAXE.getStrVsBlock(stack, state) > 1.0F
|| Items.WOODEN_SHOVEL.getStrVsBlock(stack, state) > 1.0F) {
return efficiencyOnProperMaterial;
if (Items.WOODEN_PICKAXE.getDestroySpeed(stack, state) > 1.0F
|| Items.WOODEN_SHOVEL.getDestroySpeed(stack, state) > 1.0F) {
return efficiency;
} else {
return super.getStrVsBlock(stack, state);
return super.getDestroySpeed(stack, state);
}
}

View file

@ -59,7 +59,7 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo, IEne
public ItemJackhammer(ToolMaterial material, String unlocalizedName, int energyCapacity) {
super(material);
efficiencyOnProperMaterial = 20F;
efficiency = 20F;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setMaxDamage(240);
@ -84,9 +84,9 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo, IEne
}
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
public float getDestroySpeed(ItemStack stack, IBlockState state) {
if ((OreDictUtils.isOre(state, "stone") || state.getBlock() == Blocks.STONE) && PoweredItem.canUseEnergy(cost, stack)) {
return efficiencyOnProperMaterial;
return efficiency;
} else {
return 0.5F;
}

View file

@ -61,7 +61,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo, IEnerg
public ItemOmniTool() {
super(ToolMaterial.DIAMOND);
efficiencyOnProperMaterial = 13F;
efficiency = 13F;
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setMaxDamage(200);

View file

@ -63,7 +63,7 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, IEne
setUnlocalizedName("techreborn.rockcutter");
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
efficiencyOnProperMaterial = 16F;
efficiency = 16F;
}
@Override
@ -98,11 +98,11 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, IEne
}
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
public float getDestroySpeed(ItemStack stack, IBlockState state) {
if (!PoweredItem.canUseEnergy(cost, stack)) {
return 2F;
} else {
return Items.DIAMOND_PICKAXE.getStrVsBlock(stack, state);
return Items.DIAMOND_PICKAXE.getDestroySpeed(stack, state);
}
}

View file

@ -38,7 +38,7 @@ public class ItemSteelJackhammer extends ItemJackhammer {
public ItemSteelJackhammer() {
super(ToolMaterial.DIAMOND, "techreborn.steelJackhammer", ConfigTechReborn.SteelJackhammerCharge);
this.cost = 50;
this.efficiencyOnProperMaterial = 12F;
this.efficiency = 12F;
}
@SideOnly(Side.CLIENT)

View file

@ -30,7 +30,7 @@ import techreborn.events.TRRecipeHandler;
public class ItemTRAxe extends ItemAxe {
public ItemTRAxe(ToolMaterial material) {
super(material, material.getDamageVsEntity() + 5.75F, (material.getDamageVsEntity() + 6.75F) * -0.344444F);
super(material, material.getAttackDamage() + 5.75F, (material.getAttackDamage() + 6.75F) * -0.344444F);
setUnlocalizedName(material.name().toLowerCase() + "Axe");
setCreativeTab(TechRebornCreativeTabMisc.instance);
TRRecipeHandler.hideEntry(this);

View file

@ -24,6 +24,8 @@
package techreborn.tiles.multiblock;
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@ -34,6 +36,7 @@ import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.FluidStack;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import reborncore.api.recipe.IRecipeCrafterProvider;
import reborncore.api.tile.IInventoryProvider;
@ -97,7 +100,7 @@ public class TileIndustrialGrinder extends TilePowerAcceptor implements IToolDro
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING,
new BlockPos(0, 1, 0));
final IBlockState centerBlock = this.multiblockChecker.getBlock(0, 1, 0);
final boolean center = centerBlock.getBlock() == Blocks.WATER;
final boolean center = ((centerBlock.getBlock() instanceof BlockLiquid || centerBlock.getBlock() instanceof IFluidBlock) && centerBlock.getBlock().getMaterial(centerBlock) == Material.WATER);
return down && center && blade && up;
}

View file

@ -24,6 +24,8 @@
package techreborn.tiles.multiblock;
import net.minecraft.block.BlockLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
@ -33,6 +35,7 @@ import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.fluids.IFluidBlock;
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
import reborncore.api.recipe.IBaseRecipeType;
import reborncore.api.recipe.RecipeHandler;
@ -162,7 +165,7 @@ public class TileIndustrialSawmill extends TilePowerAcceptor
final boolean blade = this.multiblockChecker.checkRingY(1, 1, MultiblockChecker.REINFORCED_CASING,
new BlockPos(0, 1, 0));
final IBlockState centerBlock = this.multiblockChecker.getBlock(0, 1, 0);
final boolean center = centerBlock.getBlock() == Blocks.WATER;
final boolean center = ((centerBlock.getBlock() instanceof BlockLiquid || centerBlock.getBlock() instanceof IFluidBlock) && centerBlock.getBlock().getMaterial(centerBlock) == Material.WATER);
return down && center && blade && up;
}