diff --git a/dependencies.gradle b/dependencies.gradle index df88f86cee..8a37649348 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -9,7 +9,7 @@ dependencies { compileOnly("com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-442-GTNH:dev") {transitive = false } compileOnly("com.github.GTNewHorizons:EnderStorage:1.6.0:dev") {transitive = false } - compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.49.42:dev") {transitive = false } + compileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.49.56:dev") {transitive = false } compile("com.github.GTNewHorizons:ForestryMC:4.9.7:dev") {transitive = false } compileOnly("com.github.GTNewHorizons:Railcraft:9.15.12:dev") {transitive = false } compile("com.github.GTNewHorizons:NotEnoughItems:2.6.33-GTNH:dev") {transitive = false } diff --git a/src/main/scala/li/cil/oc/integration/forestry/UpgradeBeekeeperUtil.java b/src/main/scala/li/cil/oc/integration/forestry/UpgradeBeekeeperUtil.java index 87f227b591..fc4f2c4098 100644 --- a/src/main/scala/li/cil/oc/integration/forestry/UpgradeBeekeeperUtil.java +++ b/src/main/scala/li/cil/oc/integration/forestry/UpgradeBeekeeperUtil.java @@ -3,8 +3,8 @@ import cpw.mods.fml.common.Loader; import forestry.api.apiculture.IBeeHousing; import gregtech.api.metatileentity.BaseMetaTileEntity; -import gregtech.api.util.GT_Utility; -import gregtech.common.tileentities.machines.basic.GT_MetaTileEntity_IndustrialApiary; +import gregtech.api.util.GTUtility; +import gregtech.common.tileentities.machines.basic.MTEIndustrialApiary; import li.cil.oc.util.BlockPosition; import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; @@ -39,13 +39,13 @@ public static IBeeHousing getBeeHousingAt(BlockPosition pos) { if (!(te instanceof BaseMetaTileEntity)) return null; BaseMetaTileEntity mte = (BaseMetaTileEntity)te; - if (!(mte.getMetaTileEntity() instanceof GT_MetaTileEntity_IndustrialApiary)) + if (!(mte.getMetaTileEntity() instanceof MTEIndustrialApiary)) return null; return (IBeeHousing)mte.getMetaTileEntity(); } /** Returns a Tile Entity for Industrial Apiaries at position pos, or null if none exist */ - public static GT_MetaTileEntity_IndustrialApiary getGTIApiaryAt(BlockPosition pos) { + public static MTEIndustrialApiary getGTIApiaryAt(BlockPosition pos) { if (!GT_LOADED || pos.world().isEmpty()) return null; @@ -56,9 +56,9 @@ public static GT_MetaTileEntity_IndustrialApiary getGTIApiaryAt(BlockPosition po if (!(te instanceof BaseMetaTileEntity)) return null; BaseMetaTileEntity mte = (BaseMetaTileEntity)te; - if (!(mte.getMetaTileEntity() instanceof GT_MetaTileEntity_IndustrialApiary)) + if (!(mte.getMetaTileEntity() instanceof MTEIndustrialApiary)) return null; - return (GT_MetaTileEntity_IndustrialApiary)mte.getMetaTileEntity(); + return (MTEIndustrialApiary)mte.getMetaTileEntity(); } public static boolean swapQueen(BlockPosition pos, IInventory hostInv, int slot) { @@ -88,11 +88,11 @@ public static boolean swapDrone(BlockPosition pos, IInventory hostInv, int slot) public static int getMaxIndustrialUpgradeCount() { if (!GT_LOADED) return 0; - return GT_MetaTileEntity_IndustrialApiary.getMaxUpgradeCount(); + return MTEIndustrialApiary.getMaxUpgradeCount(); } public static int addIndustrialUpgrade(BlockPosition pos, IInventory hostInv, int slot, int amount) { - GT_MetaTileEntity_IndustrialApiary iapiary = getGTIApiaryAt(pos); + MTEIndustrialApiary iapiary = getGTIApiaryAt(pos); if (iapiary == null || amount <= 0) return 0; @@ -113,7 +113,7 @@ public static int addIndustrialUpgrade(BlockPosition pos, IInventory hostInv, in public static ItemStack getIndustrialUpgrade(BlockPosition pos, int index){ if (index < 1 || index > getMaxIndustrialUpgradeCount()) return null; - GT_MetaTileEntity_IndustrialApiary iapiary = getGTIApiaryAt(pos); + MTEIndustrialApiary iapiary = getGTIApiaryAt(pos); if (iapiary == null) return null; return iapiary.getUpgrade(index - 1); @@ -122,7 +122,7 @@ public static ItemStack getIndustrialUpgrade(BlockPosition pos, int index){ public static int removeIndustrialUpgrade(BlockPosition pos, IInventory hostInv, int slot, int index, int amount) { if (index < 1 || index > getMaxIndustrialUpgradeCount() || amount <= 0) return 0; - GT_MetaTileEntity_IndustrialApiary iapiary = getGTIApiaryAt(pos); + MTEIndustrialApiary iapiary = getGTIApiaryAt(pos); if (iapiary == null) return 0; @@ -153,7 +153,7 @@ private static int insertIntoHostInv(IInventory hostInv, int slot, ItemStack sta // Find any stacks to merge with for (int i = 0; i < hostInv.getSizeInventory(); i++) { ItemStack stackInSlot = hostInv.getStackInSlot(i); - if (!GT_Utility.areStacksEqual(stack, stackInSlot)) + if (!GTUtility.areStacksEqual(stack, stackInSlot)) continue; insertIntoSlot(hostInv, i, stack); @@ -177,7 +177,7 @@ private static void insertIntoSlot(IInventory inv, int slot, ItemStack stack) { int maxStackSize = Math.min(inv.getInventoryStackLimit(), stack.getMaxStackSize()); if (stackInSlot == null) { inv.setInventorySlotContents(slot, stack.splitStack(Math.min(maxStackSize, stack.stackSize))); - } else if (GT_Utility.areStacksEqual(stack, stackInSlot)) { + } else if (GTUtility.areStacksEqual(stack, stackInSlot)) { int toMove = Math.min(stack.stackSize, Math.max(0, maxStackSize - stackInSlot.stackSize)); if (toMove > 0) { stackInSlot.stackSize += toMove; diff --git a/src/main/scala/li/cil/oc/integration/gregtech/EventHandlerGregTech.scala b/src/main/scala/li/cil/oc/integration/gregtech/EventHandlerGregTech.scala index b95df44b51..162ac6fc7a 100644 --- a/src/main/scala/li/cil/oc/integration/gregtech/EventHandlerGregTech.scala +++ b/src/main/scala/li/cil/oc/integration/gregtech/EventHandlerGregTech.scala @@ -3,7 +3,7 @@ package li.cil.oc.integration.gregtech import cpw.mods.fml.common.eventhandler.SubscribeEvent import gregtech.api.interfaces.IDamagableItem import gregtech.api.interfaces.tileentity.IGregTechTileEntity -import gregtech.api.items.GT_MetaGenerated_Tool +import gregtech.api.items.MetaGeneratedTool import li.cil.oc.api.event.{GeolyzerEvent, RobotUsedToolEvent} import net.minecraft.item.ItemStack import net.minecraftforge.common.util.ForgeDirection @@ -25,7 +25,7 @@ object EventHandlerGregTech { def onRobotApplyDamageRate(e: RobotUsedToolEvent.ApplyDamageRate) { (e.toolBeforeUse.getItem, e.toolAfterUse.getItem) match { case (itemBefore: IDamagableItem, itemAfter: IDamagableItem) => - val damage = GT_MetaGenerated_Tool.getToolDamage(e.toolAfterUse) - GT_MetaGenerated_Tool.getToolDamage(e.toolBeforeUse) + val damage = MetaGeneratedTool.getToolDamage(e.toolAfterUse) - MetaGeneratedTool.getToolDamage(e.toolBeforeUse) if (damage > 0) { val actualDamage = damage * e.getDamageRate val repairedDamage = @@ -33,7 +33,7 @@ object EventHandlerGregTech { damage - math.floor(actualDamage).toInt else damage - math.ceil(actualDamage).toInt - GT_MetaGenerated_Tool.setToolDamage(e.toolAfterUse, GT_MetaGenerated_Tool.getToolDamage(e.toolAfterUse) - repairedDamage) + MetaGeneratedTool.setToolDamage(e.toolAfterUse, MetaGeneratedTool.getToolDamage(e.toolAfterUse) - repairedDamage) } case _ => } @@ -41,7 +41,7 @@ object EventHandlerGregTech { def getDurability(stack: ItemStack): Double = { stack.getItem match { - case item: IDamagableItem => 1.0 - GT_MetaGenerated_Tool.getToolDamage(stack).toDouble / GT_MetaGenerated_Tool.getToolMaxDamage(stack).toDouble + case item: IDamagableItem => 1.0 - MetaGeneratedTool.getToolDamage(stack).toDouble / MetaGeneratedTool.getToolMaxDamage(stack).toDouble case _ => Double.NaN } } diff --git a/src/main/scala/li/cil/oc/integration/gregtech/RecipeHandler.scala b/src/main/scala/li/cil/oc/integration/gregtech/RecipeHandler.scala index f90500724d..c6e5af64cf 100644 --- a/src/main/scala/li/cil/oc/integration/gregtech/RecipeHandler.scala +++ b/src/main/scala/li/cil/oc/integration/gregtech/RecipeHandler.scala @@ -3,7 +3,7 @@ package li.cil.oc.integration.gregtech import java.util import com.typesafe.config.Config import com.typesafe.config.ConfigValue -import gregtech.api.enums.GT_Values +import gregtech.api.enums.GTValues import gregtech.api.recipe.RecipeMaps import li.cil.oc.common.recipe.Recipes import li.cil.oc.common.recipe.Recipes.RecipeException @@ -32,12 +32,12 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) + GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) .eut(eu).addTo(RecipeMaps.alloySmelterRecipes) } case _ => for (primaryInput <- primaryInputs) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration) + GTValues.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration) .eut(eu).addTo(RecipeMaps.alloySmelterRecipes) } } @@ -48,7 +48,7 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -58,7 +58,7 @@ object RecipeHandler { } case _ => for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -72,7 +72,7 @@ object RecipeHandler { def addGTBenderRecipe(output: ItemStack, recipe: Config) { val (primaryInputs, _, _, _, _, eu, duration) = parseRecipe(output, recipe) for (primaryInput <- primaryInputs) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu) + GTValues.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu) .addTo(RecipeMaps.benderRecipes) } } @@ -83,7 +83,7 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) secondaryOutput match { case Some(itemStack) => recipe = recipe.itemOutputs(output, itemStack) @@ -94,7 +94,7 @@ object RecipeHandler { } case None => for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) secondaryOutput match { case Some(itemStack) => recipe = recipe.itemOutputs(output, itemStack) @@ -111,7 +111,7 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -126,7 +126,7 @@ object RecipeHandler { } case _ => for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -146,7 +146,7 @@ object RecipeHandler { val (primaryInputs, _, fluidInput, _, secondaryOutputs, eu, duration) = parseRecipe(output, recipe) val secondaryOutput = secondaryOutputs.headOption for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -165,7 +165,7 @@ object RecipeHandler { def addGTFluidCannerRecipe(output: ItemStack, recipe: Config) { val (primaryInputs, _, fluidInput, fluidOutput, _, eu, duration) = parseRecipe(output, recipe) for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) fluidInput match { case Some(fluidStack) => recipe = recipe.fluidInputs(fluidStack) @@ -185,7 +185,7 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) + GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) .eut(eu).addTo(RecipeMaps.formingPressRecipes) } //all values required @@ -197,7 +197,7 @@ object RecipeHandler { val (primaryInputs, _, _, _, secondaryOutputs, eu, duration) = parseRecipe(output, recipe) val secondaryOutput = secondaryOutputs.headOption for (primaryInput <- primaryInputs) { - var recipe = GT_Values.RA.stdBuilder().itemInputs(primaryInput) + var recipe = GTValues.RA.stdBuilder().itemInputs(primaryInput) secondaryOutput match { case Some(itemStack) => recipe = recipe.itemOutputs(output, itemStack) @@ -213,7 +213,7 @@ object RecipeHandler { secondaryInputs match { case Some(value) => for (primaryInput <- primaryInputs; secondaryInput <- value) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) + GTValues.RA.stdBuilder().itemInputs(primaryInput, secondaryInput).itemOutputs(output).duration(duration) .eut(eu).addTo(RecipeMaps.laserEngraverRecipes) } case _ => @@ -223,7 +223,7 @@ object RecipeHandler { def addGTWireMillRecipe(output: ItemStack, recipe: Config) { val (primaryInputs, _, _, _, _, eu, duration) = parseRecipe(output, recipe) for (primaryInput <- primaryInputs) { - GT_Values.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu) + GTValues.RA.stdBuilder().itemInputs(primaryInput).itemOutputs(output).duration(duration).eut(eu) .addTo(RecipeMaps.wiremillRecipes) } } diff --git a/src/main/scala/li/cil/oc/server/component/Geolyzer.scala b/src/main/scala/li/cil/oc/server/component/Geolyzer.scala index 460301cf58..f457c24f10 100644 --- a/src/main/scala/li/cil/oc/server/component/Geolyzer.scala +++ b/src/main/scala/li/cil/oc/server/component/Geolyzer.scala @@ -187,7 +187,7 @@ class Geolyzer(val host: EnvironmentHost) extends prefab.ManagedEnvironment with @Callback(doc = """function():table -- Returns GregTech underground fluids information""") def scanUndergroundFluids(computer: Context, args: Arguments): Array[AnyRef] = { val blockPos = BlockPosition(host) - val fluid = gregtech.common.GT_UndergroundOil.undergroundOilReadInformation(new Chunk(host.world, blockPos.x>>4, blockPos.z>>4)) + val fluid = gregtech.common.UndergroundOil.undergroundOilReadInformation(new Chunk(host.world, blockPos.x>>4, blockPos.z>>4)) result(Map("type" -> fluid.getLocalizedName, "quantity" -> fluid.amount)) }