mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 11:59:14 +00:00
Upload my Code Changes/Format/imports
This commit is contained in:
1 parent
5bcdb7ca46
commit
5d4e38c0cb
264 files changed
+4014
-3972
No files matched your search
@@ -17,7 +17,18 @@ public class ModAutoSmelt extends ModBoolean
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
if (tags.getBoolean("Silk Touch"))
|
||||
return false;
|
||||
return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist
|
||||
return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); // Will
|
||||
// fail
|
||||
// if
|
||||
// the
|
||||
// modifier
|
||||
// is
|
||||
// false
|
||||
// or
|
||||
// the
|
||||
// tag
|
||||
// doesn't
|
||||
// exist
|
||||
}
|
||||
|
||||
}
|
||||
@@ -22,7 +22,18 @@ public class ModBoolean extends ToolMod
|
||||
protected boolean canModify (ItemStack tool, ItemStack[] input)
|
||||
{
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); //Will fail if the modifier is false or the tag doesn't exist
|
||||
return tags.getInteger("Modifiers") > 0 && !tags.getBoolean(key); // Will
|
||||
// fail
|
||||
// if
|
||||
// the
|
||||
// modifier
|
||||
// is
|
||||
// false
|
||||
// or
|
||||
// the
|
||||
// tag
|
||||
// doesn't
|
||||
// exist
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -31,7 +42,7 @@ public class ModBoolean extends ToolMod
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
|
||||
tags.setBoolean(key, true);
|
||||
//TConstruct.logger.info("Key: "+key+" "+tags.getBoolean(key));
|
||||
// TConstruct.logger.info("Key: "+key+" "+tags.getBoolean(key));
|
||||
|
||||
int modifiers = tags.getInteger("Modifiers");
|
||||
modifiers -= 1;
|
||||
|
||||
@@ -95,7 +95,7 @@ public class ModRedstone extends ToolModTypeFilter
|
||||
|
||||
if (tags.hasKey("DrawSpeed"))
|
||||
{
|
||||
//int drawSpeed = tags.getInteger("DrawSpeed");
|
||||
// int drawSpeed = tags.getInteger("DrawSpeed");
|
||||
int baseDrawSpeed = tags.getInteger("BaseDrawSpeed");
|
||||
int drawSpeed = (int) (baseDrawSpeed - (0.1f * baseDrawSpeed * (keyPair[0] / 50f)));
|
||||
tags.setInteger("DrawSpeed", drawSpeed);
|
||||
|
||||
@@ -47,7 +47,7 @@ public class ModReinforced extends ModInteger
|
||||
String tip = "Tooltip" + tipNum;
|
||||
if (!tags.hasKey(tip))
|
||||
{
|
||||
//tags.setString(tip, tooltip);
|
||||
// tags.setString(tip, tooltip);
|
||||
String modTip = "ModifierTip" + tipNum;
|
||||
String tag = tags.getString(modTip);
|
||||
tags.setString(modTip, getProperName(modifierTip, tag));
|
||||
@@ -59,7 +59,7 @@ public class ModReinforced extends ModInteger
|
||||
String tag = tags.getString(modTip);
|
||||
if (tag.contains(modifierTip))
|
||||
{
|
||||
//tags.setString(tip, getProperName(tooltip, tag));
|
||||
// tags.setString(tip, getProperName(tooltip, tag));
|
||||
tag = tags.getString(modTip);
|
||||
tags.setString(modTip, getProperName(modifierTip, tag));
|
||||
return tipNum;
|
||||
|
||||
@@ -59,7 +59,7 @@ public class TActiveOmniMod extends ActiveToolMod
|
||||
World world = entity.worldObj;
|
||||
Block block = entity.worldObj.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
//TODO do we need the next to lines????????
|
||||
// TODO do we need the next to lines????????
|
||||
if (block == null)
|
||||
return false;
|
||||
|
||||
|
||||
@@ -21,11 +21,14 @@ public abstract class ToolModTypeFilter extends ToolMod
|
||||
}
|
||||
}
|
||||
|
||||
/** Checks to see if the inputs match the stored items
|
||||
* Note: Filters types, doesn't care about amount
|
||||
/**
|
||||
* Checks to see if the inputs match the stored items Note: Filters types,
|
||||
* doesn't care about amount
|
||||
*
|
||||
* @param input The ItemStacks to compare against
|
||||
* @param tool Item to modify, used for restrictions
|
||||
* @param input
|
||||
* The ItemStacks to compare against
|
||||
* @param tool
|
||||
* Item to modify, used for restrictions
|
||||
* @return Whether the recipe matches the input
|
||||
*/
|
||||
@Override
|
||||
@@ -91,10 +94,13 @@ public abstract class ToolModTypeFilter extends ToolMod
|
||||
return amount;
|
||||
}
|
||||
|
||||
/** Adds a new itemstack to the list for increases
|
||||
/**
|
||||
* Adds a new itemstack to the list for increases
|
||||
*
|
||||
* @param stack ItemStack to compare against
|
||||
* @param amount Amount to increase
|
||||
* @param stack
|
||||
* ItemStack to compare against
|
||||
* @param amount
|
||||
* Amount to increase
|
||||
*/
|
||||
public void addStackToMatchList (ItemStack stack, int amount)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user