Skip to content

Commit

Permalink
fix compatibility with the great renaming (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAPenguin0 authored Sep 3, 2024
1 parent 6d8ec13 commit 7eabde5
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Add your dependencies here

dependencies {
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.42:dev'
compileOnly 'com.github.GTNewHorizons:GT5-Unofficial:5.09.49.55:dev'
api 'com.github.GTNewHorizons:Baubles:1.0.4:dev'
api 'com.github.GTNewHorizons:ModularUI:1.2.0:dev'
api ('com.github.GTNewHorizons:ThaumicBoots:1.3.7:dev'){
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/emt/gthandler/common/loader/EMT_GT_Loader.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@

import static emt.command.CommandOutputs.mkbook;
import static gregtech.api.recipe.RecipeMaps.assemblerRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;

import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;

import emt.tile.GT_MetaTileEntity_ResearchCompleter;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.MetaTileEntityIDs;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.TierEU;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GTOreDictUnificator;
import thaumcraft.common.config.ConfigItems;

public class EMT_GT_Loader {
Expand All @@ -29,10 +29,10 @@ public static void run() {
}

public static void runlate() {
GT_Values.RA.stdBuilder()
GTValues.RA.stdBuilder()
.itemInputs(
new ItemStack(Items.book),
GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
GTOreDictUnificator.get(OrePrefixes.circuit, Materials.Basic, 1L),
new ItemStack(ConfigItems.itemShard, 1, OreDictionary.WILDCARD_VALUE))
.itemOutputs(mkbook()).duration(6 * SECONDS).eut(TierEU.RECIPE_MV / 2).addTo(assemblerRecipes);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/emt/init/EMTRecipes.java
Original file line number Diff line number Diff line change
Expand Up @@ -931,13 +931,13 @@ public static void registerLateRecipes() {

// magicalMachineCasing = addArcaneCraftingRecipe("ResearchCompleter", new
// ItemStack(GregTech_API.sBlockCasings8, 1, 6), EMTCraftingAspects.magicalMachineCasing, "XYX", "XZX", "XYX",
// 'X', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new
// ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GT_OreDictUnificator.get(OrePrefixes.frameGt,
// 'X', GTOreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1), 'Y', new
// ItemStack(ConfigItems.itemResource, 1, 14) , 'Z', GTOreDictUnificator.get(OrePrefixes.frameGt,
// Materials.Thaumium, 1));

// researchCompleter = addArcaneCraftingRecipe("ResearchCompleter", new ItemStack(GregTech_API.sBlockMachines,
// 1, 13001), EMTCraftingAspects.researchCompleter, "XYX", "YZY", "XAX", 'X',
// GT_OreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new
// GTOreDictUnificator.get(OrePrefixes.circuit.get(Materials.Good), 1L), 'Y', new
// ItemStack(ConfigBlocks.blockCosmeticOpaque, 1, 2), 'Z', new ItemStack(GregTech_API.sBlockCasings8, 1, 6),
// 'A', new ItemStack(ConfigBlocks.blockStoneDevice, 1, 5));

Expand Down
30 changes: 15 additions & 15 deletions src/main/java/emt/init/EMT_GTNH_Recipes_And_Researches.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import thaumcraft.api.ThaumcraftApi;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.AspectList;
Expand Down Expand Up @@ -58,11 +58,11 @@ private void runArcaneRecipes() {
"pmp",
"pbp",
's',
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Diamond, 1),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Diamond, 1),
'p',
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Diamond, 1),
't',
GT_OreDictUnificator.get(OrePrefixes.toolHeadChainsaw, Materials.Thaumium, 1),
GTOreDictUnificator.get(OrePrefixes.toolHeadChainsaw, Materials.Thaumium, 1),
'b',
ItemList.Battery_RE_LV_Sodium.get(1),
'm',
Expand All @@ -77,9 +77,9 @@ private void runArcaneRecipes() {
"pmp",
"ppp",
's',
GT_OreDictUnificator.get(OrePrefixes.screw, Materials.Thaumium, 1),
GTOreDictUnificator.get(OrePrefixes.screw, Materials.Thaumium, 1),
'p',
GT_OreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1),
GTOreDictUnificator.get(OrePrefixes.plate, Materials.Thaumium, 1),
'b',
ItemList.Battery_RE_LV_Sodium.get(1),
'm',
Expand Down Expand Up @@ -166,26 +166,26 @@ public boolean matches(IInventory inv, World world, EntityPlayer player) {
if (itemReplacement != null && slot == null) {
return false;
} else if (itemReplacement instanceof String) {
if (!GT_Utility.areStacksEqual(
GT_OreDictUnificator.getFirstOre(itemReplacement, 1),
GT_OreDictUnificator.get(slot),
if (!GTUtility.areStacksEqual(
GTOreDictUnificator.getFirstOre(itemReplacement, 1),
GTOreDictUnificator.get(slot),
true))
if (!OreDictionary.getOres((String) itemReplacement).contains(slot)) return false;
} else if (itemReplacement instanceof ItemStack) {
if (!GT_Utility.isStackValid((ItemStack) itemReplacement)) {
if (!GTUtility.isStackValid((ItemStack) itemReplacement)) {
return false;
}
if (!GT_Utility.areStacksEqual((ItemStack) itemReplacement, slot, true))
if (!GT_Utility.areUnificationsEqual((ItemStack) itemReplacement, slot, true))
if (!GTUtility.areStacksEqual((ItemStack) itemReplacement, slot, true))
if (!GTUtility.areUnificationsEqual((ItemStack) itemReplacement, slot, true))
if (!(((ItemStack) itemReplacement).getItem().equals(slot.getItem())
&& ((ItemStack) itemReplacement).getItemDamage()
== OreDictionary.WILDCARD_VALUE))
return false;
} else if (itemReplacement instanceof Collection) {
boolean hit = false;
for (Object o : (Collection<?>) itemReplacement) {
if (GT_Utility.areStacksEqual((ItemStack) o, slot, true)
|| GT_Utility.areUnificationsEqual((ItemStack) o, slot, true)
if (GTUtility.areStacksEqual((ItemStack) o, slot, true)
|| GTUtility.areUnificationsEqual((ItemStack) o, slot, true)
|| (((ItemStack) o).getItem().equals(slot.getItem())
&& ((ItemStack) itemReplacement).getItemDamage()
== OreDictionary.WILDCARD_VALUE))
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/emt/item/block/ItemBlockSolars.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package emt.item.block;

import static emt.util.EMTTextHelper.localize;
import static gregtech.api.util.GT_Utility.formatNumbers;
import static gregtech.api.util.GTUtility.formatNumbers;

import java.io.StringReader;
import java.util.List;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/emt/item/focus/ItemMaintenanceFocus.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.metatileentity.BaseMetaTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_Hatch_Maintenance;
import gregtech.api.metatileentity.implementations.MTEHatchMaintenance;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
import thaumcraft.api.wands.FocusUpgradeType;
Expand Down Expand Up @@ -57,8 +57,8 @@ public ItemStack onFocusRightClick(ItemStack itemStack, World world, EntityPlaye
TileEntity hatchCandidateTile = world.getTileEntity(mop.blockX, mop.blockY, mop.blockZ);
if (hatchCandidateTile instanceof BaseMetaTileEntity) {
IMetaTileEntity hatchCandidateMetaTile = ((BaseMetaTileEntity) hatchCandidateTile).getMetaTileEntity();
if (hatchCandidateMetaTile instanceof GT_MetaTileEntity_Hatch_Maintenance) {
GT_MetaTileEntity_Hatch_Maintenance hatch = (GT_MetaTileEntity_Hatch_Maintenance) hatchCandidateMetaTile;
if (hatchCandidateMetaTile instanceof MTEHatchMaintenance) {
MTEHatchMaintenance hatch = (MTEHatchMaintenance) hatchCandidateMetaTile;
if (player.capabilities.isCreativeMode
|| wand.consumeAllVis(itemStack, player, getVisCost(itemStack), true, true)) {
hatch.mCrowbar = true;
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/emt/tile/GT_MetaTileEntity_ResearchCompleter.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.enums.Textures.BlockIcons.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static gregtech.api.util.GTStructureUtility.ofHatchAdder;

import java.util.ArrayList;

Expand All @@ -17,15 +17,15 @@
import cpw.mods.fml.common.network.NetworkRegistry;
import emt.EMT;
import emt.network.PacketNodeInfo;
import gregtech.api.GregTech_API;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_EnhancedMultiBlockBase;
import gregtech.api.metatileentity.implementations.MTEEnhancedMultiBlockBase;
import gregtech.api.render.TextureFactory;
import gregtech.api.util.GT_Multiblock_Tooltip_Builder;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTUtility;
import gregtech.api.util.MultiblockTooltipBuilder;
import gregtech.api.util.shutdown.ShutDownReasonRegistry;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
Expand All @@ -39,7 +39,7 @@
import thaumcraft.common.tiles.TileNode;

public class GT_MetaTileEntity_ResearchCompleter
extends GT_MetaTileEntity_EnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {
extends MTEEnhancedMultiBlockBase<GT_MetaTileEntity_ResearchCompleter> {

private static final int CASING_INDEX = 184;
private static final int MAX_LENGTH = 13;
Expand Down Expand Up @@ -84,7 +84,7 @@ public class GT_MetaTileEntity_ResearchCompleter
1),
onElementPass(
GT_MetaTileEntity_ResearchCompleter::onCasingFound,
ofBlock(GregTech_API.sBlockCasings8, 8))))
ofBlock(GregTechAPI.sBlockCasings8, 8))))
.addElement(
'x',
ofChain( // Check for the end but otherwise treat as a skipped spot
Expand Down Expand Up @@ -239,7 +239,7 @@ public boolean checkRecipe(ItemStack itemStack) {
ArrayList<ItemStack> tInputList = this.getStoredInputs();

for (ItemStack stack : tInputList) {
if (GT_Utility.isStackValid(stack) && stack.stackSize > 0) {
if (GTUtility.isStackValid(stack) && stack.stackSize > 0) {
if (stack.getItem() == ConfigItems.itemResearchNotes
&& !stack.stackTagCompound.getBoolean("complete")) {
ResearchNoteData noteData = ResearchManager.getData(stack);
Expand All @@ -263,7 +263,7 @@ public boolean checkRecipe(ItemStack itemStack) {
}

// Create a completed version of the note to output
this.mOutputItems = new ItemStack[] { GT_Utility.copyAmount(1, stack) };
this.mOutputItems = new ItemStack[] { GTUtility.copyAmount(1, stack) };
this.mOutputItems[0].stackTagCompound.setBoolean("complete", true);
this.mOutputItems[0].setItemDamage(64);
stack.stackSize -= 1;
Expand Down Expand Up @@ -357,8 +357,8 @@ public IStructureDefinition<GT_MetaTileEntity_ResearchCompleter> getStructureDef
}

@Override
protected GT_Multiblock_Tooltip_Builder createTooltip() {
GT_Multiblock_Tooltip_Builder tt = new GT_Multiblock_Tooltip_Builder();
protected MultiblockTooltipBuilder createTooltip() {
MultiblockTooltipBuilder tt = new MultiblockTooltipBuilder();
tt.addMachineType("Research Completer").addInfo("Controller block for the Research Completer")
.addInfo("Completes Thaumcraft research notes using EU and Thaumcraft nodes")
.addInfo("Place nodes in the center row").addSeparator()
Expand Down
18 changes: 9 additions & 9 deletions src/main/java/emt/tile/generator/TileEntityBaseGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
import emt.tile.TileEntityEMT;
import emt.util.EMTConfigHandler;
import emt.util.EMTEssentiasOutputs;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;
import gregtech.api.interfaces.tileentity.IBasicEnergyContainer;
import gregtech.api.interfaces.tileentity.IEnergyConnected;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.interfaces.tileentity.IHasWorldObjectAndCoords;
import gregtech.api.net.GT_Packet_Block_Event;
import gregtech.api.net.GTPacketBlockEvent;
import thaumcraft.api.ThaumcraftApiHelper;
import thaumcraft.api.aspects.Aspect;
import thaumcraft.api.aspects.AspectList;
Expand Down Expand Up @@ -434,18 +434,18 @@ public long getUniversalEnergyCapacity() {

@Override
public long getOutputAmperage() {
if (this.generating / 20.0D / 20.0D <= GT_Values.V[this.energySource.getSourceTier()]) {
if (this.generating / 20.0D / 20.0D <= GTValues.V[this.energySource.getSourceTier()]) {
return 1L;
}
if (this.generating / 20.0D / 20.0D % GT_Values.V[this.energySource.getSourceTier()] == 0.0D) {
return (long) (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]);
if (this.generating / 20.0D / 20.0D % GTValues.V[this.energySource.getSourceTier()] == 0.0D) {
return (long) (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]);
}
return (long) (1L + (this.generating / 20.0D / 20.0D / GT_Values.V[this.energySource.getSourceTier()]));
return (long) (1L + (this.generating / 20.0D / 20.0D / GTValues.V[this.energySource.getSourceTier()]));
}

@Override
public long getOutputVoltage() {
return GT_Values.V[this.energySource.getSourceTier()];
return GTValues.V[this.energySource.getSourceTier()];
}

@Override
Expand Down Expand Up @@ -843,9 +843,9 @@ public boolean isDead() {

@Override
public void sendBlockEvent(byte aID, byte aValue) {
GT_Values.NW.sendPacketToAllPlayersInRange(
GTValues.NW.sendPacketToAllPlayersInRange(
this.worldObj,
new GT_Packet_Block_Event(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
new GTPacketBlockEvent(this.xCoord, (short) this.yCoord, this.zCoord, aID, aValue),
this.xCoord,
this.zCoord);
}
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/emt/tile/solar/Solars.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package emt.tile.solar;

import static gregtech.api.recipe.RecipeMaps.chemicalBathRecipes;
import static gregtech.api.util.GT_RecipeBuilder.SECONDS;
import static gregtech.api.util.GTRecipeBuilder.SECONDS;
import static thaumcraft.api.aspects.Aspect.*;

import java.util.LinkedHashMap;
Expand All @@ -16,7 +16,7 @@
import emt.init.EMTBlocks;
import emt.item.block.ItemBlockSolars;
import emt.util.EMTConfigHandler;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.Materials;
import gregtech.api.enums.TierEU;
import thaumcraft.api.aspects.Aspect;
Expand Down Expand Up @@ -140,7 +140,7 @@ private static Solars getBaseSolar(double output) {
public static void registerReverseRecipes() {
for (Solars s : Solars.values()) {
if (s.aspect != null) {
GT_Values.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
GTValues.RA.stdBuilder().itemInputs(new ItemStack(EMTBlocks.solars[s.instance], 1, s.meta))
.fluidInputs(Materials.Chlorine.getGas(1000))
.itemOutputs(
new ItemStack(
Expand Down
Loading

0 comments on commit 7eabde5

Please sign in to comment.