More renaming because I got sick of the redundancy

This commit is contained in:
Bernhard Bonigl committed 2014-07-27 16:27:08 +02:00
1 parent d9f3321459
commit d904f4a46b
33 files changed
+212 -218

No files matched your search

@@ -8,33 +8,31 @@ 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 iguanaman.iguanatweakstconstruct.leveling.Leveling;
import iguanaman.iguanatweakstconstruct.leveling.IguanaToolLeveling;
import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool;
import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP;
import iguanaman.iguanatweakstconstruct.leveling.commands.debug;
import iguanaman.iguanatweakstconstruct.proxy.CommonProxy;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import iguanaman.iguanatweakstconstruct.util.Log;
import mantle.pulsar.config.ForgeCFG;
import mantle.pulsar.control.PulseManager;
import mantle.pulsar.pulse.PulseMeta;
import net.minecraft.item.Item;
import tconstruct.tools.TinkerTools;
import java.util.Arrays;
import java.util.List;
@Mod(modid= IguanaReference.MOD_ID, name=IguanaReference.MOD_NAME, version="1.6.X-1p",
dependencies = "required-after:" + IguanaReference.TCON_MOD_ID + ";after:*")
@Mod(modid= Reference.MOD_ID, name= Reference.MOD_NAME, version="1.6.X-1p",
dependencies = "required-after:" + Reference.TCON_MOD_ID + ";after:*")
public class IguanaTweaksTConstruct {
// The instance of your mod that Forge uses.
@Instance(IguanaReference.MOD_ID)
@Instance(Reference.MOD_ID)
public static IguanaTweaksTConstruct instance;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide=IguanaReference.PROXY_CLIENT_CLASS, serverSide=IguanaReference.PROXY_SERVER_CLASS)
@SidedProxy(clientSide= Reference.PROXY_CLIENT_CLASS, serverSide= Reference.PROXY_SERVER_CLASS)
public static CommonProxy proxy;
public static List<Item> toolParts = null;
@@ -42,11 +40,11 @@ public class IguanaTweaksTConstruct {
// TODO: decide wether or not the same cfg as tcon should be used
// use the PulseManager. This allows us to separate the different parts into independend modules and have stuff together. yay.
private ForgeCFG pulseCFG = new ForgeCFG("TinkersModules", "Addon: Iguana Tweaks for Tinkers Construct");
private PulseManager pulsar = new PulseManager(IguanaReference.MOD_ID, pulseCFG);
private PulseManager pulsar = new PulseManager(Reference.MOD_ID, pulseCFG);
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
IguanaConfig.init(event.getSuggestedConfigurationFile());
Config.init(event.getSuggestedConfigurationFile());
/*toolParts = Arrays.asList (
TinkerTools.toolRod, TinkerTools.pickaxeHead, TinkerTools.shovelHead, TinkerTools.hatchetHead,
@@ -58,7 +56,7 @@ public class IguanaTweaksTConstruct {
TinkerTools.arrowhead );
*/
pulsar.registerPulse(new Leveling());
pulsar.registerPulse(new IguanaToolLeveling());
pulsar.preInit(event);
}
@@ -77,13 +75,14 @@ public class IguanaTweaksTConstruct {
public void serverStarting(FMLServerStartingEvent event)
{
// TODO: change this to a proper isModuleLoaded or something in Pulsar 0.4+ (when released/implemented)
PulseMeta meta = new PulseMeta(IguanaReference.PULSE_LEVELING, "", false, false);
PulseMeta meta = new PulseMeta(Reference.PULSE_LEVELING, "", false, false);
if (pulseCFG.isModuleEnabled(meta))
{
IguanaLog.debug("Adding command: leveluptool");
Log.debug("Adding command: leveluptool");
event.registerServerCommand(new IguanaCommandLevelUpTool());
IguanaLog.debug("Adding command: toolxp");
Log.debug("Adding command: toolxp");
event.registerServerCommand(new IguanaCommandToolXP());
event.registerServerCommand(new debug());
}
}
@@ -5,7 +5,7 @@ import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import iguanaman.iguanatweakstconstruct.leveling.handlers.LevelingEventHandler;
import iguanaman.iguanatweakstconstruct.leveling.handlers.ToolTipHandler;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import mantle.pulsar.pulse.Handler;
import mantle.pulsar.pulse.Pulse;
import net.minecraftforge.common.MinecraftForge;
@@ -16,8 +16,8 @@ import tconstruct.library.TConstructRegistry;
* This pulse contains all the stuff that has to do with tool leveling.
*/
@Pulse(id = IguanaReference.PULSE_LEVELING, description = "The Iguana Tweaks Leveling System for Tinker's Tools")
public class Leveling {
@Pulse(id = Reference.PULSE_LEVELING, description = "The Iguana Tweaks Leveling System for Tinker's Tools")
public class IguanaToolLeveling {
@Handler
public void init(FMLInitializationEvent event)
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.leveling;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.util.Log;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.EntityLivingBase;
@@ -46,7 +46,7 @@ public class LevelingActiveToolMod extends ActiveToolMod {
strong = strength >= 1.0f;
effective = harvestTool.isEffective(block.getMaterial());
IguanaLog.trace("Tool is [harvestable: '" + harvestable + "', effective: '" + effective + "', strong: '" + strong + "']");
Log.trace("Tool is [harvestable: '" + harvestable + "', effective: '" + effective + "', strong: '" + strong + "']");
// only give xp if the use makes sense
if(harvestable && effective && strong)
@@ -58,7 +58,7 @@ public class LevelingActiveToolMod extends ActiveToolMod {
@Override
public boolean afterBlockBreak() {
IguanaLog.debug("afterBlockBreak is implemented. Somebody tell me that so I can update xp giving.");
Log.debug("afterBlockBreak is implemented. Somebody tell me that so I can update xp giving.");
return super.afterBlockBreak();
}
}
@@ -1,8 +1,8 @@
package iguanaman.iguanatweakstconstruct.leveling;
import iguanaman.iguanatweakstconstruct.old.modifiers.*;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -46,7 +46,7 @@ public abstract class LevelingLogic {
public static boolean canBoostMiningLevel(int hLevel)
{
return hLevel >= TConstructRegistry.getMaterial("Copper").harvestLevel() &&
(!IguanaConfig.pickaxeBoostRequired && hLevel < 6 || IguanaConfig.pickaxeBoostRequired && hLevel < 7);
(!Config.pickaxeBoostRequired && hLevel < 6 || Config.pickaxeBoostRequired && hLevel < 7);
}
/**
@@ -60,7 +60,7 @@ public abstract class LevelingLogic {
// and no xp :(
tag.setLong(TAG_EXP, 0);
// mining level boost
if(IguanaConfig.levelingPickaxeBoost)
if(Config.levelingPickaxeBoost)
tag.setLong(TAG_BOOST_EXP, 0);
}
@@ -96,7 +96,7 @@ public abstract class LevelingLogic {
}
// handle mining boost XP
if(IguanaConfig.levelingPickaxeBoost) {
if(Config.levelingPickaxeBoost) {
// already got a boost?
if (tags.hasKey(TAG_BOOST_EXP) && !tags.hasKey(TAG_IS_BOOSTED))
// todo: figure out why this only applies between mining level copper and 7?
@@ -116,7 +116,7 @@ public abstract class LevelingLogic {
// if we got a levelup, play a sound!
if ((leveled || pickLeveled) && !player.worldObj.isRemote)
// TODO: investigate if there's a better way to play sounds? resourcelocation?
player.worldObj.playSoundAtEntity(player, IguanaReference.MOD_ID.toLowerCase() + ":chime", 1.0F, 1.0F);
player.worldObj.playSoundAtEntity(player, Reference.MOD_ID.toLowerCase() + ":chime", 1.0F, 1.0F);
}
public static void addXP(ItemStack tool, EntityPlayer player, long xp)
@@ -159,7 +159,7 @@ public abstract class LevelingLogic {
if (tool.getItem() instanceof Weapon || tool.getItem() instanceof Shortbow)
{
if (tool.getItem() instanceof Scythe) base *= 1.5f;
base *= IguanaConfig.xpRequiredWeaponsPercentage / 100f;
base *= Config.xpRequiredWeaponsPercentage / 100f;
}
else
{
@@ -191,20 +191,20 @@ public abstract class LevelingLogic {
else if (tool.getItem() instanceof Hammer) base *= 6f;
else if (tool.getItem() instanceof Excavator) base *= 9f;
base *= IguanaConfig.xpRequiredToolsPercentage / 100f;
base *= Config.xpRequiredToolsPercentage / 100f;
}
if (miningBoost)
{
int harvestLevelCopper = TConstructRegistry.getMaterial("Copper").harvestLevel();
int harvestLevel = TConstructRegistry.getMaterial(tags.getInteger("Head")).harvestLevel();
if (harvestLevel >= harvestLevelCopper) base *= Math.pow(IguanaConfig.xpPerLevelMultiplier, harvestLevel - harvestLevelCopper);
base *= IguanaConfig.levelingPickaxeBoostXpPercentage / 100f;
if (harvestLevel >= harvestLevelCopper) base *= Math.pow(Config.xpPerLevelMultiplier, harvestLevel - harvestLevelCopper);
base *= Config.levelingPickaxeBoostXpPercentage / 100f;
}
else
{
int level = tags.getInteger("ToolLevel");
if (level >= 1) base *= Math.pow(IguanaConfig.xpPerLevelMultiplier, level - 1);
if (level >= 1) base *= Math.pow(Config.xpPerLevelMultiplier, level - 1);
}
return Math.round(base);
@@ -250,11 +250,11 @@ public abstract class LevelingLogic {
int currentModifiers = tags.getInteger("Modifiers");
// Add Modifier for leveling up?
if(IguanaConfig.toolLevelingExtraModifiers)
if(Config.toolLevelingExtraModifiers)
{
int modifiersToAdd = 0;
// check if we are supposed to add a modifier at this levelup
for(int lvl : IguanaConfig.toolModifiersAtLevels)
for(int lvl : Config.toolModifiersAtLevels)
if(level == lvl)
modifiersToAdd++;
// yes, no break. this means if a level is in the list multiple times, you get multiple modifiers
@@ -277,7 +277,7 @@ public abstract class LevelingLogic {
// Add random bonuses on leveling up?
if (IguanaConfig.toolLevelingRandomBonuses)
if (Config.toolLevelingRandomBonuses)
{
tags.setInteger("Modifiers", currentModifiers + 1);
for (int i = 1; i <= 10; ++i) if (tryModify(player, stack, world.rand.nextInt(10), isTool)) break;
@@ -317,7 +317,7 @@ public abstract class LevelingLogic {
ItemStack[] nullItemStack = new ItemStack[] {};
if (rnd < 1)
{
mod = new ModInteger(nullItemStack, 4, "Moss", IguanaConfig.mossRepairSpeed, "\u00a72", "Auto-Repair");
mod = new ModInteger(nullItemStack, 4, "Moss", Config.mossRepairSpeed, "\u00a72", "Auto-Repair");
if (!player.worldObj.isRemote)
player.addChatMessage(new ChatComponentText("\u00a79It seems to have accumulated a patch of moss (+1 repair)"));
}
@@ -1,7 +1,7 @@
package iguanaman.iguanatweakstconstruct.leveling;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -31,7 +31,7 @@ public abstract class LevelingTooltips {
private static String getXpToolTip(ItemStack tool, NBTTagCompound tags, boolean boostXp)
{
String prefix = boostXp ? "Mining XP: " : "Skill XP: ";
return prefix + getXpString(tool, tags, IguanaConfig.detailedXpTooltip, boostXp);
return prefix + getXpString(tool, tags, Config.detailedXpTooltip, boostXp);
}
/**
@@ -71,7 +71,7 @@ public abstract class LevelingTooltips {
public static String getMiningLevelTooltip(int hLevel)
{
return "Mining Level: " + IguanaReference.getHarvestLevelName(hLevel);
return "Mining Level: " + Reference.getHarvestLevelName(hLevel);
}
public static String getBoostedTooltip()
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.leveling.commands;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.util.Log;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.entity.player.EntityPlayerMP;
@@ -38,11 +38,11 @@ public class debug extends CommandBase {
boolean found = false;
if (tags.hasKey(tip)) {
IguanaLog.info(tip + ": " + tags.getString(tip));
Log.info(tip + ": " + tags.getString(tip));
found = true;
}
if (tags.hasKey(modTip)) {
IguanaLog.info(modTip + ": " + tags.getString(tip));
Log.info(modTip + ": " + tags.getString(tip));
found = true;
}
@@ -5,7 +5,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import iguanaman.iguanatweakstconstruct.leveling.LevelingLogic;
import iguanaman.iguanatweakstconstruct.leveling.LevelingTooltips;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.passive.EntityAnimal;
import net.minecraft.entity.player.EntityPlayer;
@@ -151,7 +151,7 @@ public class LevelingEventHandler {
*/
if (IguanaConfig.toolLeveling && IguanaConfig.toolLevelingExtraModifiers)
if (Config.toolLeveling && Config.toolLevelingExtraModifiers)
toolTag.setInteger("Modifiers", Math.max(toolTag.getInteger("Modifiers") - 3, 0));
if (event.tool == TinkerTools.hammer || event.tool == TinkerTools.excavator || event.tool == TinkerTools.lumberaxe)
@@ -171,7 +171,7 @@ public class LevelingEventHandler {
@SideOnly(Side.CLIENT)
@SubscribeEvent
public void onRenderGameOverlay(RenderGameOverlayEvent.Text event) {
if (IguanaConfig.toolLeveling && IguanaConfig.showDebugXP)
if (Config.toolLeveling && Config.showDebugXP)
{
Minecraft mc = Minecraft.getMinecraft();
EntityPlayer player = mc.thePlayer;
@@ -187,12 +187,12 @@ public class LevelingEventHandler {
event.left.add("");
if (IguanaConfig.showTooltipXP)
if (Config.showTooltipXP)
{
if (level <= 5)
event.left.add(LevelingTooltips.getXpToolTip(equipped, null));
if (IguanaConfig.levelingPickaxeBoost)
if (Config.levelingPickaxeBoost)
if (hLevel >= TConstructRegistry.getMaterial("Copper").harvestLevel() && hLevel < TConstructRegistry.getMaterial("Manyullyn").harvestLevel()
&& !tags.hasKey("HarvestLevelModified")
&& (equipped.getItem() instanceof Pickaxe || equipped.getItem() instanceof Hammer))
@@ -4,7 +4,7 @@ import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import iguanaman.iguanatweakstconstruct.leveling.LevelingLogic;
import iguanaman.iguanatweakstconstruct.leveling.LevelingTooltips;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import net.minecraft.client.Minecraft;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
@@ -41,7 +41,7 @@ public class ToolTipHandler {
// does the user hold shift?
boolean advanced = shiftHeld();
// only allow advanced (xp) tooltip if config option is set
advanced &= IguanaConfig.showTooltipXP;
advanced &= Config.showTooltipXP;
@@ -57,12 +57,12 @@ public class ToolTipHandler {
// is the pick applicable for mining level boosting? if yes display xp
if(LevelingLogic.canBoostMiningLevel(hLevel)) {
// add minimal xp if config option is set
if (!advanced && IguanaConfig.showMinimalTooltipXP && !LevelingLogic.isBoosted(tags))
if (!advanced && Config.showMinimalTooltipXP && !LevelingLogic.isBoosted(tags))
mLvl += " (" + LevelingTooltips.getBoostXpString(stack, tags, false) + ")";
inserter.add(mLvl);
// advanced mining level boost progress info
if (advanced && IguanaConfig.levelingPickaxeBoost && IguanaConfig.showTooltipXP) {
if (advanced && Config.levelingPickaxeBoost && Config.showTooltipXP) {
if (LevelingLogic.isBoosted(tags))
inserter.add(LevelingTooltips.getBoostedTooltip());
else
@@ -75,19 +75,19 @@ public class ToolTipHandler {
// add skill level
int level = LevelingLogic.getLevel(tags);
String lvl = LevelingTooltips.getLevelTooltip(level);
if(!advanced && IguanaConfig.showMinimalTooltipXP && !LevelingLogic.isMaxLevel(tags))
if(!advanced && Config.showMinimalTooltipXP && !LevelingLogic.isMaxLevel(tags))
lvl += " (" + LevelingTooltips.getXpString(stack, tags, false) + ")";
inserter.add(lvl);
// skill level progress
if(advanced && IguanaConfig.showTooltipXP && !LevelingLogic.isMaxLevel(tags))
if(advanced && Config.showTooltipXP && !LevelingLogic.isMaxLevel(tags))
inserter.add(LevelingTooltips.getXpToolTip(stack, tags));
// since we added at least one line we'll add an empty spacing line at the end
inserter.add("");
// add info that you can hold shift for more details
if(!advanced && IguanaConfig.showTooltipXP && !Loader.isModLoaded("TiCTooltips")) // don't display if TicToolTips is installed
if(!advanced && Config.showTooltipXP && !Loader.isModLoaded("TiCTooltips")) // don't display if TicToolTips is installed
event.toolTip.add(EnumChatFormatting.GRAY.toString() + EnumChatFormatting.ITALIC.toString() + "Hold SHIFT for XP");
}
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.reference;
package iguanaman.iguanatweakstconstruct.old;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.util.Log;
import iguanaman.iguanatweakstconstruct.old.blocks.IguanaToolForgeBlock;
import iguanaman.iguanatweakstconstruct.old.blocks.IguanaToolStationBlock;
import net.minecraft.block.Block;
@@ -20,7 +20,7 @@ public class IguanaBlocks {
{
//TOOL STATION + FORGE
IguanaLog.info("Modifying GUIs");
Log.info("Modifying GUIs");
TinkerTools.toolStationWood = null;
TinkerTools.toolStationWood = new IguanaToolStationBlock(Material.wood).setBlockName("ToolStation");
@@ -36,7 +36,7 @@ public class IguanaBlocks {
//SKULLS
IguanaLog.info("Adding skull blocks");
Log.info("Adding skull blocks");
// TODO: Find a way to change vanilla skulls
/*Blocks.skull = null;
newSkullBlock = new IguanaBlockSkull().setHardness(1.0F).setStepSound(Block.soundTypeSand).setBlockName("skull").setBlockTextureName("skull");
@@ -1,7 +1,6 @@
package iguanaman.iguanatweakstconstruct.old;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.IguanaItems;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.IguanaTweaksTConstruct;
import java.util.Iterator;
@@ -48,7 +47,7 @@ public class IguanaEventHandler {
@SubscribeEvent
public void onItemExpireEvent(ItemExpireEvent event)
{
if (IguanaConfig.toolsNeverDespawn && event.entity != null && event.entity instanceof EntityItem)
if (Config.toolsNeverDespawn && event.entity != null && event.entity instanceof EntityItem)
{
ItemStack stack = ((EntityItem)event.entity).getEntityItem();
if (stack.getItem() != null && stack.getItem() instanceof ToolCore)
@@ -136,7 +135,7 @@ public class IguanaEventHandler {
beheading += 2;
}
if (random.nextInt(100) < beheading * IguanaConfig.beheadingHeadDropChance + IguanaConfig.baseHeadDropChance)
if (random.nextInt(100) < beheading * Config.beheadingHeadDropChance + Config.baseHeadDropChance)
addDrops(event, new ItemStack(Items.skull, 1, skullID));
}
}
@@ -222,17 +221,17 @@ public class IguanaEventHandler {
int accessory = toolTag.getInteger("Accessory");
int extra = toolTag.hasKey("Extra") ? toolTag.getInteger("Extra") : -1;
if (!IguanaConfig.allowStoneTools && (head == 1 || handle == 1 || event.tool != TinkerTools.arrow && accessory == 1) || extra == 1)
if (!Config.allowStoneTools && (head == 1 || handle == 1 || event.tool != TinkerTools.arrow && accessory == 1) || extra == 1)
{
event.setResult(Event.Result.DENY);
return;
}
else if (IguanaConfig.allowStoneTools)
else if (Config.allowStoneTools)
{
if (head == 1)
{
int partIndex = IguanaTweaksTConstruct.toolParts.indexOf(event.tool.getHeadItem());
if (IguanaConfig.restrictedFlintParts.contains(partIndex+1))
if (Config.restrictedFlintParts.contains(partIndex+1))
{
event.setResult(Event.Result.DENY);
return;
@@ -242,7 +241,7 @@ public class IguanaEventHandler {
if (handle == 1)
{
int partIndex = IguanaTweaksTConstruct.toolParts.indexOf(event.tool.getHandleItem());
if (IguanaConfig.restrictedFlintParts.contains(partIndex+1))
if (Config.restrictedFlintParts.contains(partIndex+1))
{
event.setResult(Event.Result.DENY);
return;
@@ -252,7 +251,7 @@ public class IguanaEventHandler {
if (event.tool != TinkerTools.arrow && accessory == 1)
{
int partIndex = IguanaTweaksTConstruct.toolParts.indexOf(event.tool.getAccessoryItem());
if (IguanaConfig.restrictedFlintParts.contains(partIndex+1))
if (Config.restrictedFlintParts.contains(partIndex+1))
{
event.setResult(Event.Result.DENY);
return;
@@ -262,7 +261,7 @@ public class IguanaEventHandler {
if (extra == 1)
{
int partIndex = IguanaTweaksTConstruct.toolParts.indexOf(event.tool.getExtraItem());
if (IguanaConfig.restrictedFlintParts.contains(partIndex+1))
if (Config.restrictedFlintParts.contains(partIndex+1))
{
event.setResult(Event.Result.DENY);
return;
@@ -372,14 +371,14 @@ public class IguanaEventHandler {
MaterialSet mat = (MaterialSet) PatternBuilder.instance.materialSets.get(key.key);
if (mat != null)
if (
mat.materialID == 0 && IguanaConfig.restrictedWoodParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 1 && IguanaConfig.restrictedStoneParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 3 && IguanaConfig.restrictedFlintParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 4 && IguanaConfig.restrictedCactusParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 5 && IguanaConfig.restrictedBoneParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 8 && IguanaConfig.restrictedSlimeParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 9 && IguanaConfig.restrictedPaperParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 17 && IguanaConfig.restrictedSlimeParts.contains(event.pattern.getItemDamage())
mat.materialID == 0 && Config.restrictedWoodParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 1 && Config.restrictedStoneParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 3 && Config.restrictedFlintParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 4 && Config.restrictedCactusParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 5 && Config.restrictedBoneParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 8 && Config.restrictedSlimeParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 9 && Config.restrictedPaperParts.contains(event.pattern.getItemDamage()) ||
mat.materialID == 17 && Config.restrictedSlimeParts.contains(event.pattern.getItemDamage())
)
{
event.setResult(Event.Result.DENY);
@@ -392,7 +391,7 @@ public class IguanaEventHandler {
public void onBlockHarvested(HarvestDropsEvent event)
{
if (event.block != null)
if (IguanaConfig.removeFlintDrop && event.block != null && event.block instanceof BlockGravel)
if (Config.removeFlintDrop && event.block != null && event.block instanceof BlockGravel)
{
boolean addGravel = false;
@@ -1,6 +1,7 @@
package iguanaman.iguanatweakstconstruct.reference;
package iguanaman.iguanatweakstconstruct.old;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.*;
import iguanaman.iguanatweakstconstruct.util.Log;
import iguanaman.iguanatweakstconstruct.old.items.ClayBucket;
import iguanaman.iguanatweakstconstruct.old.items.ClayBucketFilled;
import iguanaman.iguanatweakstconstruct.old.items.ClayBucketMilk;
@@ -36,7 +37,7 @@ public class IguanaItems {
{
//CLAY BUCKETS
IguanaLog.info("Adding clay buckets");
Log.info("Adding clay buckets");
clayBucketUnfired = new Item().setUnlocalizedName("iguanatweakstconstruct:clayBucketUnfired").setTextureName("iguanatweakstconstruct:clayBucketUnfired").setMaxStackSize(16).setCreativeTab(CreativeTabs.tabMisc);
clayBucketFired = new ClayBucket(Blocks.air).setUnlocalizedName("iguanatweakstconstruct:clayBucketFired").setTextureName("iguanatweakstconstruct:clayBucketFired").setMaxStackSize(16);
clayBucketWater = new ClayBucket(Blocks.flowing_water).setUnlocalizedName("iguanatweakstconstruct:clayBucketWater").setTextureName("iguanatweakstconstruct:clayBucketWater").setContainerItem(clayBucketFired);
@@ -114,7 +115,7 @@ public class IguanaItems {
ToolBuilder.addCustomToolRecipe(new BowRecipe(TinkerTools.toolRod, TinkerTools.bowstring, TinkerTools.toolRod, TinkerTools.shortbow));
//SKULL ITEM
IguanaLog.info("Adding skull item");
Log.info("Adding skull item");
// TODO: find a way to replace vanilla skull
/*Item.itemsList[Item.skull.itemID] = null;
Item.skull = new IguanaItemSkull(141).setUnlocalizedName("skull").setTextureName("skull");
@@ -124,9 +125,9 @@ public class IguanaItems {
//COBALT ARMOR
if (IguanaConfig.cobaltArmor)
if (Config.cobaltArmor)
{
IguanaLog.info("Changing diamond armor to cobalt armor");
Log.info("Changing diamond armor to cobalt armor");
// TODO: Implement Cobalt Armor
/*LanguageRegistry.addName(new ItemStack(Item.helmetDiamond), "Cobalt Helmet");
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import java.util.ArrayList;
@@ -33,10 +33,10 @@ public class IguanaToolBuildRecipe implements IRecipe {
if (slot != null)
{
//Too many items
if (!IguanaConfig.easyToolCreation && inputs.size() == 3 || inputs.size() == 4) return false;
if (!Config.easyToolCreation && inputs.size() == 3 || inputs.size() == 4) return false;
// if a tool is found, make sure easy modifications are allowed first
if (!IguanaConfig.easyToolModification && slot.getItem() instanceof ToolCore) return false;
if (!Config.easyToolModification && slot.getItem() instanceof ToolCore) return false;
if (slot.getItem() instanceof ToolCore) toolFound = true;
@@ -48,7 +48,7 @@ public class IguanaToolBuildRecipe implements IRecipe {
if (inputs.size() < 2) return false;
// Only modification allowed and no tool found
if (!IguanaConfig.easyToolCreation && !toolFound) return false;
if (!Config.easyToolCreation && !toolFound) return false;
// Make sure size is 4 "itemstacks"
while (inputs.size() < 4) inputs.add(null);
@@ -57,7 +57,7 @@ public class IguanaToolBuildRecipe implements IRecipe {
for (int i1 = 0; i1 < 4; ++i1)
{
ItemStack input1 = inputs.get(i1);
if (input1 == null || !IguanaConfig.easyToolCreation && !(input1.getItem() instanceof ToolCore)) continue;
if (input1 == null || !Config.easyToolCreation && !(input1.getItem() instanceof ToolCore)) continue;
for (int i2 = 0; i2 < 4; ++i2)
{
@@ -78,7 +78,7 @@ public class IguanaToolBuildRecipe implements IRecipe {
if (i3 == i4) continue;
// try to build / modify something
if (IguanaConfig.easyToolCreation && !toolFound)
if (Config.easyToolCreation && !toolFound)
output = ToolBuilder.instance.buildTool(input1, input2, input3, input4, "");
else if (input1.getItem() instanceof ToolCore && input1.hasTagCompound() && input1.getTagCompound().getCompoundTag("InfiTool") != null)
output = ModifyBuilder.instance.modifyItem(input1, new ItemStack[] {input2, input3, input4});
@@ -87,7 +87,7 @@ public class IguanaToolBuildRecipe implements IRecipe {
if (output != null) return true;
// Only tool modification allowed so input4 will always be null
if (!IguanaConfig.easyToolCreation) break;
if (!Config.easyToolCreation) break;
}
}
}
@@ -1,6 +1,5 @@
package iguanaman.iguanatweakstconstruct.old;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
@@ -8,14 +7,14 @@ 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 iguanaman.iguanatweakstconstruct.leveling.Leveling;
import iguanaman.iguanatweakstconstruct.leveling.IguanaToolLeveling;
import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandLevelUpTool;
import iguanaman.iguanatweakstconstruct.leveling.commands.IguanaCommandToolXP;
import iguanaman.iguanatweakstconstruct.leveling.commands.debug;
import iguanaman.iguanatweakstconstruct.proxy.CommonProxy;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import iguanaman.iguanatweakstconstruct.util.Log;
import mantle.pulsar.config.ForgeCFG;
import mantle.pulsar.control.PulseManager;
import mantle.pulsar.pulse.PulseMeta;
@@ -30,11 +29,11 @@ import java.util.List;
public class IguanaTweaksTConstructOld {
// The instance of your mod that Forge uses.
@Instance(IguanaReference.MOD_ID)
@Instance(Reference.MOD_ID)
public static IguanaTweaksTConstructOld instance;
// Says where the client and server 'proxy' code is loaded.
@SidedProxy(clientSide=IguanaReference.PROXY_CLIENT_CLASS, serverSide=IguanaReference.PROXY_SERVER_CLASS)
@SidedProxy(clientSide= Reference.PROXY_CLIENT_CLASS, serverSide= Reference.PROXY_SERVER_CLASS)
public static CommonProxy proxy;
public static List<Item> toolParts = null;
@@ -42,7 +41,7 @@ public class IguanaTweaksTConstructOld {
// TODO: decide wether or not the same cfg as tcon should be used
// use the PulseManager. This allows us to separate the different parts into independend modules and have stuff together. yay.
private ForgeCFG pulseCFG = new ForgeCFG("TinkersModules", "Addon: Iguana Tweaks for Tinkers Construct");
private PulseManager pulsar = new PulseManager(IguanaReference.MOD_ID, pulseCFG);
private PulseManager pulsar = new PulseManager(Reference.MOD_ID, pulseCFG);
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
@@ -50,7 +49,7 @@ public class IguanaTweaksTConstructOld {
//proxy.registerSounds();
//NetworkRegistry.INSTANCE.registerGuiHandler(instance, proxy);
IguanaConfig.init(event.getSuggestedConfigurationFile());
Config.init(event.getSuggestedConfigurationFile());
toolParts = Arrays.asList (
TinkerTools.toolRod, TinkerTools.pickaxeHead, TinkerTools.shovelHead, TinkerTools.hatchetHead,
@@ -64,7 +63,7 @@ public class IguanaTweaksTConstructOld {
//IguanaBlocks.init();
//IguanaItems.init();
pulsar.registerPulse(new Leveling());
pulsar.registerPulse(new IguanaToolLeveling());
pulsar.preInit(event);
}
@@ -85,7 +84,7 @@ public class IguanaTweaksTConstructOld {
// TODO: need to re-implement harvest level tweaks
//HarvestLevelTweaks.init();
IguanaLog.info("Starting event handler");
Log.info("Starting event handler");
//MinecraftForge.EVENT_BUS.register(new IguanaEventHandler());
pulsar.postInit(event);
@@ -95,12 +94,12 @@ public class IguanaTweaksTConstructOld {
public void serverStarting(FMLServerStartingEvent event)
{
// TODO: change this to a proper isModuleLoaded or something in Pulsar 0.4+ (when released/implemented)
PulseMeta meta = new PulseMeta(IguanaReference.PULSE_LEVELING, "", false, false);
PulseMeta meta = new PulseMeta(Reference.PULSE_LEVELING, "", false, false);
if (pulseCFG.isModuleEnabled(meta))
{
IguanaLog.debug("Adding command: leveluptool");
Log.debug("Adding command: leveluptool");
event.registerServerCommand(new IguanaCommandLevelUpTool());
IguanaLog.debug("Adding command: toolxp");
Log.debug("Adding command: toolxp");
event.registerServerCommand(new IguanaCommandToolXP());
event.registerServerCommand(new debug());
}
@@ -109,7 +108,7 @@ public class IguanaTweaksTConstructOld {
public static String getHarvestLevelName (int num)
{
if (IguanaConfig.pickaxeBoostRequired && num > 1) --num;
if (Config.pickaxeBoostRequired && num > 1) --num;
switch (num)
{
case 0: return "\u00a77Stone";
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.gui;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.InventoryPlayer;
@@ -132,7 +132,7 @@ public class IguanaPartCrafterGui extends NewContainerGui
public static String getHarvestLevelName (int num)
{
return IguanaReference.getHarvestLevelName(num);
return Reference.getHarvestLevelName(num);
}
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/toolparts.png");
@@ -5,7 +5,7 @@ import java.text.DecimalFormat;
import java.util.Arrays;
import java.util.List;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiTextField;
import net.minecraft.entity.player.InventoryPlayer;
@@ -402,7 +402,7 @@ public class IguanaToolStationGui extends NewContainerGui
String getHarvestLevelName (int num)
{
return IguanaReference.getHarvestLevelName(num);
return Reference.getHarvestLevelName(num);
}
private static final ResourceLocation background = new ResourceLocation("tinker", "textures/gui/toolstation.png");
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.items;
import iguanaman.iguanatweakstconstruct.reference.IguanaItems;
import iguanaman.iguanatweakstconstruct.old.IguanaItems;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.passive.EntityCow;
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.items;
import iguanaman.iguanatweakstconstruct.reference.IguanaItems;
import iguanaman.iguanatweakstconstruct.old.IguanaItems;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemBucketMilk;
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.items;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import java.util.List;
@@ -64,7 +64,7 @@ public class IguanaItemSkull extends ItemSkull {
@SuppressWarnings({ "rawtypes", "unchecked" })
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
if (IguanaConfig.mobHeadPickaxeBoost)
if (Config.mobHeadPickaxeBoost)
{
int meta = par1ItemStack.getItemDamage();
switch (meta)
@@ -1,10 +1,10 @@
package iguanaman.iguanatweakstconstruct.old.items;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import java.util.List;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import tconstruct.library.TConstructRegistry;
@@ -24,7 +24,7 @@ public class IguanaToolPart extends ToolPart {
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4)
{
tconstruct.library.tools.ToolMaterial material = TConstructRegistry.getMaterial(par1ItemStack.getItemDamage());
if (!IguanaConfig.allowStoneTools && material.materialName.equals("Stone"))
if (!Config.allowStoneTools && material.materialName.equals("Stone"))
{
par3List.add("\u00a74Can only be used to make casts,");
par3List.add("\u00a74cannot be used to make a tool");
@@ -36,7 +36,7 @@ public class IguanaToolPart extends ToolPart {
if (partName.equals("PickHead") || partName.equals("HammerHead") || partName.equals("ShovelHead")
|| partName.equals("ExcavatorHead"))
par3List.add("Mining Level: " + IguanaReference.getHarvestLevelName(material.harvestLevel));
par3List.add("Mining Level: " + Reference.getHarvestLevelName(material.harvestLevel));
if (
partName.equals("PickHead") || partName.equals("HammerHead") || partName.equals("ShovelHead") || partName.equals("ExcavatorHead")
@@ -54,7 +54,7 @@ public class IguanaToolPart extends ToolPart {
par3List.add("Durability: " + material.durability);
}
if (IguanaConfig.partReplacement)
if (Config.partReplacement)
if (material.ability.equals("Writable") || material.ability.equals("Thaumic"))
{
par3List.add("\u00a74Cannot be replaced once added,");
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.modifiers;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.util.Log;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.library.crafting.ToolBuilder;
@@ -50,7 +50,7 @@ public class IguanaModClean extends ItemModifier {
}
// Create blank tool
IguanaLog.info("replacing tool");
Log.info("replacing tool");
tool = ToolBuilder.instance.buildTool(headStack, handleStack, accessoryStack, extraStack, name);
}
@@ -3,7 +3,7 @@ package iguanaman.iguanatweakstconstruct.old.modifiers;
import java.util.ArrayList;
import java.util.List;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.items.tools.Hammer;
@@ -67,7 +67,7 @@ public class IguanaModHeads extends ItemModifier {
List<String> tips = new ArrayList<String>();
List<String> modifierTips = new ArrayList<String>();
tips.add("Mining Level: " + IguanaReference.getHarvestLevelName(toolTag.getInteger("HarvestLevel")));
tips.add("Mining Level: " + Reference.getHarvestLevelName(toolTag.getInteger("HarvestLevel")));
modifierTips.add("");
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.modifiers;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import java.util.ArrayList;
import java.util.Arrays;
@@ -152,7 +152,7 @@ public class IguanaModRedstone extends ItemModifier {
List<String> tips = new ArrayList<String>();
List<String> modifierTips = new ArrayList<String>();
if (IguanaConfig.showTooltipXP)
if (Config.showTooltipXP)
{
int level = tags.getInteger("ToolLevel");
if (level <= 5)
@@ -161,7 +161,7 @@ public class IguanaModRedstone extends ItemModifier {
modifierTips.add("");
}
if (IguanaConfig.levelingPickaxeBoost)
if (Config.levelingPickaxeBoost)
{
int hLevel = tags.hasKey("HarvestLevel") ? hLevel = tags.getInteger("HarvestLevel") : -1;
if (hLevel >= TConstructRegistry.getMaterial("Copper").harvestLevel() && hLevel < TConstructRegistry.getMaterial("Manyullyn").harvestLevel()
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.old.modifiers;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.library.crafting.PatternBuilder;
@@ -106,14 +106,14 @@ public class IguanaModRepair extends ItemModifier {
float repairCount = (float)repair / (float)durtotal;
if (IguanaConfig.repairLimitActive && repairCount >= IguanaConfig.repairLimit)
if (Config.repairLimitActive && repairCount >= Config.repairLimit)
return 0;
increase = Math.round(increase / (IguanaConfig.repairCostPercentage / 100f));
increase = Math.round(increase / (Config.repairCostPercentage / 100f));
if (IguanaConfig.repairCostScaling)
if (Config.repairCostScaling)
{
repairCount /= IguanaConfig.repairScalingModifier;
repairCount /= Config.repairScalingModifier;
repairCount += 1F;
increase = Math.round(increase / repairCount);
}
@@ -2,14 +2,14 @@ package iguanaman.iguanatweakstconstruct.old.modifiers;
import iguanaman.iguanatweakstconstruct.leveling.LevelingLogic;
import iguanaman.iguanatweakstconstruct.leveling.LevelingTooltips;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.IguanaTweaksTConstruct;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import iguanaman.iguanatweakstconstruct.reference.Reference;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import tconstruct.items.tools.Hammer;
@@ -155,7 +155,7 @@ public class IguanaModUpgrade extends ItemModifier {
// Check for stone parts
if (inputStack.getItemDamage() == 1)
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedFlintParts.contains(partIndex+1)) return false;
if (!Config.allowStoneTools || Config.restrictedFlintParts.contains(partIndex+1)) return false;
}
// Check if have enough free modifiers to replace written/thaumic parts
@@ -391,7 +391,7 @@ public class IguanaModUpgrade extends ItemModifier {
//add mining level tooltip
if (tool.getItem() instanceof Pickaxe || tool.getItem() instanceof Hammer)
{
String mLevel = IguanaReference.getHarvestLevelName(tags.getInteger("HarvestLevel"));
String mLevel = Reference.getHarvestLevelName(tags.getInteger("HarvestLevel"));
tips.add("Mining Level: " + mLevel);
modifierTips.add("");
}
@@ -401,7 +401,7 @@ public class IguanaModUpgrade extends ItemModifier {
tips.add(LevelingTooltips.getLevelTooltip(level));
modifierTips.add("");
if (IguanaConfig.showTooltipXP)
if (Config.showTooltipXP)
{
/*
if (level <= 5)
@@ -2,7 +2,7 @@ package iguanaman.iguanatweakstconstruct.old.proxy;
import cpw.mods.fml.client.registry.ClientRegistry;
import iguanaman.iguanatweakstconstruct.old.blocks.IguanaTileEntitySkull;
import iguanaman.iguanatweakstconstruct.proxy.CommonProxy;
import iguanaman.iguanatweakstconstruct.old.proxy.CommonProxy;
import iguanaman.iguanatweakstconstruct.old.renderer.IguanaSkullRenderer;
import iguanaman.iguanatweakstconstruct.old.IguanaClientEventHandler;
import net.minecraft.entity.player.EntityPlayer;
@@ -7,8 +7,8 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.Log;
import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
@@ -38,7 +38,7 @@ public class HarvestLevelTweaks {
public static void init()
{
// TOOLS
IguanaLog.info("Modifying harvest levels of tools");
Log.info("Modifying harvest levels of tools");
ForgeHooks hooks = new ForgeHooks();
Field f = null;
try {
@@ -97,7 +97,7 @@ public class HarvestLevelTweaks {
if (harvestLevel != newHarvestLevel)
{
if (IguanaConfig.logMiningLevelChanges) IguanaLog.info("Changing mining level of " + entry.getKey().getUnlocalizedName() + " from " + harvestLevel + " to " + newHarvestLevel);
if (Config.logMiningLevelChanges) Log.info("Changing mining level of " + entry.getKey().getUnlocalizedName() + " from " + harvestLevel + " to " + newHarvestLevel);
entry.setValue(Arrays.asList(toolClass, newHarvestLevel));
}
@@ -106,7 +106,7 @@ public class HarvestLevelTweaks {
//BLOCKS
if (IguanaConfig.pickaxeBoostRequired) boostMod = 1;
if (Config.pickaxeBoostRequired) boostMod = 1;
int harvestLevelCopper = TConstructRegistry.getMaterial("Copper").harvestLevel() + boostMod;
harvestLevelIron += boostMod;
@@ -116,7 +116,7 @@ public class HarvestLevelTweaks {
harvestLevelCobalt += boostMod;
harvestLevelManyullyn += boostMod;
IguanaLog.info("Modifying required harvest levels of blocks");
Log.info("Modifying required harvest levels of blocks");
try {
f = ForgeHooks.class.getDeclaredField("toolHarvestLevels");
} catch (NoSuchFieldException e) {
@@ -164,7 +164,7 @@ public class HarvestLevelTweaks {
if (requiredHarvestLevel != newRequiredHarvestLevel)
{
if (IguanaConfig.logHarvestLevelChanges) IguanaLog.info("Changing required harvest level of " + block.getUnlocalizedName() + ":" + metadata + " from " + requiredHarvestLevel + " to " + newRequiredHarvestLevel);
if (Config.logHarvestLevelChanges) Log.info("Changing required harvest level of " + block.getUnlocalizedName() + ":" + metadata + " from " + requiredHarvestLevel + " to " + newRequiredHarvestLevel);
entry.setValue(newRequiredHarvestLevel);
}
@@ -184,7 +184,7 @@ public class HarvestLevelTweaks {
}
}
IguanaLog.info("Modifying required harvest levels of vanilla blocks");
Log.info("Modifying required harvest levels of vanilla blocks");
Blocks.obsidian.setHarvestLevel("pickaxe", harvestLevelBronze);
Blocks.diamond_ore.setHarvestLevel("pickaxe", harvestLevelBronze);
Blocks.diamond_block.setHarvestLevel("pickaxe", harvestLevelBronze);
@@ -203,9 +203,9 @@ public class HarvestLevelTweaks {
TinkerWorld.oreGravel.setHarvestLevel("shovel", harvestLevelArdite, 5);
List[] harvestLevelIds = {
IguanaConfig.harvestLevel0Ids, IguanaConfig.harvestLevel1Ids, IguanaConfig.harvestLevel2Ids,
IguanaConfig.harvestLevel3Ids, IguanaConfig.harvestLevel4Ids, IguanaConfig.harvestLevel5Ids,
IguanaConfig.harvestLevel6Ids, IguanaConfig.harvestLevel7Ids
Config.harvestLevel0Ids, Config.harvestLevel1Ids, Config.harvestLevel2Ids,
Config.harvestLevel3Ids, Config.harvestLevel4Ids, Config.harvestLevel5Ids,
Config.harvestLevel6Ids, Config.harvestLevel7Ids
};
for (int i = 0; i < oreDictLevels.length; ++i)
@@ -242,7 +242,7 @@ public class HarvestLevelTweaks {
Block block = Block.getBlockFromItem(oreStack.getItem());
if (block == Blocks.air)
{
IguanaLog.warn("Warning: " + oreStack.getUnlocalizedName() + " is invalid block");
Log.warn("Warning: " + oreStack.getUnlocalizedName() + " is invalid block");
return;
}
@@ -1,7 +1,7 @@
package iguanaman.iguanatweakstconstruct.old.tweaks;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.Log;
import tconstruct.library.TConstructRegistry;
import tconstruct.tools.TinkerTools;
import cpw.mods.fml.common.Loader;
@@ -12,10 +12,10 @@ public class MaterialTweaks {
{
// TINKERS
IguanaLog.info("Modifying TConstruct materials");
Log.info("Modifying TConstruct materials");
float durMod = IguanaConfig.durabilityPercentage / 100F;
float speedMod = IguanaConfig.miningSpeedPercentage / 100F;
float durMod = Config.durabilityPercentage / 100F;
float speedMod = Config.miningSpeedPercentage / 100F;
TConstructRegistry.toolMaterials.remove(0);
TConstructRegistry.addToolMaterial(0, "Wood", "Wooden ", 0, Math.round(59F * durMod), Math.round(150f * speedMod), 1, 1.0F, 0, 0f, "\u00A7e", "");
@@ -1,6 +1,7 @@
package iguanaman.iguanatweakstconstruct.old.tweaks;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.Log;
import iguanaman.iguanatweakstconstruct.old.modifiers.IguanaModAttack;
import iguanaman.iguanatweakstconstruct.old.modifiers.IguanaModClean;
import iguanaman.iguanatweakstconstruct.old.modifiers.IguanaModHeads;
@@ -11,7 +12,6 @@ import iguanaman.iguanatweakstconstruct.old.modifiers.IguanaModUpgrade;
import java.util.Iterator;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -32,41 +32,41 @@ public class ModifierTweaks
{
// REMOVE OLD MODIFIERS
IguanaLog.info("Removing old modifiers");
Log.info("Removing old modifiers");
Iterator<ItemModifier> i = ModifyBuilder.instance.itemModifiers.iterator();
while (i.hasNext())
{
ItemModifier mod = i.next();
if (mod.key == "Emerald" || mod.key == "Diamond" || mod.key == "Tier1Free" && IguanaConfig.toolLeveling || mod.key == "Tier2Free" || mod.key == "Moss" || mod.key == "Lapis"
if (mod.key == "Emerald" || mod.key == "Diamond" || mod.key == "Tier1Free" && Config.toolLeveling || mod.key == "Tier2Free" || mod.key == "Moss" || mod.key == "Lapis"
|| mod.key == "ModAttack" || mod.key == "Redstone" || mod.key == "")
//IguanaLog.log("Removing old " + mod.key + " modifier");
i.remove();
}
// Change recipes
if (IguanaConfig.moreExpensiveSilkyCloth)
if (Config.moreExpensiveSilkyCloth)
{
RecipeRemover.removeAnyRecipe(new ItemStack(TinkerTools.materials, 1, 25));
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 25), "sss", "sns", "sss", 'n', new ItemStack(TinkerTools.materials, 1, 14), 's', new ItemStack(Items.string)); //Silky Cloth
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 25), "sss", "sns", "sss", 'n', new ItemStack(Items.gold_ingot), 's', new ItemStack(Items.string)); //Silky Cloth
}
if (IguanaConfig.moreExpensiveSilkyJewel)
if (Config.moreExpensiveSilkyJewel)
{
RecipeRemover.removeAnyRecipe(new ItemStack(TinkerTools.materials, 1, 26));
GameRegistry.addRecipe(new ItemStack(TinkerTools.materials, 1, 26), " c ", "cec", " c ", 'c', new ItemStack(TinkerTools.materials, 1, 25), 'e', new ItemStack(Blocks.emerald_block)); //Silky Jewel
}
// REPLACE OLD MODIFIERS
IguanaLog.info("Replacing old modifiers");
Log.info("Replacing old modifiers");
if (IguanaConfig.partReplacement)
if (Config.partReplacement)
ModifyBuilder.registerModifier(new IguanaModUpgrade());
ModifyBuilder.registerModifier(new IguanaModRepair());
// TODO: Find a way to replace vanilla skull
/*if (!IguanaConfig.toolLevelingRandomBonuses)
ModifyBuilder.registerModifier(new ModExtraModifier(new ItemStack[] { new ItemStack(Items.sk, 1, 6), new ItemStack(Item.skull, 1, 7) }, "Tier2Free"));*/
ModifyBuilder.registerModifier(new ModInteger(new ItemStack[] { new ItemStack(TinkerTools.materials, 1, 6) }, 4, "Moss", IguanaConfig.mossRepairSpeed, "\u00a72", "Auto-Repair"));
ModifyBuilder.registerModifier(new ModInteger(new ItemStack[] { new ItemStack(TinkerTools.materials, 1, 6) }, 4, "Moss", Config.mossRepairSpeed, "\u00a72", "Auto-Repair"));
ModifyBuilder.registerModifier(new ModDurability(new ItemStack[] { new ItemStack(Items.emerald) }, 1, 0, 0.5f, TConstructRegistry.getMaterial("Bronze").harvestLevel(), "Emerald",
"\u00a72Durability +50%", "\u00a72"));
ModifyBuilder.registerModifier(new ModDurability(new ItemStack[] { new ItemStack(Items.diamond) }, 0, 500, 0f, 0, "Diamond", "\u00a7bDurability +500", "\u00a7b"));
@@ -92,13 +92,13 @@ public class ModifierTweaks
ModifyBuilder.registerModifier(new IguanaModRedstone(new ItemStack[] { redstoneBlock, redstoneBlock }, 2, 18));
// CLEAN MODIFIER
if (IguanaConfig.addCleanModifier)
if (Config.addCleanModifier)
ModifyBuilder.registerModifier(new IguanaModClean());
// MINING BOOST MODIFIERS
if (IguanaConfig.mobHeadPickaxeBoost)
if (Config.mobHeadPickaxeBoost)
{
IguanaLog.info("Adding mob head modifiers");
Log.info("Adding mob head modifiers");
// add modifers
ModifyBuilder.registerModifier(new IguanaModHeads(new ItemStack[] { new ItemStack(Items.skull, 1, 0) }, 20, TConstructRegistry.getMaterial("Iron").harvestLevel(), "Skeleton Skull",
@@ -125,9 +125,9 @@ public class ModifierTweaks
}
// LEVELING MODIFIER
if (IguanaConfig.toolLeveling)
if (Config.toolLeveling)
{
IguanaLog.info("Adding leveling active modifier");
Log.info("Adding leveling active modifier");
//TConstructRegistry.activeModifiers.add(0, new IguanaActiveToolMod());
}
}
@@ -1,7 +1,7 @@
package iguanaman.iguanatweakstconstruct.old.tweaks;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.Log;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -12,33 +12,33 @@ public class RemoveVanillaTools {
public static void init()
{
//Remove vanilla tools
IguanaLog.info("Removing vanilla tool recipes");
Log.info("Removing vanilla tool recipes");
//Wood
if (IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedWoodParts.contains(2) || IguanaConfig.restrictedWoodParts.contains(9))
if (Config.restrictedWoodParts.contains(1) || Config.restrictedWoodParts.contains(2) || Config.restrictedWoodParts.contains(9))
RemoveVanillaTool(Items.wooden_pickaxe);
if (IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedWoodParts.contains(3))
if (Config.restrictedWoodParts.contains(1) || Config.restrictedWoodParts.contains(3))
RemoveVanillaTool(Items.wooden_shovel);
if (IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedWoodParts.contains(4))
if (Config.restrictedWoodParts.contains(1) || Config.restrictedWoodParts.contains(4))
RemoveVanillaTool(Items.wooden_axe);
if (IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedWoodParts.contains(5) || IguanaConfig.restrictedWoodParts.contains(6))
if (Config.restrictedWoodParts.contains(1) || Config.restrictedWoodParts.contains(5) || Config.restrictedWoodParts.contains(6))
RemoveVanillaTool(Items.wooden_sword);
//Stone
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedWoodParts.contains(1)
|| IguanaConfig.restrictedFlintParts.contains(2) || IguanaConfig.restrictedWoodParts.contains(9))
if (!Config.allowStoneTools || Config.restrictedWoodParts.contains(1)
|| Config.restrictedFlintParts.contains(2) || Config.restrictedWoodParts.contains(9))
RemoveVanillaTool(Items.stone_pickaxe);
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedFlintParts.contains(3))
if (!Config.allowStoneTools || Config.restrictedWoodParts.contains(1) || Config.restrictedFlintParts.contains(3))
RemoveVanillaTool(Items.stone_shovel);
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedFlintParts.contains(4))
if (!Config.allowStoneTools || Config.restrictedWoodParts.contains(1) || Config.restrictedFlintParts.contains(4))
RemoveVanillaTool(Items.stone_axe);
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedWoodParts.contains(1) || IguanaConfig.restrictedFlintParts.contains(5) || IguanaConfig.restrictedWoodParts.contains(6))
if (!Config.allowStoneTools || Config.restrictedWoodParts.contains(1) || Config.restrictedFlintParts.contains(5) || Config.restrictedWoodParts.contains(6))
RemoveVanillaTool(Items.stone_sword);
}
@@ -1,8 +1,8 @@
package iguanaman.iguanatweakstconstruct.old.tweaks;
import iguanaman.iguanatweakstconstruct.util.IguanaLog;
import iguanaman.iguanatweakstconstruct.reference.Config;
import iguanaman.iguanatweakstconstruct.util.Log;
import iguanaman.iguanatweakstconstruct.IguanaTweaksTConstruct;
import iguanaman.iguanatweakstconstruct.reference.IguanaConfig;
import iguanaman.iguanatweakstconstruct.old.IguanaPartBuildRecipe;
import iguanaman.iguanatweakstconstruct.old.IguanaToolBuildRecipe;
@@ -37,27 +37,27 @@ public class VariousTweaks {
}
catch (Exception e)
{
IguanaLog.warn("Failed to suppress missing tool logs");
Log.warn("Failed to suppress missing tool logs");
e.printStackTrace();
}
//REMOVE STONE TORCH
if (IguanaConfig.removeStoneTorchRecipe)
if (Config.removeStoneTorchRecipe)
{
IguanaLog.info("Removing stone torch recipe");
Log.info("Removing stone torch recipe");
RecipeRemover.removeAnyRecipe(new ItemStack(TinkerWorld.stoneTorch, 4));
}
// GRAVEL TO FLINT RECIPE
if (IguanaConfig.addFlintRecipe) {
IguanaLog.info("Adding gravel to flint recipe");
if (Config.addFlintRecipe) {
Log.info("Adding gravel to flint recipe");
GameRegistry.addShapelessRecipe(new ItemStack(Items.flint), new Object[] {Blocks.gravel, Blocks.gravel, Blocks.gravel, Blocks.gravel});
}
//SOFTEN SEARED BLOCKS
IguanaLog.info("Softening seared blocks");
Log.info("Softening seared blocks");
TinkerSmeltery.smeltery.setHardness(1.5F);
TinkerSmeltery.lavaTank.setHardness(1.5F);
TinkerSmeltery.searedBlock.setHardness(1.5F);
@@ -65,7 +65,7 @@ public class VariousTweaks {
// REUSABLE PARTS
IguanaLog.info("Making non-metal parts reusable in part builder");
Log.info("Making non-metal parts reusable in part builder");
int[] nonMetals = { 0, 1, 3, 4, 5, 6, 7, 8, 9, 17 };
PatternBuilder pb = PatternBuilder.instance;
@@ -85,25 +85,25 @@ public class VariousTweaks {
// REMOVE RESTRICTED PARTS FROM TINKERS HOUSE LOOT
IguanaLog.info("Removing restricted parts from Tinker House chest");
Log.info("Removing restricted parts from Tinker House chest");
for (int i = 0; i < IguanaTweaksTConstruct.toolParts.size(); ++i)
{
Item part = IguanaTweaksTConstruct.toolParts.get(i);
if (IguanaConfig.restrictedWoodParts.contains(i+1))
if (Config.restrictedWoodParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 0));
if (!IguanaConfig.allowStoneTools || IguanaConfig.restrictedStoneParts.contains(i+1))
if (!Config.allowStoneTools || Config.restrictedStoneParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 1));
if (IguanaConfig.restrictedFlintParts.contains(i+1))
if (Config.restrictedFlintParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 3));
if (IguanaConfig.restrictedCactusParts.contains(i+1))
if (Config.restrictedCactusParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 4));
if (IguanaConfig.restrictedBoneParts.contains(i+1))
if (Config.restrictedBoneParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 5));
if (IguanaConfig.restrictedPaperParts.contains(i+1))
if (Config.restrictedPaperParts.contains(i+1))
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 9));
if (IguanaConfig.restrictedSlimeParts.contains(i+1))
if (Config.restrictedSlimeParts.contains(i+1))
{
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 8));
TinkerWorld.tinkerHouseChest.removeItem(new ItemStack(part, 1, 17));
@@ -120,17 +120,17 @@ public class VariousTweaks {
// SIMPLE WOOD PATTERN CRAFTING RECIPE
if (IguanaConfig.easyBlankPatternRecipe)
if (Config.easyBlankPatternRecipe)
{
IguanaLog.info("Adding easy blank pattern recipe");
Log.info("Adding easy blank pattern recipe");
GameRegistry.addShapedRecipe(new ItemStack(TinkerTools.blankPattern), "ss", "ss", 's', new ItemStack(Items.stick));
}
//ROTATING PATTERN CRAFTING
if (IguanaConfig.easyPatternCrafting)
if (Config.easyPatternCrafting)
{
IguanaLog.info("Adding rotating pattern crafting recipes");
Log.info("Adding rotating pattern crafting recipes");
// TODO: Find Crafting Handler replacement
//GameRegistry.registerCraftingHandler(new IguanaPatternCraftingHandler());
@@ -144,10 +144,10 @@ public class VariousTweaks {
List<Integer> patternIds = new ArrayList<Integer>();
for (int x = 1; x < patternName.length; x++)
if (!IguanaConfig.restrictedBoneParts.contains(x) || !IguanaConfig.restrictedCactusParts.contains(x)
|| !IguanaConfig.restrictedFlintParts.contains(x) || !IguanaConfig.restrictedPaperParts.contains(x)
|| !IguanaConfig.restrictedSlimeParts.contains(x) || !IguanaConfig.restrictedWoodParts.contains(x)
|| IguanaConfig.allowStoneTools && !IguanaConfig.restrictedFlintParts.contains(x)
if (!Config.restrictedBoneParts.contains(x) || !Config.restrictedCactusParts.contains(x)
|| !Config.restrictedFlintParts.contains(x) || !Config.restrictedPaperParts.contains(x)
|| !Config.restrictedSlimeParts.contains(x) || !Config.restrictedWoodParts.contains(x)
|| Config.allowStoneTools && !Config.restrictedFlintParts.contains(x)
|| x >= 23)
patternIds.add(x);
@@ -165,9 +165,9 @@ public class VariousTweaks {
// ALTERNATIVE PART CRAFTING
if (IguanaConfig.easyPartCrafting)
if (Config.easyPartCrafting)
{
IguanaLog.info("Adding easy part crafting");
Log.info("Adding easy part crafting");
GameRegistry.addRecipe(new IguanaPartBuildRecipe());
// TODO: Find crafting Handler replacement
//GameRegistry.registerCraftingHandler(new IguanaPartCraftingHandler());
@@ -175,9 +175,9 @@ public class VariousTweaks {
// ALTERNATIVE TOOL CRAFTING
if (IguanaConfig.easyToolCreation || IguanaConfig.easyToolModification)
if (Config.easyToolCreation || Config.easyToolModification)
{
IguanaLog.info("Adding easy tool crafting");
Log.info("Adding easy tool crafting");
GameRegistry.addRecipe(new IguanaToolBuildRecipe());
}
@@ -11,7 +11,7 @@ import java.util.List;
public class IguanaConfig {
public class Config {
// Item Ids
/*
@@ -1,6 +1,6 @@
package iguanaman.iguanatweakstconstruct.reference;
public class IguanaReference {
public class Reference {
public static final String MOD_ID = "IguanaTweaksTConstruct";
public static final String MOD_NAME = "Iguana Tweaks for Tinker's Construct";
public static final String TCON_MOD_ID = "TConstruct";
@@ -12,7 +12,7 @@ public class IguanaReference {
public static String getHarvestLevelName (int num)
{
if (IguanaConfig.pickaxeBoostRequired && num > 1) --num;
if (Config.pickaxeBoostRequired && num > 1) --num;
switch (num)
{
case 0: return "\u00a77Stone";
@@ -1,13 +1,9 @@
package iguanaman.iguanatweakstconstruct.util;
import cpw.mods.fml.common.FMLLog;
import iguanaman.iguanatweakstconstruct.reference.IguanaReference;
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;
import java.util.logging.LogManager;
public class IguanaLog {
public class Log {
private static Logger logger = org.apache.logging.log4j.LogManager.getLogger("Iguana-TCon");
public static void log(Level level, Object obj)