diff --git a/assets/recipehandler/ChangePacket.java b/assets/recipehandler/ChangePacket.java index ad8e17e..7450f4b 100644 --- a/assets/recipehandler/ChangePacket.java +++ b/assets/recipehandler/ChangePacket.java @@ -1,17 +1,15 @@ package assets.recipehandler; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.common.network.ByteBufUtils; -import net.minecraftforge.fml.common.network.internal.FMLProxyPacket; -import net.minecraftforge.fml.relauncher.Side; +import cpw.mods.fml.common.network.ByteBufUtils; +import cpw.mods.fml.common.network.internal.FMLProxyPacket; +import cpw.mods.fml.relauncher.Side; import io.netty.buffer.ByteBuf; import io.netty.buffer.Unpooled; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.inventory.InventoryCrafting; import net.minecraft.item.ItemStack; - -import java.util.Iterator; +import net.minecraft.network.PacketBuffer; public final class ChangePacket { public final static String CHANNEL = "recipemod:key"; diff --git a/assets/recipehandler/ClientEventHandler.java b/assets/recipehandler/ClientEventHandler.java index 3cb296d..bcf18a9 100644 --- a/assets/recipehandler/ClientEventHandler.java +++ b/assets/recipehandler/ClientEventHandler.java @@ -1,11 +1,14 @@ package assets.recipehandler; -import net.minecraftforge.fml.client.FMLClientHandler; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.gameevent.TickEvent; -import net.minecraftforge.fml.relauncher.Side; +import org.lwjgl.input.Keyboard; +import org.lwjgl.input.Mouse; + +import cpw.mods.fml.client.FMLClientHandler; +import cpw.mods.fml.client.registry.ClientRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.gameevent.TickEvent; +import cpw.mods.fml.relauncher.Side; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.settings.KeyBinding; import net.minecraft.entity.player.EntityPlayer; @@ -16,8 +19,6 @@ import net.minecraft.world.World; import net.minecraftforge.client.event.RenderGameOverlayEvent; import net.minecraftforge.common.MinecraftForge; -import org.lwjgl.input.Keyboard; -import org.lwjgl.input.Mouse; public final class ClientEventHandler implements RecipeMod.IRegister{ private KeyBinding key; diff --git a/assets/recipehandler/CraftingHandler.java b/assets/recipehandler/CraftingHandler.java index 9944a31..746b6ea 100644 --- a/assets/recipehandler/CraftingHandler.java +++ b/assets/recipehandler/CraftingHandler.java @@ -44,7 +44,7 @@ else if(notCraftingContainer!=null){ Field f = knownCraftingContainer.get(name); if (f == null) { for (Field field : container.getClass().getDeclaredFields()) { - if (field!=null && InventoryCrafting.class.isAssignableFrom(field.getClass())) { + if (field!=null && field.getType().isAssignableFrom(InventoryCrafting.class)) { try { field.setAccessible(true); InventoryCrafting craft = InventoryCrafting.class.cast(field.get(container)); @@ -120,7 +120,7 @@ else if (container instanceof ContainerWorkbench) return ((ContainerWorkbench) container).craftResult; else if(notCraftingContainer!=null){ for(Field field:container.getClass().getDeclaredFields()){ - if(field != null && IInventory.class.isAssignableFrom(field.getClass())){ + if(field != null && field.getType().isAssignableFrom(IInventory.class)){ try { field.setAccessible(true); IInventory result = IInventory.class.cast(field.get(container)); diff --git a/assets/recipehandler/GuiEventHandler.java b/assets/recipehandler/GuiEventHandler.java index 10813c6..e89a2dd 100644 --- a/assets/recipehandler/GuiEventHandler.java +++ b/assets/recipehandler/GuiEventHandler.java @@ -1,6 +1,8 @@ package assets.recipehandler; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; +import org.lwjgl.opengl.GL11; + +import cpw.mods.fml.common.eventhandler.SubscribeEvent; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.inventory.GuiContainer; @@ -8,7 +10,6 @@ import net.minecraft.inventory.InventoryCrafting; import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.event.GuiScreenEvent; -import org.lwjgl.opengl.GL11; /** * Created by Olivier on 15/09/2014. @@ -55,7 +56,7 @@ else if(super.mousePressed(mc, mouseX - deltaX, mouseY)) this.drawTexturedModalRect(this.xPosition + deltaX, this.yPosition, k, 0, this.width, this.height); if(!RecipeMod.cornerText) { int l = this.enabled ? 0xFFFFFF : 10526880; - this.drawCenteredString(mc.fontRendererObj, this.displayString, this.xPosition + deltaX, this.yPosition + this.height / 2, l); + this.drawCenteredString(mc.fontRenderer, this.displayString, this.xPosition + deltaX, this.yPosition + this.height / 2, l); } } } diff --git a/assets/recipehandler/PacketHandler.java b/assets/recipehandler/PacketHandler.java index 4943585..1ff69d4 100644 --- a/assets/recipehandler/PacketHandler.java +++ b/assets/recipehandler/PacketHandler.java @@ -1,14 +1,12 @@ package assets.recipehandler; -import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; -import net.minecraftforge.fml.common.network.FMLNetworkEvent; -import net.minecraftforge.fml.relauncher.Side; +import cpw.mods.fml.common.eventhandler.SubscribeEvent; +import cpw.mods.fml.common.network.FMLNetworkEvent; +import cpw.mods.fml.relauncher.Side; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.inventory.IInventory; import net.minecraft.network.NetHandlerPlayServer; -import java.util.Iterator; - public final class PacketHandler implements RecipeMod.IRegister { @Override public void register(){ diff --git a/assets/recipehandler/RecipeMod.java b/assets/recipehandler/RecipeMod.java index 921d818..db3654e 100644 --- a/assets/recipehandler/RecipeMod.java +++ b/assets/recipehandler/RecipeMod.java @@ -1,18 +1,18 @@ package assets.recipehandler; -import net.minecraftforge.fml.common.FMLCommonHandler; -import net.minecraftforge.fml.common.ModContainer; -import net.minecraftforge.fml.common.SidedProxy; -import net.minecraftforge.fml.common.network.FMLEventChannel; -import net.minecraftforge.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.Mod; +import cpw.mods.fml.common.Mod.EventHandler; +import cpw.mods.fml.common.ModContainer; +import cpw.mods.fml.common.SidedProxy; +import cpw.mods.fml.common.event.FMLPreInitializationEvent; +import cpw.mods.fml.common.network.FMLEventChannel; +import cpw.mods.fml.common.network.NetworkRegistry; +import cpw.mods.fml.common.registry.GameRegistry; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; -import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; -import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; -import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.common.config.Configuration; @Mod(modid = "recipehandler", name = "NoMoreRecipeConflict", version = "$version") diff --git a/build.gradle b/build.gradle index 2096e8b..1306596 100644 --- a/build.gradle +++ b/build.gradle @@ -1,28 +1,25 @@ buildscript { - repositories { - mavenCentral() - maven { - name = "forge" - url = "http://files.minecraftforge.net/maven" - } - maven { - name = "sonatype" - url = "https://oss.sonatype.org/content/repositories/snapshots/" - } - } - dependencies { - classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' - } + repositories { + mavenCentral() + maven { + name = "forge" + url = "https://files.minecraftforge.net/maven" + } + + maven { + name = "sonatype" + url = "https://oss.sonatype.org/content/repositories/snapshots/" + } + } + dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT' } } + apply plugin: 'forge' -sourceCompatibility = 1.6 -targetCompatibility = 1.6 + archivesBaseName = "NoMoreRecipeConflict" -version = "0.3" +version = "0.3.2" minecraft { - version = "1.8-11.14.3.1450" - runDir = "eclipse" - mappings = "snapshot_20150401" + version = "1.7.10-10.13.4.1614-1.7.10" replace '$version', version } sourceSets.main.java{srcDirs project.projectDir.getPath() include("assets/**")} diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index b761216..fd7e590 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 678d9d8..3d03e29 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Jul 02 15:54:47 CDT 2014 +#Sun Sep 13 09:59:45 CDT 2015 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.0-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/mcmod.info b/mcmod.info index 5d89bcb..78dcdc2 100644 --- a/mcmod.info +++ b/mcmod.info @@ -4,7 +4,7 @@ "name": "NoMoreRecipeConflict", "description": "Switch between conflicting recipes", "version": $version, - "credits": "", + "credits": "Created by stimmedcow and GotoLink; Bugfixes by Jonius7", "logoFile": "", "mcversion": $mcversion, "url": "http://www.minecraftforum.net/topic/1098727-", diff --git a/pack.mcmeta b/pack.mcmeta index c131a1e..0c08827 100644 --- a/pack.mcmeta +++ b/pack.mcmeta @@ -1,6 +1,6 @@ { "pack":{ "pack_format":1, - "description":"NoMoreRecipeConflict for 1.7.2" + "description":"NoMoreRecipeConflict for 1.7.10" } } \ No newline at end of file