diff --git a/README.md b/README.md index fc6a8fd..07813ba 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,15 @@ Crafting Keys is a modification which adds a lot of new key bindings to minecraf ##Development Progress The whole project had been refactored and is now almost ready to be release. Still missing: -- Fixing the last bugs +- Full support for numPad +- BETA Build (1.7.10) +- 1.8 Port + Inventory/Gui Fix +- BETA Build (1.8) + +Optional: + +- Logic incremental feature +- API ## More Information diff --git a/src/main/java/de/skate702/craftingkeys/CraftingKeys.java b/src/main/java/de/skate702/craftingkeys/CraftingKeys.java index c8909d1..432c1b6 100644 --- a/src/main/java/de/skate702/craftingkeys/CraftingKeys.java +++ b/src/main/java/de/skate702/craftingkeys/CraftingKeys.java @@ -21,7 +21,10 @@ import de.skate702.craftingkeys.manager.*; import de.skate702.craftingkeys.proxies.CraftingKeysProxy; import de.skate702.craftingkeys.util.Logger; import de.skate702.craftingkeys.util.Util; -import net.minecraft.client.gui.*; +import net.minecraft.client.gui.GuiEnchantment; +import net.minecraft.client.gui.GuiMerchant; +import net.minecraft.client.gui.GuiRepair; +import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.inventory.*; import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.common.MinecraftForge; @@ -121,9 +124,9 @@ public class CraftingKeys { */ @SubscribeEvent public void onGuiOpened(GuiOpenEvent event) { - if (event.gui instanceof GuiMainMenu) { - event.gui = new GuiConfig(); // (Only for testing) - } + //if (event.gui instanceof GuiMainMenu) { + //event.gui = new GuiConfig(); // (Only for testing) + //} } /** diff --git a/src/main/java/de/skate702/craftingkeys/config/GuiConfig.java b/src/main/java/de/skate702/craftingkeys/config/GuiConfig.java index 0d62294..aafd931 100644 --- a/src/main/java/de/skate702/craftingkeys/config/GuiConfig.java +++ b/src/main/java/de/skate702/craftingkeys/config/GuiConfig.java @@ -198,15 +198,17 @@ public class GuiConfig extends GuiScreen { GL11.glColor4f(1F, 1F, 1F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/crafting_table.png")); drawTexturedModalRect(guiBasePosition - 86, height / 2 - 100, 1, 0, 174, 80); - drawString(fontRendererObj, "Crafting Table", guiBasePosition - 33, height / 2 - 100 + 3, lightGray.getRGB()); } private void genFurnaceInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/furnace.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Furnace", guiShowBasePosX - 15, guiShowBasePosY + 3, lightGray.getRGB()); + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 0, 100, 50, 50); drawInfoString(1, 63, 21); drawInfoString(4, 63, 57); @@ -215,10 +217,13 @@ public class GuiConfig extends GuiScreen { private void genBrewingStandInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/brewing_stand.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Brewing Stand", guiShowBasePosX - 33, guiShowBasePosY + 3, lightGray.getRGB()); + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 200, 0, 50, 50); drawInfoString(1, 86, 21); drawInfoString(4, 86, 58); @@ -228,9 +233,13 @@ public class GuiConfig extends GuiScreen { private void genEnchantmentInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/enchanting_table.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Enchanting", guiShowBasePosX - 20, guiShowBasePosY + 3, lightGray.getRGB()); + + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 150, 50, 50, 50); drawInfoString(1, 32, 51); // TODO: 1.8 Enchantment Table @@ -239,15 +248,15 @@ public class GuiConfig extends GuiScreen { private void genAnvilInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/anvil.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Anvil", guiShowBasePosX - 17, guiShowBasePosY + 3, lightGray.getRGB()); - drawRect(guiShowBasePosX + -30, guiShowBasePosY + 20, guiShowBasePosX + 83, guiShowBasePosY + 36, Color.black.getRGB()); + drawRect(guiShowBasePosX + -30, guiShowBasePosY + 17, guiShowBasePosX + 83, guiShowBasePosY + 36, Color.black.getRGB()); GL11.glColor4f(1F, 1F, 1F, 1F); - mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/test.png")); - drawTexturedModalRect(guiShowBasePosX - 50, guiShowBasePosY, 0, 0, 100, 100); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 100, 0, 50, 50); drawInfoString(4, 34, 51); drawInfoString(5, 83, 51); @@ -256,9 +265,13 @@ public class GuiConfig extends GuiScreen { private void genVillagerInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/villager.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Villager", guiShowBasePosX - 17, guiShowBasePosY + 3, lightGray.getRGB()); + + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 100, 100, 50, 50); drawInfoString(4, 43, 57); drawInfoString(5, 69, 57); @@ -267,9 +280,13 @@ public class GuiConfig extends GuiScreen { private void genInventoryInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/inventory.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Inventory", guiShowBasePosX - 20, guiShowBasePosY + 3, lightGray.getRGB()); + + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 0, 0, 50, 50); drawInfoString(1, 95, 30); drawInfoString(2, 113, 30); @@ -280,9 +297,13 @@ public class GuiConfig extends GuiScreen { private void genDispenserInfo() { + GL11.glColor4f(0.5F, 0.5F, 0.5F, 1F); mc.renderEngine.bindTexture(new ResourceLocation("textures/gui/container/dispenser.png")); drawTexturedModalRect(guiShowBasePosX - 86, guiShowBasePosY, 1, 0, 174, 80); - drawString(fontRendererObj, "Dispenser", guiShowBasePosX - 23, guiShowBasePosY + 3, lightGray.getRGB()); + + GL11.glColor4f(1F, 1F, 1F, 1F); + mc.renderEngine.bindTexture(new ResourceLocation(CraftingKeys.MODID, "textures/gui/symbols.png")); + drawTexturedModalRect(guiShowBasePosX + 105, guiShowBasePosY + 17, 50, 50, 50, 50); drawInfoString(0, 69, 21); drawInfoString(1, 87, 21); diff --git a/src/main/java/de/skate702/craftingkeys/manager/InventoryManager.java b/src/main/java/de/skate702/craftingkeys/manager/InventoryManager.java index 2cdc779..45a1de1 100644 --- a/src/main/java/de/skate702/craftingkeys/manager/InventoryManager.java +++ b/src/main/java/de/skate702/craftingkeys/manager/InventoryManager.java @@ -45,6 +45,8 @@ public class InventoryManager extends ContainerManager { return 9; } + // TODO: 1.8 Fix inventory slot bug + @Override protected int getInteractionSlotIndex() { return 0; diff --git a/src/main/resources/assets/craftingkeys/textures/gui/symbols.pdn b/src/main/resources/assets/craftingkeys/textures/gui/symbols.pdn new file mode 100644 index 0000000..0fc002c Binary files /dev/null and b/src/main/resources/assets/craftingkeys/textures/gui/symbols.pdn differ diff --git a/src/main/resources/assets/craftingkeys/textures/gui/symbols.png b/src/main/resources/assets/craftingkeys/textures/gui/symbols.png new file mode 100644 index 0000000..9095169 Binary files /dev/null and b/src/main/resources/assets/craftingkeys/textures/gui/symbols.png differ diff --git a/src/main/resources/assets/craftingkeys/textures/gui/test.png b/src/main/resources/assets/craftingkeys/textures/gui/test.png index f17947a..440723d 100644 Binary files a/src/main/resources/assets/craftingkeys/textures/gui/test.png and b/src/main/resources/assets/craftingkeys/textures/gui/test.png differ