87 errors, will finish later

This commit is contained in:
modmuss50 2016-03-13 17:38:12 +00:00
parent 7a121be651
commit cc0b762b56
19 changed files with 62 additions and 61 deletions

View file

@ -1,6 +1,7 @@
package techreborn.items.tools;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import techreborn.config.ConfigTechReborn;
@ -8,13 +9,13 @@ import techreborn.config.ConfigTechReborn;
public class ItemAdvancedChainsaw extends ItemChainsaw {
public ItemAdvancedChainsaw() {
super(ToolMaterial.EMERALD, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge, ConfigTechReborn.AdvancedDrillTier, 4.0F);
super(ToolMaterial.DIAMOND, "techreborn.advancedChainsaw", ConfigTechReborn.AdvancedChainsawCharge, ConfigTechReborn.AdvancedDrillTier, 4.0F);
this.cost = 250;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_axe.canHarvestBlock(block, stack);
public boolean canHarvestBlock(IBlockState blockIn) {
return Items.diamond_axe.canHarvestBlock(blockIn);
}
@Override

View file

@ -1,6 +1,7 @@
package techreborn.items.tools;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import techreborn.config.ConfigTechReborn;
@ -8,13 +9,13 @@ import techreborn.config.ConfigTechReborn;
public class ItemAdvancedDrill extends ItemDrill {
public ItemAdvancedDrill() {
super(ToolMaterial.EMERALD, "techreborn.advancedDrill", ConfigTechReborn.AdvancedDrillCharge, ConfigTechReborn.AdvancedDrillTier, 4.0F);
super(ToolMaterial.DIAMOND, "techreborn.advancedDrill", ConfigTechReborn.AdvancedDrillCharge, ConfigTechReborn.AdvancedDrillTier, 4.0F);
this.cost = 250;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_pickaxe.canHarvestBlock(block, stack) || Items.diamond_shovel.canHarvestBlock(block, stack);
public boolean canHarvestBlock(IBlockState blockIn) {
return Items.diamond_pickaxe.canHarvestBlock(blockIn) || Items.diamond_shovel.canHarvestBlock(blockIn);
}
@Override

View file

@ -12,6 +12,8 @@ import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.World;
@ -80,8 +82,8 @@ public class ItemChainsaw extends ItemAxe implements IEnergyItemInfo, ITexturedI
}
@Override
public boolean onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumFacing side, float hitX, float hitY, float hitZ) {
return TorchHelper.placeTorch(stack, playerIn, worldIn, pos, side, hitX, hitY, hitZ);
public EnumActionResult onItemUse(ItemStack stack, EntityPlayer playerIn, World worldIn, BlockPos pos, EnumHand hand, EnumFacing facing, float hitX, float hitY, float hitZ) {
return TorchHelper.placeTorch(stack, playerIn, worldIn, pos, facing, hitX, hitY, hitZ, hand);
}
@Override

View file

@ -1,6 +1,7 @@
package techreborn.items.tools;
import net.minecraft.block.Block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import techreborn.config.ConfigTechReborn;
@ -8,13 +9,13 @@ import techreborn.config.ConfigTechReborn;
public class ItemDiamondChainsaw extends ItemChainsaw {
public ItemDiamondChainsaw() {
super(ToolMaterial.EMERALD, "techreborn.diamondChainsaw", ConfigTechReborn.DiamondChainsawCharge, ConfigTechReborn.DiamondChainsawTier, 2.5F);
super(ToolMaterial.DIAMOND, "techreborn.diamondChainsaw", ConfigTechReborn.DiamondChainsawCharge, ConfigTechReborn.DiamondChainsawTier, 2.5F);
this.cost = 250;
}
@Override
public boolean canHarvestBlock(Block block, ItemStack stack) {
return Items.diamond_axe.canHarvestBlock(block, stack);
public boolean canHarvestBlock(IBlockState blockIn) {
return Items.diamond_axe.canHarvestBlock(blockIn);
}
@Override

View file

@ -7,6 +7,9 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@ -27,7 +30,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, ITextur
public double transferLimit = 100;
public ItemNanosaber() {
super(ToolMaterial.EMERALD);
super(ToolMaterial.DIAMOND);
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);
setMaxDamage(240);
@ -44,15 +47,15 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, ITextur
}
@Override
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
public ActionResult<ItemStack> onItemRightClick(ItemStack stack, World worldIn, EntityPlayer player, EnumHand hand) {
if(player.isSneaking())
{
changeMode(stack);
}
return stack;
return new ActionResult<>(EnumActionResult.FAIL, stack);
}
public void changeMode(ItemStack stack)
public void changeMode(ItemStack stack)
{
if (!ItemNBTHelper.verifyExistance(stack, "isActive"))
{

View file

@ -28,7 +28,7 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, ITex
public static final int tier = ConfigTechReborn.RockCutterTier;
public ItemRockCutter() {
super(Item.ToolMaterial.EMERALD);
super(ToolMaterial.DIAMOND);
setUnlocalizedName("techreborn.rockcutter");
setCreativeTab(TechRebornCreativeTab.instance);
setMaxStackSize(1);

View file

@ -5,7 +5,7 @@ import techreborn.config.ConfigTechReborn;
public class ItemSteelJackhammer extends ItemJackhammer {
public ItemSteelJackhammer() {
super(ToolMaterial.EMERALD, "techreborn.steelJackhammer", ConfigTechReborn.SteelJackhammerCharge, ConfigTechReborn.SteelJackhammerTier);
super(ToolMaterial.DIAMOND, "techreborn.steelJackhammer", ConfigTechReborn.SteelJackhammerCharge, ConfigTechReborn.SteelJackhammerTier);
this.cost = 100;
this.efficiencyOnProperMaterial = 16F;
}

View file

@ -3,6 +3,9 @@ package techreborn.items.tools;
import me.modmuss50.jsonDestroyer.api.ITexturedItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
import techreborn.Core;
import techreborn.client.GuiHandler;
@ -19,10 +22,10 @@ public class ItemTechManual extends ItemTR implements ITexturedItem {
@Override
public ItemStack onItemRightClick(ItemStack itemStack, World world, EntityPlayer player) {
public ActionResult<ItemStack> onItemRightClick(ItemStack itemStackIn, World world, EntityPlayer player, EnumHand hand) {
player.openGui(Core.INSTANCE, GuiHandler.manuelID, world,
(int) player.posX, (int) player.posY, (int) player.posY);
return itemStack;
return new ActionResult<>(EnumActionResult.SUCCESS, itemStackIn);
}
@Override

View file

@ -18,11 +18,6 @@ public class ItemTreeTap extends Item implements ITexturedItem {
setCreativeTab(TechRebornCreativeTab.instance);
}
@Override
public ItemStack onItemRightClick(ItemStack itemStackIn, World worldIn, EntityPlayer playerIn) {
return super.onItemRightClick(itemStackIn, worldIn, playerIn);
}
@Override
public boolean showDurabilityBar(ItemStack stack) {
if(stack.getMetadata()!=0){

View file

@ -94,7 +94,8 @@ public class ItemWrench extends ItemTR implements ITexturedItem {
world.spawnEntityInWorld(entityItem);
}
}
world.playSoundAtEntity(player, "techreborn:block_dismantle", 0.8F, 1F);
//TODO 1.9 sounds
//world.playSoundAtEntity(player, "techreborn:block_dismantle", 0.8F, 1F);
if(!world.isRemote){
world.setBlockState(pos, Blocks.air.getDefaultState(), 2);
}