mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-20 20:12:19 +00:00
Use the generic types now available in 1.8+. remove warning suppressions
This commit is contained in:
1 parent
2ddad6ec37
commit
626d0d8fb5
60 files changed
+56
-137
No files matched your search
@@ -100,10 +100,9 @@ public class BlockAlveary extends BlockStructure implements IStateMapperRegister
|
||||
setDefaultState(this.blockState.getBaseState().withProperty(TYPE, AlvearyType.PLAIN).withProperty(STATE, State.OFF).withProperty(LEVEL, AlvearyLevel.MIDDLE));
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
if (i == 1) {
|
||||
continue;
|
||||
@@ -111,11 +110,6 @@ public class BlockAlveary extends BlockStructure implements IStateMapperRegister
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isNormalCube() {
|
||||
|
||||
@@ -172,9 +172,8 @@ public class BlockBeehives extends BlockContainer implements IItemModelRegister
|
||||
return null;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
itemList.add(new ItemStack(this, 1, 1));
|
||||
itemList.add(new ItemStack(this, 1, 2));
|
||||
itemList.add(new ItemStack(this, 1, 3));
|
||||
|
||||
@@ -147,9 +147,8 @@ public class BlockCandle extends BlockTorch implements IItemModelRegister {
|
||||
return ((TileCandle) worldIn.getTileEntity(pos)).getColour();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
itemList.add(new ItemStack(this, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -52,9 +52,8 @@ public class BlockStump extends BlockTorch implements IItemModelRegister {
|
||||
manager.registerItemModel(item, 0, "stump");
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
itemList.add(new ItemStack(this, 1, 0));
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.core.genetics.alleles.AlleleCategorized;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.EntityUtil;
|
||||
import forestry.core.utils.vect.MutableVect;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
|
||||
@@ -155,6 +154,6 @@ public abstract class AlleleEffect extends AlleleCategorized implements IAlleleB
|
||||
|
||||
public static <T extends Entity> List<T> getEntitiesInRange(IBeeGenome genome, IBeeHousing housing, Class<T> entityClass) {
|
||||
AxisAlignedBB boundingBox = getBounding(genome, housing);
|
||||
return EntityUtil.getEntitiesWithinAABB(housing.getWorld(), entityClass, boundingBox);
|
||||
return housing.getWorld().getEntitiesWithinAABB(entityClass, boundingBox);
|
||||
}
|
||||
}
|
||||
@@ -88,9 +88,8 @@ public class ItemBeeGE extends ItemGE {
|
||||
return beeGrammar.replaceAll("%SPECIES", beeSpecies).replaceAll("%TYPE", beeType);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
return;
|
||||
}
|
||||
@@ -107,14 +106,12 @@ public class ItemBeeGE extends ItemGE {
|
||||
super.addInformation(itemstack, player, list, flag);
|
||||
}
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
addCreativeItems(itemList, true);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
public void addCreativeItems(List itemList, boolean hideSecrets) {
|
||||
public void addCreativeItems(List<ItemStack> itemList, boolean hideSecrets) {
|
||||
for (IBee bee : BeeManager.beeRoot.getIndividualTemplates()) {
|
||||
// Don't show secret bees unless ordered to.
|
||||
if (hideSecrets && bee.isSecret() && !Config.isDebug) {
|
||||
|
||||
@@ -62,9 +62,8 @@ public class ItemHabitatLocator extends ItemWithGui {
|
||||
Minecraft.getMinecraft().getTextureMapBlocks().setTextureEntry(iconName, texture);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
BiomeGenBase currentBiome = player.worldObj.getBiomeGenForCoords(player.getPosition());
|
||||
|
||||
float temperatureValue = currentBiome.getFloatTemperature(player.getPosition());
|
||||
|
||||
@@ -68,9 +68,8 @@ public class ItemHoneycomb extends ItemForestry {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < EnumHoneyComb.VALUES.length; i++) {
|
||||
EnumHoneyComb honeyComb = EnumHoneyComb.VALUES[i];
|
||||
if (!honeyComb.isSecret() || Config.isDebug) {
|
||||
|
||||
@@ -98,9 +98,8 @@ public class ItemMinecartBeehouse extends ItemMinecart implements IItemModelRegi
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < definition.length; i++) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ import forestry.plugins.PluginApiculture;
|
||||
|
||||
public abstract class HiveDecorator {
|
||||
|
||||
@SuppressWarnings("rawtypes")
|
||||
private static final EventType EVENT_TYPE = EnumHelper.addEnum(EventType.class, "FORESTRY_HIVES", new Class[0], new Object[0]);
|
||||
|
||||
public static void decorateHives(IChunkProvider chunkProvider, World world, Random rand, int chunkX, int chunkZ, boolean hasVillageGenerated) {
|
||||
|
||||
@@ -93,9 +93,8 @@ public class BlockArbFence extends BlockFence implements IWoodTyped, IItemModelR
|
||||
return super.getActualState(state, world, pos);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
|
||||
for (EnumWoodType woodType : EnumWoodType.VALUES) {
|
||||
list.add(TreeManager.woodItemAccess.getFence(woodType, fireproof));
|
||||
}
|
||||
|
||||
@@ -89,10 +89,9 @@ public class BlockArbStairs extends BlockStairs implements IWoodTyped, IItemMode
|
||||
return super.getActualState(state, world, pos);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (EnumWoodType woodType : EnumWoodType.VALUES) {
|
||||
list.add(TreeManager.woodItemAccess.getStairs(woodType, fireproof));
|
||||
}
|
||||
|
||||
@@ -107,8 +107,7 @@ public class BlockForestryLeaves extends BlockLeavesBase implements ITileEntityP
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
|
||||
for (ITree tree : TreeManager.treeRoot.getIndividualTemplates()) {
|
||||
TileLeaves leaves = new TileLeaves();
|
||||
|
||||
@@ -18,6 +18,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IStringSerializable;
|
||||
@@ -114,9 +115,8 @@ public class BlockLog extends BlockWood {
|
||||
return getStateFromMeta(b0);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (EnumWoodType woodType : EnumWoodType.VALUES) {
|
||||
list.add(TreeManager.woodItemAccess.getLog(woodType, isFireproof()));
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import java.util.List;
|
||||
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import forestry.api.arboriculture.EnumWoodType;
|
||||
import forestry.api.arboriculture.TreeManager;
|
||||
@@ -26,9 +27,8 @@ public class BlockPlanks extends BlockWood {
|
||||
setHarvestLevel("axe", 0);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
|
||||
for (EnumWoodType woodType : EnumWoodType.VALUES) {
|
||||
list.add(TreeManager.woodItemAccess.getPlanks(woodType, isFireproof()));
|
||||
}
|
||||
|
||||
@@ -133,9 +133,8 @@ public class BlockSlab extends net.minecraft.block.BlockSlab implements IWoodTyp
|
||||
return "SomeSlab";
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> list) {
|
||||
if (isDouble()) {
|
||||
for (EnumWoodType woodType : EnumWoodType.VALUES) {
|
||||
list.add(TreeManager.woodItemAccess.getSlab(woodType, fireproof));
|
||||
|
||||
@@ -128,10 +128,8 @@ public class BlockResourceOre extends Block implements IItemModelRegister {
|
||||
return getMetaFromState(state);
|
||||
}
|
||||
|
||||
// / CREATIVE INVENTORY
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (ResourceType resourceType : ResourceType.values()) {
|
||||
ItemStack stack = get(resourceType, 1);
|
||||
itemList.add(stack);
|
||||
|
||||
@@ -60,9 +60,8 @@ public class BlockResourceStorage extends Block implements IItemModelRegister {
|
||||
return getDefaultState().withProperty(RESOURCE, ResourceType.values()[meta]);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List itemList) {
|
||||
public void getSubBlocks(Item item, CreativeTabs creativeTabs, List<ItemStack> itemList) {
|
||||
for (ResourceType resourceType : ResourceType.values()) {
|
||||
ItemStack stack = get(resourceType);
|
||||
itemList.add(stack);
|
||||
|
||||
@@ -255,7 +255,6 @@ public class BlockSoil extends Block implements IItemTyped, IItemModelRegister {
|
||||
}
|
||||
}
|
||||
|
||||
// / CREATIVE INVENTORY
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
itemList.add(new ItemStack(this, 1, 0));
|
||||
|
||||
@@ -72,14 +72,12 @@ public class GuiSolderingIron extends GuiForestry<ContainerSolderingIron, ItemIn
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
buttonList.add(new GuiButton(1, guiLeft + 12, guiTop + 10, 12, 18, "<"));
|
||||
buttonList.add(new GuiButton(2, guiLeft + 130, guiTop + 10, 12, 18, ">"));
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,9 +37,8 @@ public class ItemCircuitBoard extends ItemForestry {
|
||||
setHasSubtypes(true);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
itemList.add(createCircuitboard(EnumCircuitBoardType.BASIC, null, new ICircuit[]{}));
|
||||
itemList.add(createCircuitboard(EnumCircuitBoardType.ENHANCED, null, new ICircuit[]{}));
|
||||
itemList.add(createCircuitboard(EnumCircuitBoardType.REFINED, null, new ICircuit[]{}));
|
||||
@@ -79,9 +78,8 @@ public class ItemCircuitBoard extends ItemForestry {
|
||||
return "item.for.circuitboard." + type.toString().toLowerCase(Locale.ENGLISH);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
ICircuitBoard circuitboard = ChipsetManager.circuitRegistry.getCircuitBoard(itemstack);
|
||||
if (circuitboard != null) {
|
||||
circuitboard.addTooltip(list);
|
||||
|
||||
@@ -157,7 +157,6 @@ public class CommandHelpers {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static List<String> getListOfStringsMatchingLastWord(String[] strings, String... lastWords) {
|
||||
return CommandBase.getListOfStringsMatchingLastWord(strings, lastWords);
|
||||
}
|
||||
|
||||
@@ -63,9 +63,8 @@ public abstract class ItemGE extends ItemForestry {
|
||||
return species != null && species.hasEffect();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -272,9 +272,8 @@ public class ItemResearchNote extends ItemForestry {
|
||||
return StringUtil.localizeAndFormatRaw(getUnlocalizedName(itemstack) + ".name", researcherName);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
ResearchNote note = new ResearchNote(itemstack.getTagCompound());
|
||||
note.addTooltip(list);
|
||||
}
|
||||
|
||||
@@ -40,7 +40,6 @@ public abstract class ContainerLiquidTanks<T extends TileEntity & ILiquidTankTil
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
tile.getTankManager().updateGuiData(this, crafters);
|
||||
|
||||
@@ -45,7 +45,6 @@ public abstract class ContainerLiquidTanksSocketed<T extends TileEntity & ILiqui
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
tile.getTankManager().updateGuiData(this, crafters);
|
||||
|
||||
@@ -83,7 +83,6 @@ public class GuiNaturalistInventory extends GuiForestry<Container, IPagedInvento
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -70,7 +70,6 @@ public class GuiTextBox extends GuiTextField {
|
||||
return text.substring(0, cursorPos) + "_" + text.substring(cursorPos);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void drawScrolledSplitString(String text, int startX, int startY, int width, int textColour) {
|
||||
List<String> lines = fontRendererObj.listFormattedStringToWidth(text, width);
|
||||
maxLines = lines.size();
|
||||
|
||||
@@ -50,7 +50,6 @@ public class SocketWidget extends Widget {
|
||||
}
|
||||
|
||||
private final ToolTip toolTip = new ToolTip(250) {
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void refresh() {
|
||||
toolTip.clear();
|
||||
|
||||
@@ -22,9 +22,8 @@ public class ItemBlockNBT extends ItemBlockForestry {
|
||||
super(block);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List info, boolean par4) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> info, boolean par4) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ public class ItemBlockTyped extends ItemBlockForestry {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public String getUnlocalizedName(ItemStack itemstack) {
|
||||
Block block = getBlock();
|
||||
if (block instanceof IItemTyped) {
|
||||
|
||||
@@ -59,9 +59,8 @@ public class ItemCraftingMaterial extends ItemForestry {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < 7; i++) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@@ -37,11 +37,10 @@ public class ItemElectronTube extends ItemOverlay {
|
||||
super(CreativeTabForestry.tabForestry, EnumElectronTube.VALUES);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
Multimap<ICircuitLayout, ICircuit> circuits = getCircuits(itemstack);
|
||||
if (circuits.size() > 0) {
|
||||
if (!circuits.isEmpty()) {
|
||||
if (Proxies.common.isShiftDown()) {
|
||||
for (ICircuitLayout circuitLayout : circuits.keys()) {
|
||||
String circuitLayoutName = circuitLayout.getUsage();
|
||||
@@ -58,13 +57,12 @@ public class ItemElectronTube extends ItemOverlay {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < overlays.length; i++) {
|
||||
if (Config.isDebug || !overlays[i].isSecret()) {
|
||||
ItemStack itemStack = new ItemStack(this, 1, i);
|
||||
if (Config.isDebug || getCircuits(itemStack).size() > 0) {
|
||||
if (Config.isDebug || !getCircuits(itemStack).isEmpty()) {
|
||||
itemList.add(itemStack);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -78,9 +78,8 @@ public class ItemFruit extends ItemForestryFood {
|
||||
EnumFruit.registerModel(item, manager);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < EnumFruit.values().length; i++) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
}
|
||||
|
||||
@@ -53,9 +53,8 @@ public class ItemOverlay extends ItemForestry {
|
||||
return false;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < overlays.length; i++) {
|
||||
if (Config.isDebug || !overlays[i].isSecret()) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
|
||||
@@ -96,9 +96,8 @@ public class ItemPipette extends ItemForestry implements IToolPipette {
|
||||
return filled;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
PipetteContents contained = PipetteContents.create(itemstack);
|
||||
if (contained != null) {
|
||||
contained.addTooltip(list);
|
||||
|
||||
@@ -211,12 +211,10 @@ public abstract class RecipeUtil {
|
||||
addRecipe(new ItemStack(item), obj);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addRecipe(ItemStack itemstack, Object... obj) {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapedRecipeCustom(itemstack, obj));
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addPriorityRecipe(ItemStack itemStack, Object... obj) {
|
||||
CraftingManager.getInstance().getRecipeList().add(0, new ShapedRecipeCustom(itemStack, obj));
|
||||
}
|
||||
@@ -225,7 +223,6 @@ public abstract class RecipeUtil {
|
||||
addShapelessRecipe(new ItemStack(item), obj);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void addShapelessRecipe(ItemStack itemstack, Object... obj) {
|
||||
CraftingManager.getInstance().getRecipeList().add(new ShapelessOreRecipe(itemstack, obj));
|
||||
}
|
||||
|
||||
@@ -52,16 +52,6 @@ public abstract class EntityUtil {
|
||||
Log.debug("Registered entity %s (%s) with id %s.", ident, entityClass.toString(), id);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends Entity> List<T> getEntitiesWithinAABB(World world, Class<T> entityClass, AxisAlignedBB boundingBox) {
|
||||
return world.getEntitiesWithinAABB(entityClass, boundingBox);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static <T extends Entity> List<T> selectEntitiesWithinAABB(World world, EntitySelector<T> entitySelector, AxisAlignedBB boundingBox) {
|
||||
return world.getEntitiesWithinAABB(entitySelector.getEntityClass(), boundingBox, entitySelector);
|
||||
}
|
||||
|
||||
private static <E extends EntityLiving> E createEntity(World world, Class<E> entityClass) {
|
||||
if (!EntityList.classToStringMapping.containsKey(entityClass)) {
|
||||
return null;
|
||||
|
||||
@@ -57,7 +57,6 @@ public class BlockEngine extends BlockBase<BlockTypeEngine> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void addCollisionBoxesToList(World world, BlockPos pos, IBlockState state, AxisAlignedBB mask, List<AxisAlignedBB> list, Entity collidingEntity) {
|
||||
TileEngine tile = TileUtil.getTile(world, pos, TileEngine.class);
|
||||
if (tile == null) {
|
||||
|
||||
@@ -34,12 +34,11 @@ public class ContainerEngineBiogas extends ContainerLiquidTanks<TileEngineBiogas
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -42,8 +42,8 @@ public class ContainerEnginePeat extends ContainerTile<TileEnginePeat> {
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -66,12 +66,11 @@ public class ContainerFabricator extends ContainerLiquidTanks<TileFabricator> im
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -39,12 +39,11 @@ public class ContainerFermenter extends ContainerLiquidTanks<TileFermenter> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -60,12 +60,11 @@ public class ContainerMoistener extends ContainerLiquidTanks<TileMoistener> impl
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -36,12 +36,11 @@ public class ContainerRaintank extends ContainerLiquidTanks<TileRaintank> {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("unchecked")
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
|
||||
for (Object crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, (ICrafting) crafter);
|
||||
for (ICrafting crafter : crafters) {
|
||||
tile.sendGUINetworkData(this, crafter);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -62,7 +62,6 @@ public class GuiWorktable extends GuiForestryTitled<ContainerWorktable, TileWork
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private void addButtons() {
|
||||
buttonList.add(new GuiBetterButton(0, guiLeft + 76, guiTop + 56, StandardButtonTextureSets.LEFT_BUTTON_SMALL));
|
||||
buttonList.add(new GuiBetterButton(1, guiLeft + 85, guiTop + 56, StandardButtonTextureSets.RIGHT_BUTTON_SMALL));
|
||||
|
||||
@@ -89,9 +89,8 @@ public class BlockFarm extends BlockStructure {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
for (int i = 0; i < 6; i++) {
|
||||
if (i == 1) {
|
||||
continue;
|
||||
|
||||
@@ -154,10 +154,9 @@ public class BlockMushroom extends BlockBush implements IItemTyped, IItemModelRe
|
||||
}
|
||||
|
||||
/* ICONS */
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
}
|
||||
|
||||
@@ -44,7 +44,6 @@ public class CircuitFarmLogic extends Circuit {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("rawtypes")
|
||||
public void onInsertion(int slot, Object tile) {
|
||||
IFarmHousing housing = getCircuitable(tile);
|
||||
if (housing == null) {
|
||||
|
||||
@@ -31,9 +31,8 @@ public class ItemBlockFarm extends ItemBlock {
|
||||
return i;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List info, boolean par4) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> info, boolean par4) {
|
||||
if (!itemstack.hasTagCompound()) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -34,7 +34,6 @@ import forestry.api.farming.IFarmLogic;
|
||||
import forestry.core.config.Constants;
|
||||
import forestry.core.entities.EntitySelector;
|
||||
import forestry.core.utils.BlockUtil;
|
||||
import forestry.core.utils.EntityUtil;
|
||||
import forestry.core.utils.vect.Vect;
|
||||
|
||||
public abstract class FarmLogic implements IFarmLogic {
|
||||
@@ -118,7 +117,7 @@ public abstract class FarmLogic implements IFarmLogic {
|
||||
protected List<ItemStack> collectEntityItems(boolean toWorldHeight) {
|
||||
AxisAlignedBB harvestBox = getHarvestBox(housing, toWorldHeight);
|
||||
|
||||
List<EntityItem> entityItems = EntityUtil.selectEntitiesWithinAABB(housing.getWorld(), entitySelectorFarm, harvestBox);
|
||||
List<EntityItem> entityItems = housing.getWorld().getEntitiesWithinAABB(entitySelectorFarm.getEntityClass(), harvestBox, entitySelectorFarm);
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
for (EntityItem entity : entityItems) {
|
||||
ItemStack contained = entity.getEntityItem();
|
||||
|
||||
@@ -111,9 +111,8 @@ public class ItemBeverage extends ItemForestryFood {
|
||||
return itemstack;
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
for (int i = 0; i < beverages.length; i++) {
|
||||
if (Config.isDebug || !beverages[i].isSecret()) {
|
||||
itemList.add(new ItemStack(this, 1, i));
|
||||
@@ -121,9 +120,8 @@ public class ItemBeverage extends ItemForestryFood {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
List<IBeverageEffect> effects = BeverageEffect.loadEffects(itemstack);
|
||||
|
||||
for (IBeverageEffect effect : effects) {
|
||||
|
||||
@@ -92,9 +92,8 @@ public class ItemButterflyGE extends ItemGE {
|
||||
return butterfly.getDisplayName();
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List itemList) {
|
||||
public void getSubItems(Item item, CreativeTabs par2CreativeTabs, List<ItemStack> itemList) {
|
||||
addCreativeItems(itemList, true);
|
||||
}
|
||||
|
||||
|
||||
@@ -179,8 +179,7 @@ public class ContainerCatalogue extends Container implements IGuiSelectable, ILe
|
||||
super.detectAndSendChanges();
|
||||
|
||||
if (needsSynch) {
|
||||
for (Object crafter1 : crafters) {
|
||||
ICrafting crafter = (ICrafting) crafter1;
|
||||
for (ICrafting crafter : crafters) {
|
||||
crafter.sendProgressBarUpdate(this, 0, stationIndex);
|
||||
crafter.sendProgressBarUpdate(this, 1, stations.size());
|
||||
crafter.sendProgressBarUpdate(this, 2, currentFilter);
|
||||
|
||||
@@ -45,7 +45,6 @@ public class GuiCatalogue extends GuiForestry<ContainerCatalogue, IInventory> {
|
||||
this.ySize = 192;
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
|
||||
@@ -63,9 +63,8 @@ public class ItemLetter extends ItemWithGui {
|
||||
LetterProperties.registerModel(item, manager);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
NBTTagCompound nbttagcompound = itemstack.getTagCompound();
|
||||
if (nbttagcompound == null) {
|
||||
list.add('<' + StringUtil.localize("gui.blank") + '>');
|
||||
|
||||
@@ -139,7 +139,6 @@ public class PluginApiculture extends BlankForestryPlugin {
|
||||
private final Map<String, String[]> defaultPlantableFlowers = new HashMap<>();
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked"})
|
||||
public void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
|
||||
@@ -127,7 +127,6 @@ public class PluginLepidopterology extends BlankForestryPlugin {
|
||||
config.save();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public void registerRecipes() {
|
||||
CraftingManager.getInstance().getRecipeList().add(new MatingRecipe());
|
||||
|
||||
@@ -103,7 +103,6 @@ public class PluginStorage extends BlankForestryPlugin {
|
||||
public static ItemRegistryStorage items;
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void setupAPI() {
|
||||
super.setupAPI();
|
||||
|
||||
@@ -153,7 +152,6 @@ public class PluginStorage extends BlankForestryPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public void disabledSetupAPI() {
|
||||
BackpackManager.backpackItems = new ArrayList[6];
|
||||
BackpackManager.backpackItems[0] = minerItems;
|
||||
|
||||
@@ -207,9 +207,8 @@ public class ItemBackpack extends ItemWithGui {
|
||||
return getSlotsForType(type);
|
||||
}
|
||||
|
||||
@SuppressWarnings({"rawtypes", "unchecked"})
|
||||
@Override
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean flag) {
|
||||
public void addInformation(ItemStack itemstack, EntityPlayer player, List<String> list, boolean flag) {
|
||||
int occupied = ItemInventory.getOccupiedSlotCount(itemstack);
|
||||
|
||||
BackpackMode mode = getMode(itemstack);
|
||||
|
||||
Reference in new issue
Block a user