Skip to content

Commit 2af5d99

Browse files
committed
Merge pull request #36 from TPPI-Dev/Dev
Merge Dev into Master
2 parents f569439 + 2136a6f commit 2af5d99

File tree

8 files changed

+46
-15
lines changed

8 files changed

+46
-15
lines changed

mod.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
version.minecraft=1.6.X
2-
version.number=0.8.0
2+
version.number=0.8.1
33
version.build=
44

55
mod.id=TPPITweaks

src/tppitweaks/TPPITweaks.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
@NetworkMod(serverSideRequired = true, clientSideRequired = true, channels = { Reference.CHANNEL }, packetHandler = PacketHandler.class)
3535
public class TPPITweaks {
3636

37-
public static final String VERSION = "0.8.0";
37+
public static final String VERSION = "0.8.1";
3838

3939
@Instance("TPPITweaks")
4040
public static TPPITweaks instance;

src/tppitweaks/client/gui/InstructionsGui.java

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import javax.swing.JFileChooser;
1212
import javax.swing.JFrame;
1313
import javax.swing.UIManager;
14+
import javax.swing.filechooser.FileFilter;
1415

1516
import net.minecraft.client.gui.GuiButton;
1617
import net.minecraft.client.gui.GuiScreen;
@@ -28,7 +29,9 @@ public class InstructionsGui extends GuiScreen
2829
{
2930

3031
ModDownload mod;
31-
boolean hasOpened = false;
32+
int hasOpened = 0;
33+
34+
private static File lastDir = FileUtils.getUserDirectory();
3235

3336
public InstructionsGui(ModDownload modDownload)
3437
{
@@ -56,6 +59,8 @@ public void drawScreen(int par1, int par2, float par3)
5659
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);
5760
this.drawCenteredString(this.fontRenderer, "3. Press the button below to continue.", this.width / 2, this.height / 2 + 55, 0xFFFFFF);
5861

62+
hasOpened = hasOpened <= 0 ? 0 : hasOpened - 1;
63+
5964
super.drawScreen(par1, par2, par3);
6065
}
6166

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

7984
case 12:
80-
if (!hasOpened)
85+
if (hasOpened == 0)
8186
{
8287
try
8388
{
@@ -101,10 +106,26 @@ protected JDialog createDialog(Component parent) throws HeadlessException
101106
return dialog;
102107
}
103108
};
104-
105-
fc.setCurrentDirectory(FileUtils.getUserDirectory());
109+
110+
fc.setFileFilter(new FileFilter()
111+
{
112+
@Override
113+
public String getDescription()
114+
{
115+
return "*.jar, *.zip";
116+
}
117+
118+
@Override
119+
public boolean accept(File arg0)
120+
{
121+
return (arg0.getName().endsWith(".zip") || arg0.getName().endsWith(".jar") || arg0.isDirectory());
122+
}
123+
});
124+
125+
fc.setCurrentDirectory(lastDir);
106126
fc.showOpenDialog(new JFrame());
107127
File mod = fc.getSelectedFile();
128+
lastDir = mod == null ? lastDir : mod.getParentFile();
108129
try
109130
{
110131
if (mod != null)
@@ -114,12 +135,12 @@ protected JDialog createDialog(Component parent) throws HeadlessException
114135
{
115136
e.printStackTrace();
116137
}
117-
hasOpened = true;
138+
hasOpened = 50;
118139
}
119140
break;
120141

121142
default:
122-
hasOpened = false;
143+
hasOpened = 0;
123144
GuiHelper.updateGui.actionPerformed(button);
124145
}
125146

src/tppitweaks/client/gui/UpdateGui.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@
55
import java.util.List;
66
import java.util.logging.Level;
77

8+
import net.minecraft.client.Minecraft;
89
import net.minecraft.client.gui.GuiButton;
910
import net.minecraft.client.gui.GuiScreen;
11+
import net.minecraft.util.ChatMessageComponent;
1012

1113
import org.lwjgl.input.Keyboard;
1214

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

4749
initModInstallationMenus();
48-
50+
51+
if (modScreens.isEmpty())
52+
Minecraft.getMinecraft().thePlayer.sendChatToPlayer(new ChatMessageComponent().addText("You have all optional mods installed!"));
53+
4954
for (InstructionsGui g : modScreens)
5055
{
5156
if (!Loader.isModLoaded(g.mod.modid))

src/tppitweaks/item/TPPIBook.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer pla
5757
{
5858
GuiHelper.doGuideGUI();
5959
}
60-
else if (stack.stackTagCompound == null || !stack.getTagCompound().getString("version").equals(TPPITweaks.VERSION))
60+
else if (stack.stackTagCompound == null || !stack.getTagCompound().getString("version").equals(TPPITweaks.VERSION) || stack.getItemDamage() == 1)
6161
{
6262
if (FMLCommonHandler.instance().getEffectiveSide() == Side.CLIENT)
6363
{

src/tppitweaks/lib/Reference.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public class Reference
3737
+ "after:Mekanism";
3838

3939

40-
public static final String PACK_VERSION = "0.2.0";
40+
public static final String PACK_VERSION = "0.2.1";
4141

4242
}

src/tppitweaks/recipetweaks/RecipeTweaks.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
import java.util.List;
55
import java.util.ListIterator;
66

7+
import net.minecraft.item.Item;
78
import net.minecraft.item.ItemStack;
89
import net.minecraft.item.crafting.CraftingManager;
910
import net.minecraft.item.crafting.FurnaceRecipes;
1011
import net.minecraft.item.crafting.IRecipe;
1112
import net.minecraftforge.oredict.OreDictionary;
13+
import net.minecraftforge.oredict.ShapelessOreRecipe;
1214
import tppitweaks.config.ConfigurationHandler;
1315
import tppitweaks.recipetweaks.modTweaks.AM2Tweaks;
1416
import tppitweaks.recipetweaks.modTweaks.BigReactorsTweaks;
@@ -26,6 +28,7 @@
2628
import tppitweaks.recipetweaks.modTweaks.SFMTweaks;
2729
import tppitweaks.recipetweaks.modTweaks.TweakerBase;
2830
import cpw.mods.fml.common.Loader;
31+
import cpw.mods.fml.common.registry.GameRegistry;
2932

3033
public class RecipeTweaks
3134
{
@@ -199,7 +202,8 @@ private static void addRevisedRecipes()
199202

200203
if (okayToTweakMekanism && ConfigurationHandler.harderDisassemblerRecipe)
201204
MekanismTweaks.addRecipes();
202-
205+
206+
GameRegistry.addRecipe(new ShapelessOreRecipe(Item.flintAndSteel, new Object[]{"nuggetSteel", Item.flint}));
203207
}
204208

205209
/**

src/tppitweaks/recipetweaks/modTweaks/MekanismTweaks.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,14 @@ public static void init()
2525
public static void addRecipes()
2626
{
2727
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(mekanism.common.Mekanism.AtomicDisassembler), new Object[]{
28-
"DtD",
29-
"DoD",
28+
"AtA",
29+
"ADA",
3030
" o ",
3131

3232
'D', new ItemStack(ModItems.tppiMaterial, 1, 2),
3333
't', mekanism.common.Mekanism.EnergyTablet,
34-
'o', "ingotRefinedObsidian"
34+
'o', "ingotRefinedObsidian",
35+
'A', mekanism.common.Mekanism.AtomicCore
3536
}));
3637

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

0 commit comments

Comments
 (0)