Skip to content

Commit

Permalink
Merge pull request #16 from GTNewHorizons/opv-final
Browse files Browse the repository at this point in the history
Purge OpV
  • Loading branch information
Dream-Master authored Aug 24, 2022
2 parents dd66af0 + 00ba99e commit ccb8e28
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 72 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/sinthoras/hydroenergy/HE.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,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];
public static ItemStack[] hydroTurbineBlocks = new ItemStack[GT_Values.VN.length];
public static ItemStack[] hydroPumpBlocks = new ItemStack[GT_Values.VN.length - 1];
public static ItemStack[] hydroTurbineBlocks = new ItemStack[GT_Values.VN.length - 1];

public static boolean DEBUGslowFill = false;
public static final IGuiHandler guiHandler = new HEGuiHandler();
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/sinthoras/hydroenergy/HEUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static short chunkYToFlag(int chunkY) {
}

public static int voltageNameToTierId(String voltageName) {
for(int tierId=0;tierId<GT_Values.VN.length;tierId++){
for(int tierId=0;tierId<GT_Values.VN.length-1;tierId++){
if(GT_Values.VN[tierId].equalsIgnoreCase(voltageName)) {
return tierId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public static void registerRecipes() {
CustomItemList.Hull_UIV,
CustomItemList.Hull_UMV,
CustomItemList.Hull_UXV,
CustomItemList.Hull_OPV,
CustomItemList.Hull_MAXV
};
IItemContainer[] motors = {
Expand All @@ -48,7 +47,6 @@ public static void registerRecipes() {
ItemList.Electric_Motor_UEV,// UIV
ItemList.Electric_Motor_UEV,// UMV
ItemList.Electric_Motor_UEV,// UXV
ItemList.Electric_Motor_UEV,// OpV
ItemList.Electric_Motor_UEV // MAX
};
IItemContainer[] pumps = {
Expand All @@ -66,7 +64,6 @@ public static void registerRecipes() {
ItemList.Electric_Pump_UEV, // UIV
ItemList.Electric_Pump_UEV, // UMV
ItemList.Electric_Pump_UEV, // UXV
ItemList.Electric_Pump_UEV, // OpV
ItemList.Electric_Pump_UEV, // MAX
};
Materials[] rotorMaterialsPerVoltage = {
Expand All @@ -84,7 +81,6 @@ public static void registerRecipes() {
Materials.Neutronium, // UIV
Materials.Neutronium, // UMV
Materials.Neutronium, // UXV
Materials.Neutronium, // OpV
Materials.Neutronium, // MAX
};
Materials[] cableMaterialsPerVoltage = {
Expand All @@ -102,7 +98,6 @@ public static void registerRecipes() {
Materials.NaquadahAlloy, // UIV
Materials.NaquadahAlloy, // UMV
Materials.NaquadahAlloy, // UXV
Materials.NaquadahAlloy, // OpV
Materials.NaquadahAlloy, // MAX
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,32 +319,9 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
}
}

public static class OpV extends HEHydroPumpTileEntity {

private static final int tierId = 14;

public OpV() {
super(tierId);
}

public OpV(int id) {
super(id, tierId);
}

@Override
protected int getTier() {
return tierId;
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
return new OpV();
}
}

public static class MAX extends HEHydroPumpTileEntity {

private static final int tierId = 15;
private static final int tierId = 14;

public MAX() {
super(tierId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -319,32 +319,9 @@ public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
}
}

public static class OpV extends HEHydroTurbineTileEntity {

private static final int tierId = 14;

public OpV() {
super(tierId);
}

public OpV(int id) {
super(id, tierId);
}

@Override
protected int getTier() {
return tierId;
}

@Override
public IMetaTileEntity newMetaEntity(IGregTechTileEntity tileEntity) {
return new OpV();
}
}

public static class MAX extends HEHydroTurbineTileEntity {

private static final int tierId = 15;
private static final int tierId = 14;

public MAX() {
super(tierId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ private static class Categories {
public static float pressureIncreasePerTier = Defaults.pressureIncreasePerTier;
public static float milliBucketPerEU = Defaults.milliBucketPerEU;
public static float euPerMilliBucket = 1.0f / Defaults.milliBucketPerEU;
public static boolean[] enabledTiers = new boolean[GT_Values.VN.length];
public static boolean[] enabledTiers = new boolean[GT_Values.VN.length - 1];
public static boolean useLimitedRendering = Defaults.useLimitedRendering;
public static boolean forceOpenGL = Defaults.forceOpenGL;

Expand Down
28 changes: 13 additions & 15 deletions src/main/java/com/sinthoras/hydroenergy/hooks/HEHooksShared.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@


public class HEHooksShared {
// preInit "Run before anything else. Read your config, create blocks, items,

// preInit "Run before anything else. Read your config, create blocks, items,
// etc, and register them with the GameRegistry."
public void fmlLifeCycleEvent(FMLPreInitializationEvent event) {
HEConfig.syncronizeConfiguration(event.getSuggestedConfigurationFile());
Expand All @@ -57,7 +57,7 @@ public void fmlLifeCycleEvent(FMLPreInitializationEvent event) {

FluidRegistry.registerFluid(HE.pressurizedWater);
}

// load "Do your mod setup. Build whatever data structures you care about. Register recipes."
public void fmlLifeCycleEvent(FMLInitializationEvent event) {
FMLCommonHandler.instance().bus().register(new HEHooksFML());
Expand Down Expand Up @@ -92,10 +92,8 @@ public void fmlLifeCycleEvent(FMLInitializationEvent event) {
HE.hydroTurbineBlocks[12] = new HEHydroTurbineTileEntity.UMV(HEConfig.blockIdOffset + 17).getStackForm(1L);
HE.hydroPumpBlocks[13] = new HEHydroPumpTileEntity.UXV(HEConfig.blockIdOffset + 1).getStackForm(1L);
HE.hydroTurbineBlocks[13] = new HEHydroTurbineTileEntity.UXV(HEConfig.blockIdOffset + 17).getStackForm(1L);
HE.hydroPumpBlocks[14] = new HEHydroPumpTileEntity.OpV(HEConfig.blockIdOffset + 1).getStackForm(1L);
HE.hydroTurbineBlocks[14] = new HEHydroTurbineTileEntity.OpV(HEConfig.blockIdOffset + 17).getStackForm(1L);
HE.hydroPumpBlocks[15] = new HEHydroPumpTileEntity.MAX(HEConfig.blockIdOffset + 1).getStackForm(1L);
HE.hydroTurbineBlocks[15] = new HEHydroTurbineTileEntity.MAX(HEConfig.blockIdOffset + 17).getStackForm(1L);
HE.hydroPumpBlocks[14] = new HEHydroPumpTileEntity.MAX(HEConfig.blockIdOffset + 1).getStackForm(1L);
HE.hydroTurbineBlocks[14] = new HEHydroTurbineTileEntity.MAX(HEConfig.blockIdOffset + 17).getStackForm(1L);

// Hide blocks in NEI if not enabled
for(int tierId=0;tierId<HEConfig.enabledTiers.length;tierId++) {
Expand All @@ -109,13 +107,13 @@ public void fmlLifeCycleEvent(FMLInitializationEvent event) {
}
}
}

// postInit "Handle interaction with other mods, complete your setup based on this."
public void fmlLifeCycleEvent(FMLPostInitializationEvent event) {
NetworkRegistry.INSTANCE.registerGuiHandler(HETags.MODID, HE.guiHandler);
HEBlockRecipes.registerRecipes();
}

public void fmlLifeCycleEvent(FMLServerAboutToStartEvent event) {

}
Expand All @@ -129,16 +127,16 @@ public void fmlLifeCycleEvent(FMLServerStartingEvent event) {
HEServer.instance = HEServer.load(event.getServer().worldServers[0]);
}
}

public void fmlLifeCycleEvent(FMLServerStartedEvent event) {

}

public void fmlLifeCycleEvent(FMLServerStoppingEvent event) {

}

public void fmlLifeCycleEvent(FMLServerStoppedEvent event) {

}
}

0 comments on commit ccb8e28

Please sign in to comment.