Skip to content

Commit

Permalink
Merge pull request #36 from TPPI-Dev/Dev
Browse files Browse the repository at this point in the history
Merge Dev into Master
  • Loading branch information
tterrag1098 committed Feb 5, 2014
2 parents f569439 + 2136a6f commit 2af5d99
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion mod.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version.minecraft=1.6.X
version.number=0.8.0
version.number=0.8.1
version.build=

mod.id=TPPITweaks
Expand Down
2 changes: 1 addition & 1 deletion src/tppitweaks/TPPITweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class)
public class TPPITweaks {

public static final String VERSION = "0.8.0";
public static final String VERSION = "0.8.1";

@Instance("TPPITweaks")
public static TPPITweaks instance;
Expand Down
33 changes: 27 additions & 6 deletions src/tppitweaks/client/gui/InstructionsGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.UIManager;
import javax.swing.filechooser.FileFilter;

import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
Expand All @@ -28,7 +29,9 @@ public class InstructionsGui extends GuiScreen
{

ModDownload mod;
boolean hasOpened = false;
int hasOpened = 0;

private static File lastDir = FileUtils.getUserDirectory();

public InstructionsGui(ModDownload modDownload)
{
Expand Down Expand Up @@ -56,6 +59,8 @@ public void drawScreen(int par1, int par2, float par3)
this.drawCenteredString(this.fontRenderer, "Select the file from your computer and it will be added to the mods directory.", this.width / 2, this.height / 2 - 15, 0xFFFFFF);
this.drawCenteredString(this.fontRenderer, "3. Press the button below to continue.", this.width / 2, this.height / 2 + 55, 0xFFFFFF);

hasOpened = hasOpened <= 0 ? 0 : hasOpened - 1;

super.drawScreen(par1, par2, par3);
}

Expand All @@ -77,7 +82,7 @@ public void actionPerformed(GuiButton button)
break;

case 12:
if (!hasOpened)
if (hasOpened == 0)
{
try
{
Expand All @@ -101,10 +106,26 @@ protected JDialog createDialog(Component parent) throws HeadlessException
return dialog;
}
};

fc.setCurrentDirectory(FileUtils.getUserDirectory());

fc.setFileFilter(new FileFilter()
{
@Override
public String getDescription()
{
return "*.jar, *.zip";
}

@Override
public boolean accept(File arg0)
{
return (arg0.getName().endsWith(".zip") || arg0.getName().endsWith(".jar") || arg0.isDirectory());
}
});

fc.setCurrentDirectory(lastDir);
fc.showOpenDialog(new JFrame());
File mod = fc.getSelectedFile();
lastDir = mod == null ? lastDir : mod.getParentFile();
try
{
if (mod != null)
Expand All @@ -114,12 +135,12 @@ protected JDialog createDialog(Component parent) throws HeadlessException
{
e.printStackTrace();
}
hasOpened = true;
hasOpened = 50;
}
break;

default:
hasOpened = false;
hasOpened = 0;
GuiHelper.updateGui.actionPerformed(button);
}

Expand Down
7 changes: 6 additions & 1 deletion src/tppitweaks/client/gui/UpdateGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@
import java.util.List;
import java.util.logging.Level;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.util.ChatMessageComponent;

import org.lwjgl.input.Keyboard;

Expand Down Expand Up @@ -45,7 +47,10 @@ public UpdateGui(GuiScreen parentScreen, boolean firstTime)
this.parentScreen = parentScreen;

initModInstallationMenus();


if (modScreens.isEmpty())
Minecraft.getMinecraft().thePlayer.sendChatToPlayer(new ChatMessageComponent().addText("You have all optional mods installed!"));

for (InstructionsGui g : modScreens)
{
if (!Loader.isModLoaded(g.mod.modid))
Expand Down
2 changes: 1 addition & 1 deletion src/tppitweaks/item/TPPIBook.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla
{
GuiHelper.doGuideGUI();
}
else if (stack.stackTagCompound == null || !stack.getTagCompound().getString("version").equals(TPPITweaks.VERSION))
else if (stack.stackTagCompound == null || !stack.getTagCompound().getString("version").equals(TPPITweaks.VERSION) || stack.getItemDamage() == 1)
{
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
{
Expand Down
2 changes: 1 addition & 1 deletion src/tppitweaks/lib/Reference.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ public class Reference
+ "after:Mekanism";


public static final String PACK_VERSION = "0.2.0";
public static final String PACK_VERSION = "0.2.1";

}
6 changes: 5 additions & 1 deletion src/tppitweaks/recipetweaks/RecipeTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@
import java.util.List;
import java.util.ListIterator;

import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import tppitweaks.config.ConfigurationHandler;
import tppitweaks.recipetweaks.modTweaks.AM2Tweaks;
import tppitweaks.recipetweaks.modTweaks.BigReactorsTweaks;
Expand All @@ -26,6 +28,7 @@
import tppitweaks.recipetweaks.modTweaks.SFMTweaks;
import tppitweaks.recipetweaks.modTweaks.TweakerBase;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.registry.GameRegistry;

public class RecipeTweaks
{
Expand Down Expand Up @@ -199,7 +202,8 @@ private static void addRevisedRecipes()

if (okayToTweakMekanism && ConfigurationHandler.harderDisassemblerRecipe)
MekanismTweaks.addRecipes();


GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint}));
}

/**
Expand Down
7 changes: 4 additions & 3 deletions src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,14 @@ public static void init()
public static void addRecipes()
{
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{
"DtD",
"DoD",
"AtA",
"ADA",
" o ",

'D', new ItemStack(ModItems.tppiMaterial, 1, 2),
't', mekanism.common.Mekanism.EnergyTablet,
'o', "ingotRefinedObsidian"
'o', "ingotRefinedObsidian",
'A', mekanism.common.Mekanism.AtomicCore
}));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mekanism.common.Mekanism.AtomicCore), new Object[]{
Expand Down

0 comments on commit 2af5d99

Please sign in to comment.