Fix warnings for subitemtype instead of supressing it

This commit is contained in:
drcrazy 2017-10-08 01:59:28 +03:00
parent ca829c18cc
commit 350d3589c9
22 changed files with 23 additions and 53 deletions

View file

@ -86,10 +86,9 @@ public class ItemLapotronPack extends ItemArmor implements IEnergyItemInfo, IEne
return transferLimit;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
public void getSubItems(Item item,
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -113,11 +113,9 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo, IE
return transferLimit;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -58,11 +58,7 @@ public class ItemBattery extends ItemTR implements IEnergyItemInfo, IEnergyInter
this.maxTransfer = maxTransfer;
this.addPropertyOverride(new ResourceLocation("techreborn:empty"), new IItemPropertyGetter() {
@SideOnly(Side.CLIENT)
public float apply(ItemStack stack,
@Nullable
World worldIn,
@Nullable
EntityLivingBase entityIn) {
public float apply(ItemStack stack, @Nullable World worldIn, @Nullable EntityLivingBase entityIn) {
if (!stack.isEmpty() && PoweredItem.getEnergy(stack) == 0.0) {
return 1.0F;
}

View file

@ -38,10 +38,9 @@ public class ItemEnergyCrystal extends ItemBattery {
super("energyCrystal", 100000, 512);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -38,11 +38,10 @@ public class ItemLapotronCrystal extends ItemBattery {
super("lapotronCrystal", 10000000, 2048);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -39,11 +39,10 @@ public class ItemLapotronicOrb extends ItemBattery {
super("lapotronicorb", ConfigTechReborn.LapotronicOrbMaxCharge, 10000);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -38,11 +38,10 @@ public class ItemLithiumBattery extends ItemBattery {
super("lithiumBattery", 100000, 512);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -38,11 +38,10 @@ public class ItemReBattery extends ItemBattery {
super("rebattery", 10000, 64);
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -54,11 +54,9 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
this.cost = 250;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}
@ -85,7 +83,6 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
@Override
public float getStrVsBlock(ItemStack stack, IBlockState state) {
float speed = super.getStrVsBlock(stack, state);
return super.getStrVsBlock(stack, state);
}
@ -95,6 +92,7 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
}
@SuppressWarnings("deprecation")
public void breakBlock(BlockPos pos, ItemStack stack, World world, EntityLivingBase entityLiving, BlockPos oldPos) {
if (oldPos == pos) {
return;

View file

@ -55,10 +55,9 @@ public class ItemAdvancedDrill extends ItemDrill {
this.cost = 250;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -41,11 +41,10 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
this.efficiencyOnProperMaterial = 60F;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -109,11 +109,9 @@ public class ItemCloakingDevice extends ItemTR implements IEnergyItemInfo, IEner
return itemStack;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -43,11 +43,9 @@ public class ItemDiamondChainsaw extends ItemChainsaw {
this.cost = 250;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -43,11 +43,9 @@ public class ItemDiamondDrill extends ItemDrill {
this.cost = 250;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -41,10 +41,9 @@ public class ItemDiamondJackhammer extends ItemJackhammer {
this.efficiencyOnProperMaterial = 16F;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -99,10 +99,9 @@ public class ItemElectricTreetap extends ItemTR implements IEnergyItemInfo, IEne
return 200;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -113,11 +113,10 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo, IEnergy
}
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -140,11 +140,10 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo, IEnerg
return 200;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -136,11 +136,10 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo, IEne
return 200;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -43,11 +43,10 @@ public class ItemSteelChainsaw extends ItemChainsaw {
this.cost = 50;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -43,11 +43,10 @@ public class ItemSteelDrill extends ItemDrill {
this.cost = 50;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}

View file

@ -41,11 +41,10 @@ public class ItemSteelJackhammer extends ItemJackhammer {
this.efficiencyOnProperMaterial = 12F;
}
@SuppressWarnings({ "rawtypes", "unchecked" })
@SideOnly(Side.CLIENT)
@Override
public void getSubItems(
CreativeTabs par2CreativeTabs, NonNullList itemList) {
CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
if (!isInCreativeTab(par2CreativeTabs)) {
return;
}