Removed the notice thing, wasn' working anyway

This commit is contained in:
jaredlll08 2015-06-23 16:03:10 +02:00
parent c500a5a580
commit cc0f2fdc7a
9 changed files with 1 additions and 48 deletions

View file

@ -15,7 +15,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class ClientEvents {
public static int cooldown;
public static boolean active;
public static String notice = EnumChatFormatting.DARK_RED + "This item's recipe has been changed by ModTweaker.";
@SubscribeEvent
public void onDrawTooltip(ItemTooltipEvent event) {
@ -23,7 +23,6 @@ public static String notice = EnumChatFormatting.DARK_RED + "This item's recipe
if (player != null) {
IItemStack hand = MineTweakerMC.getIItemStack(event.itemStack);
if (hand != null) {
if (active) {
String print = hand.toString();
@ -38,11 +37,6 @@ public static String notice = EnumChatFormatting.DARK_RED + "This item's recipe
cooldown--;
}
for (ItemStack stack : TweakerPlugin.changed) {
if (stack.isItemEqual(event.itemStack) && event.toolTip.contains(notice)) {
event.toolTip.add(notice);
}
}
}
}
}

View file

@ -1,7 +1,5 @@
package modtweaker2;
import java.util.Random;
import minetweaker.MineTweakerImplementationAPI;
import minetweaker.MineTweakerImplementationAPI.ReloadEvent;
import minetweaker.util.IEventHandler;
@ -25,9 +23,7 @@ import modtweaker2.mods.thaumcraft.Thaumcraft;
import modtweaker2.mods.thermalexpansion.ThermalExpansion;
import modtweaker2.proxy.CommonProxy;
import modtweaker2.utils.TweakerPlugin;
import net.minecraft.util.ChatComponentText;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.CommandEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -41,7 +37,6 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.event.FMLServerStartingEvent;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
@Mod(modid = ModProps.modid, version = ModProps.version, dependencies = ModProps.dependencies)
@ -97,32 +92,6 @@ public class ModTweaker2 {
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void onCommand(CommandEvent event) {
if ((event.command.getCommandName().equals("mt") || event.command.getCommandName().equals("minetweaker")) && event.parameters.length > 0 && "reload".equals(event.parameters[0])) {
event.setCanceled(true);
Random rand = new Random();
int ran = rand.nextInt(5);
switch (ran) {
case 0:
event.sender.addChatMessage(new ChatComponentText("<ModTweaker2> Nope! Do NOT use /mt reload, it causes errors when ModTweaker is loaded."));
break;
case 1:
event.sender.addChatMessage(new ChatComponentText("<ModTweaker2> No can do!"));
break;
case 2:
event.sender.addChatMessage(new ChatComponentText("<ModTweaker2> #stopModReloading."));
break;
case 3:
event.sender.addChatMessage(new ChatComponentText("<ModTweaker2> Take a look over here. http://www.reddit.com/r/feedthebeast/comments/3acdqc/psa_never_use_mt_reload_or_anything_of_the_like/"));
break;
case 4:
event.sender.addChatMessage(new ChatComponentText("<ModTweaker2> Stop touching me like that!"));
break;
}
}
}
@EventHandler
public void postInit(FMLPostInitializationEvent event) {
logger.info("Starting PostInitialization for " + ModProps.modid);

View file

@ -19,7 +19,6 @@ public abstract class BaseCraftingAddition extends BaseDescriptionAddition {
this.output = output;
this.recipe = recipe;
this.list = list;
TweakerPlugin.changed.add(output);
}
@Override

View file

@ -10,7 +10,6 @@ import static modtweaker2.helpers.StackHelper.areEqual;
public class BaseCraftingRemoval extends BaseListRemoval {
public BaseCraftingRemoval(String name, List list, ItemStack stack) {
super(name, list, stack);
TweakerPlugin.changed.add(stack);
}
@Override

View file

@ -19,7 +19,6 @@ public abstract class BaseListAddition implements IUndoableAction {
public BaseListAddition(List list, Object recipe) {
this.list = list;
this.recipe = recipe;
TweakerPlugin.changed.add(((ItemStack) recipe));
}
@Override

View file

@ -22,7 +22,6 @@ public abstract class BaseListRemoval implements IUndoableAction {
this.stack = stack;
this.description = description;
this.fluid = fluid;
TweakerPlugin.changed.add(stack);
}
public BaseListRemoval(String description, List list, ItemStack stack) {

View file

@ -21,8 +21,6 @@ public abstract class BaseMapAddition implements IUndoableAction {
this.key = key;
this.recipe = recipe;
this.description = description;
if (recipe instanceof ItemStack)
TweakerPlugin.changed.add(((ItemStack) recipe));
}
@Override

View file

@ -26,9 +26,6 @@ public abstract class BaseMapRemoval implements IUndoableAction {
this.map = map;
this.key = key;
this.description = description;
if(map.get(key) instanceof ItemStack){
TweakerPlugin.changed.add(((ItemStack) map.get(key)));
}
}
@Override

View file

@ -8,7 +8,6 @@ import cpw.mods.fml.common.Loader;
public class TweakerPlugin {
private static ArrayList<String> isLoaded = new ArrayList();
public static List<ItemStack> changed = new ArrayList<ItemStack>();
public static void register(String mod, Class clazz) {
if (Loader.isModLoaded(mod)) {