Skip to content

Commit

Permalink
Merge pull request #27 from GTNewHorizons/rename
Browse files Browse the repository at this point in the history
bump gt, fix rename
  • Loading branch information
boubou19 authored Sep 3, 2024
2 parents 702bc70 + 79bb08b commit c6fdc52
Show file tree
Hide file tree
Showing 10 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
dependencies {
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.48.97:dev')
api('com.github.GTNewHorizons:GT5-Unofficial:5.09.49.56:dev')
api('com.github.GTNewHorizons:NotEnoughItems:2.6.14-GTNH:dev')
compileOnly('com.github.GTNewHorizons:MyTown2:0.5.4-GTNH:dev')
}
6 changes: 3 additions & 3 deletions src/main/java/com/sinthoras/hydroenergy/HE.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;

public class HE {

Expand Down Expand Up @@ -48,8 +48,8 @@ public class HE {
public static final HEWaterStill[] waterBlocks = new HEWaterStill[HEConfig.maxDams];
public static final int[] waterBlockIds = new int[HEConfig.maxDams];
public static ItemStack hydroDamControllerBlock;
public static ItemStack[] hydroPumpBlocks = new ItemStack[GT_Values.VN.length - 1];
public static ItemStack[] hydroTurbineBlocks = new ItemStack[GT_Values.VN.length - 1];
public static ItemStack[] hydroPumpBlocks = new ItemStack[GTValues.VN.length - 1];
public static ItemStack[] hydroTurbineBlocks = new ItemStack[GTValues.VN.length - 1];

public static boolean DEBUGslowFill = false;
public static final IGuiHandler guiHandler = new HEGuiHandler();
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/sinthoras/hydroenergy/HEUtil.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.sinthoras.hydroenergy;

import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;

public class HEUtil {

Expand Down Expand Up @@ -41,8 +41,8 @@ public static short chunkYToFlag(int chunkY) {
}

public static int voltageNameToTierId(String voltageName) {
for (int tierId = 0; tierId < GT_Values.VN.length - 1; tierId++) {
if (GT_Values.VN[tierId].equalsIgnoreCase(voltageName)) {
for (int tierId = 0; tierId < GTValues.VN.length - 1; tierId++) {
if (GTValues.VN[tierId].equalsIgnoreCase(voltageName)) {
return tierId;
}
}
Expand Down
40 changes: 20 additions & 20 deletions src/main/java/com/sinthoras/hydroenergy/blocks/HEBlockRecipes.java
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
package com.sinthoras.hydroenergy.blocks;

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.item.ItemStack;

import com.github.technus.tectech.thing.CustomItemList;
import com.sinthoras.hydroenergy.HE;
import com.sinthoras.hydroenergy.config.HEConfig;

import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.ItemList;
import gregtech.api.enums.Materials;
import gregtech.api.enums.OrePrefixes;
import gregtech.api.enums.SubTag;
import gregtech.api.enums.TierEU;
import gregtech.api.interfaces.IItemContainer;
import gregtech.api.util.GT_OreDictUnificator;
import gregtech.api.util.GT_Utility;
import gregtech.api.util.GTOreDictUnificator;
import gregtech.api.util.GTUtility;
import tectech.thing.CustomItemList;

public class HEBlockRecipes {

// TODO: Fill up recipe components as needed
private static boolean isSolderingMaterial(Materials material) {
return material.mStandardMoltenFluid != null && material.contains(SubTag.SOLDERING_MATERIAL)
&& !(GregTech_API.mUseOnlyGoodSolderingMaterials && !material.contains(SubTag.SOLDERING_MATERIAL_GOOD));
&& !(GregTechAPI.mUseOnlyGoodSolderingMaterials && !material.contains(SubTag.SOLDERING_MATERIAL_GOOD));
}

public static void registerRecipes() {
Expand Down Expand Up @@ -94,13 +94,13 @@ public static void registerRecipes() {
int multiplier = material.contains(SubTag.SOLDERING_MATERIAL_GOOD) ? 1
: material.contains(SubTag.SOLDERING_MATERIAL_BAD) ? 4 : 2;

GT_Values.RA.stdBuilder()
GTValues.RA.stdBuilder()
.itemInputs(
ItemList.Casing_SolidSteel.get(1L),
new ItemStack(GregTech_API.sBlockConcretes, 2, 8),
new ItemStack(GregTechAPI.sBlockConcretes, 2, 8),
ItemList.Cover_Screen.get(1L),
ItemList.FluidRegulator_MV.get(2L),
GT_Utility.getIntegratedCircuit(1))
GTUtility.getIntegratedCircuit(1))
.itemOutputs(HE.hydroDamControllerBlock).fluidInputs(material.getMolten(144L * multiplier / 2L))
.duration(10 * SECONDS).eut(TierEU.RECIPE_LV).addTo(assemblerRecipes);

Expand All @@ -109,28 +109,28 @@ public static void registerRecipes() {
continue;
}

GT_Values.RA.stdBuilder()
GTValues.RA.stdBuilder()
.itemInputs(
hulls[tierId].get(1L),
GT_OreDictUnificator.get(OrePrefixes.rotor, rotorMaterialsPerVoltage[tierId], 2L),
GTOreDictUnificator.get(OrePrefixes.rotor, rotorMaterialsPerVoltage[tierId], 2L),
motors[tierId].get(1L),
pumps[tierId].get(1L),
GT_OreDictUnificator.get(OrePrefixes.cableGt01, cableMaterialsPerVoltage[tierId], 2L),
GT_Utility.getIntegratedCircuit(1))
GTOreDictUnificator.get(OrePrefixes.cableGt01, cableMaterialsPerVoltage[tierId], 2L),
GTUtility.getIntegratedCircuit(1))
.itemOutputs(HE.hydroPumpBlocks[tierId]).fluidInputs(material.getMolten(144L * multiplier / 2L))
.duration(10 * SECONDS).eut(GT_Values.V[tierId - 1]).addTo(assemblerRecipes);
.duration(10 * SECONDS).eut(GTValues.V[tierId - 1]).addTo(assemblerRecipes);

GT_Values.RA.stdBuilder()
GTValues.RA.stdBuilder()
.itemInputs(
hulls[tierId].get(1L),
GT_OreDictUnificator.get(OrePrefixes.rotor, rotorMaterialsPerVoltage[tierId], 2L),
GTOreDictUnificator.get(OrePrefixes.rotor, rotorMaterialsPerVoltage[tierId], 2L),
motors[tierId].get(1L),
pumps[tierId].get(1L),
GT_OreDictUnificator.get(OrePrefixes.cableGt01, cableMaterialsPerVoltage[tierId], 2L),
GT_Utility.getIntegratedCircuit(2))
GTOreDictUnificator.get(OrePrefixes.cableGt01, cableMaterialsPerVoltage[tierId], 2L),
GTUtility.getIntegratedCircuit(2))
.itemOutputs(HE.hydroTurbineBlocks[tierId])
.fluidInputs(material.getMolten(144L * multiplier / 2L)).duration(10 * SECONDS)
.eut(GT_Values.V[tierId - 1]).addTo(assemblerRecipes);
.eut(GTValues.V[tierId - 1]).addTo(assemblerRecipes);

}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package com.sinthoras.hydroenergy.blocks;

import static com.gtnewhorizon.structurelib.structure.StructureUtility.*;
import static gregtech.api.util.GT_StructureUtility.ofHatchAdder;
import static gregtech.api.util.GT_Utility.filterValidMTEs;
import static gregtech.api.util.GTStructureUtility.ofHatchAdder;
import static gregtech.api.util.GTUtility.filterValidMTEs;

import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
Expand All @@ -13,8 +13,6 @@
import net.minecraftforge.common.util.ForgeDirection;
import net.minecraftforge.fluids.FluidStack;

import com.github.technus.tectech.thing.metaTileEntity.multi.base.GT_MetaTileEntity_MultiblockBase_EM;
import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.gtnewhorizon.structurelib.alignment.constructable.IConstructable;
import com.gtnewhorizon.structurelib.structure.IStructureDefinition;
import com.gtnewhorizon.structurelib.structure.StructureDefinition;
Expand All @@ -35,16 +33,18 @@
import cpw.mods.fml.common.network.internal.FMLNetworkHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.GregTech_API;
import gregtech.api.enums.GT_Values;
import gregtech.api.GregTechAPI;
import gregtech.api.enums.GTValues;
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_Hatch_Output;
import gregtech.api.util.GT_Utility;
import gregtech.api.metatileentity.implementations.MTEHatchOutput;
import gregtech.api.util.GTUtility;
import tectech.thing.metaTileEntity.multi.base.TTMultiblockBase;
import tectech.thing.metaTileEntity.multi.base.render.TTRenderedExtendedFacingTexture;

public class HEHydroDamTileEntity extends GT_MetaTileEntity_MultiblockBase_EM implements IConstructable {
public class HEHydroDamTileEntity extends TTMultiblockBase implements IConstructable {

private static Textures.BlockIcons.CustomIcon Screen;
private static final int steelTextureIndex = 16;
Expand Down Expand Up @@ -74,10 +74,10 @@ public class HEHydroDamTileEntity extends GT_MetaTileEntity_MultiblockBase_EM im
ofHatchAdder(
HEHydroDamTileEntity::addClassicToMachineList,
steelTextureIndex,
GregTech_API.sBlockConcretes,
GregTechAPI.sBlockConcretes,
concreteBlockMeta),
ofBlockAnyMeta(GregTech_API.sBlockConcretes, concreteBlockMeta)))
.addElement('C', ofBlockAnyMeta(GregTech_API.sBlockConcretes, concreteBlockMeta)).build();
ofBlockAnyMeta(GregTechAPI.sBlockConcretes, concreteBlockMeta)))
.addElement('C', ofBlockAnyMeta(GregTechAPI.sBlockConcretes, concreteBlockMeta)).build();

public HEHydroDamTileEntity(String name) {
super(name);
Expand Down Expand Up @@ -127,8 +127,8 @@ private float getMaxGuiPressure() {

private int getVoltageTier() {
boolean configCircuitIsPresent = mInventory != null && mInventory[1] != null
&& mInventory[1].getItem() == GT_Utility.getIntegratedCircuit(0).getItem();
return configCircuitIsPresent ? HEUtil.clamp(mInventory[1].getItemDamage(), 1, GT_Values.V.length - 1) : 1;
&& mInventory[1].getItem() == GTUtility.getIntegratedCircuit(0).getItem();
return configCircuitIsPresent ? HEUtil.clamp(mInventory[1].getItemDamage(), 1, GTValues.V.length - 1) : 1;
}

@Override
Expand Down Expand Up @@ -181,7 +181,7 @@ public boolean onRunningTick(ItemStack stack) {

private int distributeFluid(FluidStack fluidStack) {
final int availableFluid = fluidStack.amount;
for (GT_MetaTileEntity_Hatch_Output hatch : filterValidMTEs(mOutputHatches)) {
for (MTEHatchOutput hatch : filterValidMTEs(mOutputHatches)) {
if (!hatch.outputsLiquids()) {
continue;
}
Expand Down Expand Up @@ -233,7 +233,7 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect
int colorIndex, boolean isActive, boolean hasRedstoneSignal) {
if (side == facing) {
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(steelTextureIndex),
new TT_RenderedExtendedFacingTexture(Screen) };
new TTRenderedExtendedFacingTexture(Screen) };
} else {
return new ITexture[] { Textures.BlockIcons.getCasingTextureForId(steelTextureIndex) };
}
Expand Down Expand Up @@ -362,10 +362,10 @@ public void addUIWidgets(ModularWindow.Builder builder, UIBuildContext buildCont

builder.widget(new FakeSyncWidget.IntegerSyncer(() -> waterId, val -> waterId = val))
.widget(
TextWidget.dynamicString(() -> "Hydro Dam (" + GT_Values.VN[getVoltageTier()] + ")")
TextWidget.dynamicString(() -> "Hydro Dam (" + GTValues.VN[getVoltageTier()] + ")")
.setSynced(false).setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 8))
.widget(
new TextWidget(GT_Utility.trans("142", "Running perfectly."))
new TextWidget(GTUtility.trans("142", "Running perfectly."))
.setDefaultColor(COLOR_TEXT_WHITE.get()).setPos(7, 16))
.widget(TextWidget.dynamicString(() -> {
if (getFillMultiplier() > 1.0f) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;

import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.sinthoras.hydroenergy.HE;
import com.sinthoras.hydroenergy.config.HEConfig;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import tectech.thing.metaTileEntity.multi.base.render.TTRenderedExtendedFacingTexture;

public abstract class HEHydroPumpTileEntity extends HETieredTileEntity {

Expand Down Expand Up @@ -349,19 +349,19 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
private final int blockTextureIndex = getCasingTextureId();

public HEHydroPumpTileEntity(int tierId) {
super("he_pump_" + GT_Values.VN[tierId].toLowerCase());
super("he_pump_" + GTValues.VN[tierId].toLowerCase());
}

public HEHydroPumpTileEntity(int blockId, int tierId) {
super(
blockId + tierId,
"he_pump_" + GT_Values.VN[tierId].toLowerCase(),
"Hydro Pump (" + GT_Values.VN[tierId] + ")");
"he_pump_" + GTValues.VN[tierId].toLowerCase(),
"Hydro Pump (" + GTValues.VN[tierId] + ")");
}

@Override
public void onTick() {
int requiredWater = (int) (GT_Values.V[getTier()] * HEConfig.milliBucketPerEU);
int requiredWater = (int) (GTValues.V[getTier()] * HEConfig.milliBucketPerEU);
for (FluidStack fluidStack : getStoredFluids()) {
if (fluidStack.getFluid().getID() == FluidRegistry.WATER.getID()) {
final int consumedWater = Math.min(fluidStack.amount, requiredWater);
Expand Down Expand Up @@ -396,12 +396,12 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect
if (isActive) {
return new ITexture[] {
Textures.BlockIcons.casingTexturePages[blockTextureIndex >> 6][blockTextureIndex & 0x3f],
new TT_RenderedExtendedFacingTexture(textureScreenPumpON),
new TT_RenderedExtendedFacingTexture(textureScreenArrowUpAnimated) };
new TTRenderedExtendedFacingTexture(textureScreenPumpON),
new TTRenderedExtendedFacingTexture(textureScreenArrowUpAnimated) };
} else {
return new ITexture[] {
Textures.BlockIcons.casingTexturePages[blockTextureIndex >> 6][blockTextureIndex & 0x3f],
new TT_RenderedExtendedFacingTexture(textureScreenPumpOFF) };
new TTRenderedExtendedFacingTexture(textureScreenPumpOFF) };
}
} else {
return new ITexture[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@
import net.minecraftforge.fluids.FluidRegistry;
import net.minecraftforge.fluids.FluidStack;

import com.github.technus.tectech.thing.metaTileEntity.multi.base.render.TT_RenderedExtendedFacingTexture;
import com.sinthoras.hydroenergy.HE;
import com.sinthoras.hydroenergy.config.HEConfig;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.enums.GT_Values;
import gregtech.api.enums.GTValues;
import gregtech.api.enums.Textures;
import gregtech.api.interfaces.ITexture;
import gregtech.api.interfaces.metatileentity.IMetaTileEntity;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import tectech.thing.metaTileEntity.multi.base.render.TTRenderedExtendedFacingTexture;

public abstract class HEHydroTurbineTileEntity extends HETieredTileEntity {

Expand Down Expand Up @@ -349,14 +349,14 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
private final int blockTextureIndex = getCasingTextureId();

public HEHydroTurbineTileEntity(int tierId) {
super("he_turbine_" + GT_Values.VN[tierId].toLowerCase());
super("he_turbine_" + GTValues.VN[tierId].toLowerCase());
}

public HEHydroTurbineTileEntity(int blockId, int tierId) {
super(
blockId + tierId,
"he_turbine_" + GT_Values.VN[tierId].toLowerCase(),
"Hydro Turbine (" + GT_Values.VN[tierId] + ")");
"he_turbine_" + GTValues.VN[tierId].toLowerCase(),
"Hydro Turbine (" + GTValues.VN[tierId] + ")");
}

@Override
Expand Down Expand Up @@ -394,12 +394,12 @@ public ITexture[] getTexture(IGregTechTileEntity baseMetaTileEntity, ForgeDirect
if (isActive) {
return new ITexture[] {
Textures.BlockIcons.casingTexturePages[blockTextureIndex >> 6][blockTextureIndex & 0x3f],
new TT_RenderedExtendedFacingTexture(textureScreenTurbineON),
new TT_RenderedExtendedFacingTexture(textureScreenArrowDownAnimated) };
new TTRenderedExtendedFacingTexture(textureScreenTurbineON),
new TTRenderedExtendedFacingTexture(textureScreenArrowDownAnimated) };
} else {
return new ITexture[] {
Textures.BlockIcons.casingTexturePages[blockTextureIndex >> 6][blockTextureIndex & 0x3f],
new TT_RenderedExtendedFacingTexture(textureScreenTurbineOFF) };
new TTRenderedExtendedFacingTexture(textureScreenTurbineOFF) };
}
} else {
return new ITexture[] {
Expand Down
Loading

0 comments on commit c6fdc52

Please sign in to comment.