Added update notices for supporting Minecaft Forge 1.9. Still buggy though.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
|
||||
import cpw.mods.fml.client.event.ConfigChangedEvent;
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
import cpw.mods.fml.common.Mod;
|
||||
@@ -39,7 +41,7 @@ import net.minecraftforge.common.MinecraftForge;
|
||||
public class CraftingKeys {
|
||||
|
||||
public static final String MODID = "craftingkeys";
|
||||
public static final String VERSION = "1.0.0";
|
||||
public static final String VERSION = "1.0.1";
|
||||
public static final String NAME = "Crafting Keys";
|
||||
|
||||
/**
|
||||
@@ -114,7 +116,7 @@ public class CraftingKeys {
|
||||
*/
|
||||
@SubscribeEvent
|
||||
public void onConfigChanged(ConfigChangedEvent.OnConfigChangedEvent eventArgs) {
|
||||
if (eventArgs.modID.equals(MODID)) {
|
||||
if (eventArgs.modID.equals(MODID)) { // NEW_1_9 modID => getModID()
|
||||
Config.syncConfig();
|
||||
Logger.info("onConfigChanged(e)", "Changed config.");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.config;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import de.skate702.craftingkeys.CraftingKeys;
|
||||
import de.skate702.craftingkeys.util.Logger;
|
||||
|
||||
@@ -246,7 +246,7 @@ public class GuiConfig extends GuiScreen {
|
||||
drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 150, 50, 50, 50);
|
||||
|
||||
drawInfoString(1, 32, 51);
|
||||
// 1.8 drawInfoString(2, 42, 51);
|
||||
// NEW_1_8 drawInfoString(2, 42, 51);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.config;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
|
||||
import cpw.mods.fml.common.network.IGuiHandler;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.config;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
|
||||
@@ -2,7 +2,6 @@ package de.skate702.craftingkeys.manager;
|
||||
|
||||
import de.skate702.craftingkeys.CraftingKeys;
|
||||
import de.skate702.craftingkeys.config.Config;
|
||||
import de.skate702.craftingkeys.config.KeyBindings;
|
||||
import de.skate702.craftingkeys.util.InputUtil;
|
||||
import de.skate702.craftingkeys.util.Logger;
|
||||
import de.skate702.craftingkeys.util.Util;
|
||||
|
||||
@@ -37,14 +37,14 @@ public class EnchantmentManager extends ContainerManager {
|
||||
@Override
|
||||
protected int specificKeyToSlotIndex() {
|
||||
return mapKeyToSlot(-1, 0, -1, -1, 0, -1, -1, -1, -1);
|
||||
// 1.8 return mapKeyToSlot(-1, 0, 1, -1, 0, 1, -1, -1, -1);
|
||||
// NEW_1_8 return mapKeyToSlot(-1, 0, 1, -1, 0, 1, -1, -1, -1);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected int getInventoryStartIndex() {
|
||||
return 1;
|
||||
// 1.8 return 2;
|
||||
// NEW_1_8 return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -55,7 +55,7 @@ public class EnchantmentManager extends ContainerManager {
|
||||
@Override
|
||||
protected int[] getDropSlots() {
|
||||
return new int[]{0};
|
||||
// 1.8 return new int[] {0, 1};
|
||||
// NEW_1_8 return new int[] {0, 1};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.proxies;
|
||||
|
||||
// NEW_1_9 import net.minecraft.inventory.ClickType;
|
||||
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
|
||||
@@ -15,6 +17,7 @@ public class CraftingKeysClientProxy extends CraftingKeysProxy {
|
||||
EntityPlayer player) {
|
||||
|
||||
controller.windowClick(windowId, slot, rightClick, action, player);
|
||||
// NEW_1_9 controller.func_187098_a(windowId, slot, rightClick, ClickType.PICKUP, player);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.proxies;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.multiplayer.PlayerControllerMP;
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package de.skate702.craftingkeys.util;
|
||||
|
||||
//NEW_1_9: net.minecraft.util.text.translation.I18n;
|
||||
|
||||
import net.minecraft.util.StatCollector;
|
||||
|
||||
public class LanguageLocalizer {
|
||||
@@ -10,6 +12,7 @@ public class LanguageLocalizer {
|
||||
* @return localized The localized String
|
||||
*/
|
||||
public static String localize(String unloc) {
|
||||
//NEW_1_9 return I18n.translateToLocal(unloc);
|
||||
return StatCollector.translateToLocal(unloc);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package de.skate702.craftingkeys.util;
|
||||
|
||||
// NEW_1_9 cpw.mods.fml => net.minecraftforge.fml
|
||||
// NEW_1_9 net.minecraft.util.text.TextComponentTranslation;
|
||||
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -65,6 +68,7 @@ public class Util {
|
||||
*/
|
||||
public static void printMessage(String lang_key) {
|
||||
client.thePlayer.addChatMessage(new ChatComponentTranslation(lang_key));
|
||||
// NEW_1_9 client.thePlayer.addChatMessage(new TextComponentTranslation(lang_key));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -3,10 +3,10 @@
|
||||
"modid": "craftingkeys",
|
||||
"name": "Crafting Keys",
|
||||
"description": "Simple better crafting! Crafing Keys enables new inventory key-bindings to speed up your crafting.",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"credits": "Based on the open-source InvTweaks-Mod. Thanks a lot!",
|
||||
"mcversion": "1.7.10 or newer",
|
||||
"mcversion": "1.7.10, 1.8, 1.8.9, 1.9",
|
||||
"url": "http://skate702.de",
|
||||
"authorList": [ "skate702", "0xSeb" ]
|
||||
"authorList": [ "skate702", "sebinside" ]
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user