1.12
This commit is contained in:
parent
b6cf2a2c59
commit
29cf9fa90b
68 changed files with 220 additions and 222 deletions
|
@ -130,7 +130,7 @@ public class DynamicCell extends Item {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item itemIn, CreativeTabs tab, NonNullList<ItemStack> subItems) {
|
||||
public void getSubItems(CreativeTabs tab, NonNullList<ItemStack> subItems) {
|
||||
subItems.add(getEmptyCell(1));
|
||||
for (Fluid fluid : FluidRegistry.getRegisteredFluids().values()) {
|
||||
subItems.add(getCellWithFluid(fluid));
|
||||
|
|
|
@ -91,10 +91,10 @@ public class ItemDusts extends ItemTRNoDestroy {
|
|||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) {
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -79,10 +79,11 @@ public class ItemIngots extends ItemTRNoDestroy {
|
|||
}
|
||||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,10 +74,10 @@ public class ItemNuggets extends ItemTRNoDestroy {
|
|||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) {
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
if (!types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,10 +98,10 @@ public class ItemParts extends ItemTRNoDestroy {
|
|||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(final Item item, final CreativeTabs creativeTabs, final NonNullList list) {
|
||||
public void getSubItems(final CreativeTabs creativeTabs, final NonNullList list) {
|
||||
for (int meta = 0; meta < ItemParts.types.length; ++meta) {
|
||||
if (!ItemParts.types[meta].equals(ModItems.META_PLACEHOLDER)) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.items;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.Container;
|
||||
|
@ -34,6 +35,7 @@ import net.minecraft.item.ItemStack;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import net.minecraftforge.items.CapabilityItemHandler;
|
||||
|
@ -94,15 +96,15 @@ public class ItemUpgrades extends ItemTRNoDestroy implements IUpgrade {
|
|||
|
||||
// Adds Dusts SubItems To Creative Tab
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs creativeTabs, NonNullList list) {
|
||||
public void getSubItems(CreativeTabs creativeTabs, NonNullList list) {
|
||||
for (int meta = 0; meta < types.length; ++meta) {
|
||||
list.add(new ItemStack(item, 1, meta));
|
||||
list.add(new ItemStack(this, 1, meta));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
super.addInformation(stack, playerIn, tooltip, advanced);
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
super.addInformation(stack, world, tooltip, flag);
|
||||
if(stack.getItemDamage() == 4 || stack.getItemDamage() == 5){
|
||||
tooltip.add("Facing: " + getFacing(stack).getName());
|
||||
String text = Core.proxy.getUpgradeConfigText();
|
||||
|
|
|
@ -106,7 +106,8 @@ public class ItemLithiumBatpack extends ItemArmor implements IEnergyItemInfo {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack uncharged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK);
|
||||
ItemStack charged = new ItemStack(ModItems.LITHIUM_BATTERY_PACK);
|
||||
|
|
|
@ -41,8 +41,8 @@ public class ItemEnergyCrystal extends ItemBattery {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.ENERGY_CRYSTAL);
|
||||
ItemStack uncharged = stack.copy();
|
||||
ItemStack charged = stack.copy();
|
||||
|
|
|
@ -41,7 +41,8 @@ public class ItemLapotronCrystal extends ItemBattery {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_CRYSTAL);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -42,7 +42,8 @@ public class ItemLapotronicOrb extends ItemBattery {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.LAPOTRONIC_ORB);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -41,7 +41,8 @@ public class ItemLithiumBattery extends ItemBattery {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.LITHIUM_BATTERY);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -41,7 +41,8 @@ public class ItemReBattery extends ItemBattery {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.RE_BATTERY);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -46,7 +46,8 @@ public class ItemAdvancedChainsaw extends ItemChainsaw {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_CHAINSAW);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -58,8 +58,8 @@ public class ItemAdvancedDrill extends ItemDrill {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_DRILL);
|
||||
ItemStack uncharged = stack.copy();
|
||||
ItemStack charged = stack.copy();
|
||||
|
|
|
@ -45,7 +45,8 @@ public class ItemAdvancedJackhammer extends ItemJackhammer {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.ADVANCED_JACKHAMMER);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -105,7 +105,8 @@ public class ItemCloakingDevice extends ItemTRNoDestroy implements IEnergyItemIn
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack uncharged = new ItemStack(ModItems.CLOAKING_DEVICE);
|
||||
ItemStack charged = new ItemStack(ModItems.CLOAKING_DEVICE);
|
||||
|
|
|
@ -46,7 +46,8 @@ public class ItemDiamondChainsaw extends ItemChainsaw {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_CHAINSAW);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -46,7 +46,8 @@ public class ItemDiamondDrill extends ItemDrill {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_DRILL);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -45,8 +45,8 @@ public class ItemDiamondJackhammer extends ItemJackhammer {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.DIAMOND_JACKHAMMER);
|
||||
ItemStack uncharged = stack.copy();
|
||||
ItemStack charged = stack.copy();
|
||||
|
|
|
@ -101,8 +101,8 @@ public class ItemElectricTreetap extends ItemTRNoDestroy implements IEnergyItemI
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack uncharged = new ItemStack(ModItems.ELECTRIC_TREE_TAP);
|
||||
ItemStack charged = new ItemStack(ModItems.ELECTRIC_TREE_TAP);
|
||||
PoweredItem.setEnergy(getMaxPower(charged), charged);
|
||||
|
|
|
@ -34,6 +34,7 @@ import net.minecraft.init.Enchantments;
|
|||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemPickaxe;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
@ -128,7 +129,8 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
@Override
|
||||
public void getSubItems(CreativeTabs par2CreativeTabs, NonNullList<ItemStack> itemList) {
|
||||
ItemStack itemStack = new ItemStack(this, 1);
|
||||
itemList.add(itemStack);
|
||||
|
||||
|
@ -136,5 +138,4 @@ public class ItemJackhammer extends ItemPickaxe implements IEnergyItemInfo {
|
|||
PoweredItem.setEnergy(getMaxPower(charged), charged);
|
||||
itemList.add(charged);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
ItemStack stack) {
|
||||
Multimap<String, AttributeModifier> multimap = HashMultimap.<String, AttributeModifier>create();
|
||||
int modifier = 0;
|
||||
if (!stack.isEmpty() && stack.getTagCompound().getBoolean("isActive"))
|
||||
if (!stack.isEmpty() && stack.getTagCompound() != null && stack.getTagCompound().getBoolean("isActive"))
|
||||
modifier = 9;
|
||||
|
||||
if (slot == EntityEquipmentSlot.MAINHAND) {
|
||||
|
@ -113,7 +113,8 @@ public class ItemNanosaber extends ItemSword implements IEnergyItemInfo {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack inactiveUncharged = new ItemStack(ModItems.NANOSABER);
|
||||
inactiveUncharged.setTagCompound(new NBTTagCompound());
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
@ -143,7 +144,8 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack uncharged = new ItemStack(ModItems.OMNI_TOOL);
|
||||
ItemStack charged = new ItemStack(ModItems.OMNI_TOOL);
|
||||
|
@ -155,7 +157,7 @@ public class ItemOmniTool extends ItemPickaxe implements IEnergyItemInfo {
|
|||
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack stack, EntityPlayer playerIn, List<String> tooltip, boolean advanced) {
|
||||
public void addInformation(ItemStack stack, World world, List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + "WIP Coming Soon");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,7 +141,8 @@ public class ItemRockCutter extends ItemPickaxe implements IEnergyItemInfo {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack uncharged = new ItemStack(ModItems.ROCK_CUTTER);
|
||||
ItemStack charged = new ItemStack(ModItems.ROCK_CUTTER);
|
||||
|
|
|
@ -46,7 +46,8 @@ public class ItemSteelChainsaw extends ItemChainsaw {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_CHAINSAW);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -46,7 +46,8 @@ public class ItemSteelDrill extends ItemDrill {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_DRILL);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -45,7 +45,8 @@ public class ItemSteelJackhammer extends ItemJackhammer {
|
|||
|
||||
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item,
|
||||
@Override
|
||||
public void getSubItems(
|
||||
CreativeTabs par2CreativeTabs, NonNullList itemList) {
|
||||
ItemStack stack = new ItemStack(ModItems.STEEL_JACKHAMMER);
|
||||
ItemStack uncharged = stack.copy();
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
|
||||
package techreborn.items.tools;
|
||||
|
||||
import net.minecraft.client.util.ITooltipFlag;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ActionResult;
|
||||
|
@ -57,7 +58,7 @@ public class ItemTechManual extends ItemTRNoDestroy {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void addInformation(final ItemStack stack, final EntityPlayer playerIn, final List<String> tooltip, final boolean advanced) {
|
||||
public void addInformation(final ItemStack stack, final World world, final List<String> tooltip, ITooltipFlag flag) {
|
||||
tooltip.add(TextFormatting.RED + I18n.translateToLocal("tooltip.wip"));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue