From ba5165f86b764ff92c51f8a330df8a860542cc21 Mon Sep 17 00:00:00 2001 From: Christian Date: Thu, 7 Mar 2013 19:33:34 -0500 Subject: [PATCH] Strip deprecated code --- fml/client/net/minecraft/src/ModLoader.java | 1 + .../cpw/mods/fml/common/IDispenseHandler.java | 48 ------------------- .../mods/fml/common/IDispenserHandler.java | 45 ----------------- fml/common/cpw/mods/fml/common/TickType.java | 14 +----- .../modloader/ModLoaderDispenseHelper.java | 40 ---------------- .../fml/common/modloader/ModLoaderHelper.java | 10 +--- .../modloader/ModLoaderModContainer.java | 9 +--- .../fml/common/registry/GameRegistry.java | 41 +--------------- 8 files changed, 5 insertions(+), 203 deletions(-) delete mode 100644 fml/common/cpw/mods/fml/common/IDispenseHandler.java delete mode 100644 fml/common/cpw/mods/fml/common/IDispenserHandler.java delete mode 100644 fml/common/cpw/mods/fml/common/modloader/ModLoaderDispenseHelper.java diff --git a/fml/client/net/minecraft/src/ModLoader.java b/fml/client/net/minecraft/src/ModLoader.java index e240904afb..4bfced18c8 100644 --- a/fml/client/net/minecraft/src/ModLoader.java +++ b/fml/client/net/minecraft/src/ModLoader.java @@ -222,6 +222,7 @@ public class ModLoader * @param fileToAdd The new image * @return The 'icon index' in the main image that the new image will be applied to */ + @Deprecated @SideOnly(CLIENT) public static int addOverride(String fileToOverride, String fileToAdd) { diff --git a/fml/common/cpw/mods/fml/common/IDispenseHandler.java b/fml/common/cpw/mods/fml/common/IDispenseHandler.java deleted file mode 100644 index 7794882292..0000000000 --- a/fml/common/cpw/mods/fml/common/IDispenseHandler.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * The FML Forge Mod Loader suite. Copyright (C) 2012 cpw - * - * This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free - * Software Foundation; either version 2.1 of the License, or any later version. - * - * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ -package cpw.mods.fml.common; - -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - - -/** - * Deprecated without replacement, use vanilla DispenserRegistry code - * - * @author cpw - * - */ -@Deprecated -public interface IDispenseHandler -{ - /** - * Return -1 if you don't want to dispense anything. the other values seem to have specific meanings - * to blockdispenser. - * - * @param x - * @param y - * @param z - * @param xVelocity - * @param zVelocity - * @param world - * @param item - * @param random - * @param entX - * @param entY - * @param entZ - */ - @Deprecated - int dispense(double x, double y, double z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY, double entZ); -} diff --git a/fml/common/cpw/mods/fml/common/IDispenserHandler.java b/fml/common/cpw/mods/fml/common/IDispenserHandler.java deleted file mode 100644 index a7b0e86345..0000000000 --- a/fml/common/cpw/mods/fml/common/IDispenserHandler.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Forge Mod Loader - * Copyright (c) 2012-2013 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v2.1 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * - * Contributors: - * cpw - implementation - */ - -package cpw.mods.fml.common; - -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -/** - * - * Deprecated without replacement. Use vanilla DispenserRegistry code. - * - * @author cpw - * - */ -@Deprecated -public interface IDispenserHandler -{ - /** - * Called to dispense an entity - * @param x - * @param y - * @param z - * @param xVelocity - * @param zVelocity - * @param world - * @param item - * @param random - * @param entX - * @param entY - * @param entZ - */ - int dispense(int x, int y, int z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY, double entZ); -} diff --git a/fml/common/cpw/mods/fml/common/TickType.java b/fml/common/cpw/mods/fml/common/TickType.java index dd900fcf0d..bd2f58b72f 100644 --- a/fml/common/cpw/mods/fml/common/TickType.java +++ b/fml/common/cpw/mods/fml/common/TickType.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -28,16 +28,6 @@ public enum TickType { * arg 0 : float "partial render time" */ RENDER, - /** - * Not fired - */ - @Deprecated - GUI, - /** - * Not fired - */ - @Deprecated - CLIENTGUI, /** * server side * Fired once as the world loads from disk @@ -69,8 +59,6 @@ public enum TickType { { if (this==CLIENT) return EnumSet.of(RENDER); if (this==RENDER) return EnumSet.of(CLIENT); - if (this==GUI) return EnumSet.of(CLIENTGUI); - if (this==CLIENTGUI) return EnumSet.of(GUI); return EnumSet.noneOf(TickType.class); } } diff --git a/fml/common/cpw/mods/fml/common/modloader/ModLoaderDispenseHelper.java b/fml/common/cpw/mods/fml/common/modloader/ModLoaderDispenseHelper.java deleted file mode 100644 index 0fa72ab913..0000000000 --- a/fml/common/cpw/mods/fml/common/modloader/ModLoaderDispenseHelper.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Forge Mod Loader - * Copyright (c) 2012-2013 cpw. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the GNU Lesser Public License v2.1 - * which accompanies this distribution, and is available at - * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * - * Contributors: - * cpw - implementation - */ - -package cpw.mods.fml.common.modloader; - -import java.util.Random; - -import net.minecraft.item.ItemStack; -import net.minecraft.world.World; - -import cpw.mods.fml.common.IDispenseHandler; -import cpw.mods.fml.common.IDispenserHandler; - -public class ModLoaderDispenseHelper implements IDispenserHandler -{ - - private BaseModProxy mod; - - public ModLoaderDispenseHelper(BaseModProxy mod) - { - this.mod = mod; - } - - @Override - public int dispense(int x, int y, int z, int xVelocity, int zVelocity, World world, ItemStack item, Random random, double entX, double entY, - double entZ) - { - return -1; - } - -} diff --git a/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java b/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java index 13da3a12a5..031bcd358a 100644 --- a/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java +++ b/fml/common/cpw/mods/fml/common/modloader/ModLoaderHelper.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -34,8 +34,6 @@ import net.minecraft.src.TradeEntry; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.ICraftingHandler; -import cpw.mods.fml.common.IDispenseHandler; -import cpw.mods.fml.common.IDispenserHandler; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.IPickupNotifier; import cpw.mods.fml.common.IWorldGenerator; @@ -189,12 +187,6 @@ public class ModLoaderHelper return null; } - public static IDispenserHandler buildDispenseHelper(BaseModProxy mod) - { - return new ModLoaderDispenseHelper(mod); - } - - public static void buildEntityTracker(BaseModProxy mod, Class entityClass, int entityTypeId, int updateRange, int updateInterval, boolean sendVelocityInfo) { diff --git a/fml/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java b/fml/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java index 999ddcebd4..16d5386a80 100644 --- a/fml/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java +++ b/fml/common/cpw/mods/fml/common/modloader/ModLoaderModContainer.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -337,12 +337,6 @@ public class ModLoaderModContainer implements ModContainer return mod != null ? mod.getName() : modId; } - @Deprecated - public static ModContainer findContainerFor(BaseModProxy mod) - { - return FMLCommonHandler.instance().findContainerFor(mod); - } - @Override public String getSortingRules() { @@ -524,7 +518,6 @@ public class ModLoaderModContainer implements ModContainer GameRegistry.registerFuelHandler(ModLoaderHelper.buildFuelHelper(mod)); GameRegistry.registerCraftingHandler(ModLoaderHelper.buildCraftingHelper(mod)); GameRegistry.registerPickupHandler(ModLoaderHelper.buildPickupHelper(mod)); - GameRegistry.registerDispenserHandler(ModLoaderHelper.buildDispenseHelper(mod)); NetworkRegistry.instance().registerChatListener(ModLoaderHelper.buildChatListener(mod)); NetworkRegistry.instance().registerConnectionHandler(ModLoaderHelper.buildConnectionHelper(mod)); } diff --git a/fml/common/cpw/mods/fml/common/registry/GameRegistry.java b/fml/common/cpw/mods/fml/common/registry/GameRegistry.java index 3d8b23a522..d6c1b20a02 100644 --- a/fml/common/cpw/mods/fml/common/registry/GameRegistry.java +++ b/fml/common/cpw/mods/fml/common/registry/GameRegistry.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -48,8 +48,6 @@ import com.google.common.collect.Sets.SetView; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.ICraftingHandler; -import cpw.mods.fml.common.IDispenseHandler; -import cpw.mods.fml.common.IDispenserHandler; import cpw.mods.fml.common.IFuelHandler; import cpw.mods.fml.common.IPickupNotifier; import cpw.mods.fml.common.IPlayerTracker; @@ -104,43 +102,6 @@ public class GameRegistry } } - /** - * Deprecated without replacement. Use vanilla DispenserRegistry code - * - * @param handler - */ - @Deprecated - public static void registerDispenserHandler(IDispenserHandler handler) - { - } - /** - * Deprecated without replacement. Use vanilla DispenserRegistry code - * - * @param handler - */ - @Deprecated - public static void registerDispenserHandler(final IDispenseHandler handler) - { - } - - - /** - * - * Deprecated without replacement, use vanilla DispenserRegistry code - * - * @param world - * @param x - * @param y - * @param z - * @param xVelocity - * @param zVelocity - * @param item - */ - @Deprecated - public static int tryDispense(World world, int x, int y, int z, int xVelocity, int zVelocity, ItemStack item, Random random, double entX, double entY, double entZ) - { - return -1; - } /** * Internal method for creating an @Block instance * @param container