From 815ddbfe127301f8586599f1c5483a09f9a6374a Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Tue, 18 Feb 2020 12:32:37 +0100 Subject: one more TFFT cell, fixed press/alloying recipes, improved fuel cells --- config/GregTech/Recipes.cfg | 1 + config/IC2.ini | 2 +- config/splash.properties | 2 +- .../java/itemBlocks/IB_TFFTStorageFieldBlockT5.java | 2 +- src/main/java/kekztech/KekzCore.java | 21 ++++++++++++++++++--- .../java/tileentities/GTMTE_FluidMultiStorage.java | 2 +- src/main/java/tileentities/GTMTE_SOFuelCellMK1.java | 19 +++++++++---------- src/main/java/tileentities/GTMTE_SOFuelCellMK2.java | 19 +++++++++---------- src/main/resources/assets/kekztech/lang/en_US.lang | 1 + 9 files changed, 42 insertions(+), 27 deletions(-) diff --git a/config/GregTech/Recipes.cfg b/config/GregTech/Recipes.cfg index b6226a0d1a..c24d5193da 100644 --- a/config/GregTech/Recipes.cfg +++ b/config/GregTech/Recipes.cfg @@ -4713,6 +4713,7 @@ assembling { I:tile.kekztech_tfftstoragefieldblock3_block_300=300 I:tile.kekztech_tfftstoragefieldblock3_block_400=400 I:tile.kekztech_tfftstoragefieldblock4_block_400=400 + I:tile.kekztech_tfftstoragefieldblock5_block_400=400 I:tile.kekztech_yszceramicelectrolyteunit_block_1200=1200 I:tile.kekztech_yszceramicelectrolyteunit_block_2400=2400 I:tile.lever_400=400 diff --git a/config/IC2.ini b/config/IC2.ini index d3e7151b25..9c17d451e1 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,5 +1,5 @@ ; ic2 general config -; created Nov 24, 2019 6:42:09 PM +; created Feb 18, 2020 12:21:02 PM ;--- [worldgen] diff --git a/config/splash.properties b/config/splash.properties index 49794cfda6..e6ad6c72ce 100644 --- a/config/splash.properties +++ b/config/splash.properties @@ -1,5 +1,5 @@ #Splash screen properties -#Sun Nov 24 18:42:01 CET 2019 +#Tue Feb 18 12:20:53 CET 2020 logoTexture=textures/gui/title/mojang.png background=0xFFFFFF font=0x0 diff --git a/src/main/java/itemBlocks/IB_TFFTStorageFieldBlockT5.java b/src/main/java/itemBlocks/IB_TFFTStorageFieldBlockT5.java index caef257f93..304f2a221c 100644 --- a/src/main/java/itemBlocks/IB_TFFTStorageFieldBlockT5.java +++ b/src/main/java/itemBlocks/IB_TFFTStorageFieldBlockT5.java @@ -19,7 +19,7 @@ public class IB_TFFTStorageFieldBlockT5 extends ItemBlock { public void addInformation(ItemStack stack, EntityPlayer player, List lines, boolean advancedTooltips) { lines.add("This is not a fluid tank"); lines.add("Capacity: " + Block_TFFTStorageFieldBlockT5.getCapacity() + "L"); - lines.add("Power Draw: 0.5EU/t"); + lines.add("Power Draw: 8EU/t"); } } \ No newline at end of file diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index 247131c7f7..114446ad38 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -16,6 +16,7 @@ import blocks.Block_TFFTStorageFieldBlockT1; import blocks.Block_TFFTStorageFieldBlockT2; import blocks.Block_TFFTStorageFieldBlockT3; import blocks.Block_TFFTStorageFieldBlockT4; +import blocks.Block_TFFTStorageFieldBlockT5; import blocks.Block_YSZUnit; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.Loader; @@ -95,6 +96,7 @@ public class KekzCore { Block_TFFTStorageFieldBlockT2.getInstance().registerBlock(); Block_TFFTStorageFieldBlockT3.getInstance().registerBlock(); Block_TFFTStorageFieldBlockT4.getInstance().registerBlock(); + Block_TFFTStorageFieldBlockT5.getInstance().registerBlock(); Block_TFFTMultiHatch.getInstance().registerBlock(); Block_ReactorChamber_OFF.getInstance().registerBlock(); Block_ReactorChamber_ON.getInstance().registerBlock(); @@ -284,7 +286,7 @@ public class KekzCore { 200, 480); final ItemStack[] tfftstoragefield3 = { GT_Utility.getIntegratedCircuit(6), - GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 4), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Data, 2), GT_OreDictUnificator.get(OrePrefixes.plate, Materials.VibrantAlloy, 2), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Titanium, 1), ItemList.Field_Generator_MV.get(1L), @@ -308,6 +310,19 @@ public class KekzCore { FluidRegistry.getFluidStack("molten.epoxid", 1152), new ItemStack(Block_TFFTStorageFieldBlockT4.getInstance(), 1), 400, 4098); + final ItemStack[] tfftstoragefield5 = { + GT_Utility.getIntegratedCircuit(6), + GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 4), + GT_OreDictUnificator.get(OrePrefixes.plateTriple, Materials.HSSS, 1), + GT_OreDictUnificator.get(OrePrefixes.pipeHuge, Materials.Enderium, 1), + ItemList.Field_Generator_EV.get(1L), + ItemList.Electric_Pump_IV.get(1L) + }; + GT_Values.RA.addAssemblerRecipe( + tfftstoragefield5, + FluidRegistry.getFluidStack("molten.epoxid", 1152), + new ItemStack(Block_TFFTStorageFieldBlockT5.getInstance(), 1), + 400, 4098); final Object[] multi_hatch = { "PRP", "UFU", "PRP", 'P', GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 1), @@ -345,12 +360,12 @@ public class KekzCore { // Ceramic plates GT_Values.RA.addAlloySmelterRecipe( craftingItem.getStackOfAmountFromDamage(Items.YSZCeramicDust.getMetaID(), Loader.isModLoaded("bartworks") ? 3 : 10), - ItemList.Shape_Mold_Plate.get(1), + ItemList.Shape_Mold_Plate.get(0), craftingItem.getStackOfAmountFromDamage(Items.YSZCeramicPlate.getMetaID(), 1), 400, 480); GT_Values.RA.addFormingPressRecipe( craftingItem.getStackOfAmountFromDamage(Items.GDCCeramicDust.getMetaID(), 10), - ItemList.Shape_Mold_Plate.get(1), + ItemList.Shape_Mold_Plate.get(0), craftingItem.getStackOfAmountFromDamage(Items.GDCCeramicPlate.getMetaID(), 1), 800, 480); diff --git a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java index 945309ad80..221fd03a49 100644 --- a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java @@ -343,7 +343,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { runningCostAcc += 4.0f; fluidCapacityAcc += (float) STORAGE_FIELD4.getCapacity(); } else if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() - .equals(STORAGE_FIELD4.getUnlocalizedName())) { + .equals(STORAGE_FIELD5.getUnlocalizedName())) { runningCostAcc += 8.0f; fluidCapacityAcc += (float) STORAGE_FIELD5.getCapacity(); } else { diff --git a/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java b/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java index 9aa0a5c01d..197799149c 100644 --- a/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java +++ b/src/main/java/tileentities/GTMTE_SOFuelCellMK1.java @@ -35,9 +35,9 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { private final int CASING_META = 1; private final int CASING_TEXTURE_ID = 49; - private final int OXYGEN_PER_TICK = 20; + private final int OXYGEN_PER_SEC = 400; private final int EU_PER_TICK = 1024; - private final int STEAM_PER_TICK = 900; + private final int STEAM_PER_SEC = 18000; public GTMTE_SOFuelCellMK1(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -60,8 +60,8 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { b.addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") .addInfo("Consumes 29,480EU worth of fuel with up to 97% efficiency each second") .addInfo("Steam production requires the SOFC to heat up completely first") - .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_TICK + "L/t Steam") - .addInfo("Additionally requires " + OXYGEN_PER_TICK + "L/t Oxygen gas") + .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") + .addInfo("Additionally requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") .addSeparator() .beginStructureBlock(3, 3, 5) .addController("Front Center") @@ -119,22 +119,21 @@ public class GTMTE_SOFuelCellMK1 extends GT_MetaTileEntity_MultiBlockBase { if((liquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null && hatchFluid.isFluidEqual(liquid)) { - liquid.amount = EU_PER_TICK / aFuel.mSpecialValue; + liquid.amount = Math.round((EU_PER_TICK * 20) / aFuel.mSpecialValue); if(super.depleteInput(liquid)) { - if(!super.depleteInput(Materials.Oxygen.getGas(OXYGEN_PER_TICK))) { + if(!super.depleteInput(Materials.Oxygen.getGas(OXYGEN_PER_SEC))) { super.mEUt = 0; super.mEfficiency = 0; return false; } super.mEUt = EU_PER_TICK; - super.mProgresstime = 1; - super.mMaxProgresstime = 1; - super.mEfficiencyIncrease = 5; + super.mMaxProgresstime = 20; + super.mEfficiencyIncrease = 40; if(super.mEfficiency == getMaxEfficiency(null)) { - super.addOutput(GT_ModHandler.getSteam(STEAM_PER_TICK)); + super.addOutput(GT_ModHandler.getSteam(STEAM_PER_SEC)); } return true; } diff --git a/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java b/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java index 3ecba204ce..de8b37cb85 100644 --- a/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java +++ b/src/main/java/tileentities/GTMTE_SOFuelCellMK2.java @@ -35,9 +35,9 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { final int CASING_META = 0; final int CASING_TEXTURE_ID = 48; - private final int OXYGEN_PER_TICK = 100; + private final int OXYGEN_PER_SEC = 2000; private final int EU_PER_TICK = 24576; // 100% Efficiency, 3A IV - private final int STEAM_PER_TICK = 4800; // SH Steam (10,800EU/t @ 150% Efficiency) + private final int STEAM_PER_SEC = 96000; // SH Steam (10,800EU/t @ 150% Efficiency) public GTMTE_SOFuelCellMK2(int aID, String aName, String aNameRegional) { super(aID, aName, aNameRegional); @@ -60,8 +60,8 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { b.addInfo("Oxidizes gas fuels to generate electricity without polluting the environment") .addInfo("Consumes 442,200EU worth of fuel with up to 97% efficiency each second") .addInfo("Steam production requires the SOFC to heat up completely first") - .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_TICK + "L/t Steam") - .addInfo("Additionally requires " + OXYGEN_PER_TICK + "L/t Oxygen gas") + .addInfo("Outputs " + EU_PER_TICK + "EU/t and " + STEAM_PER_SEC + "L/s Steam") + .addInfo("Additionally requires " + OXYGEN_PER_SEC + "L/s Oxygen gas") .addSeparator() .beginStructureBlock(3, 3, 5) .addController("Front Center") @@ -119,22 +119,21 @@ public class GTMTE_SOFuelCellMK2 extends GT_MetaTileEntity_MultiBlockBase { if((liquid = GT_Utility.getFluidForFilledItem(aFuel.getRepresentativeInput(0), true)) != null && hatchFluid.isFluidEqual(liquid)) { - liquid.amount = EU_PER_TICK / aFuel.mSpecialValue; + liquid.amount = Math.round((EU_PER_TICK * 20) / aFuel.mSpecialValue); if(super.depleteInput(liquid)) { - if(!super.depleteInput(Materials.Oxygen.getGas(OXYGEN_PER_TICK))) { + if(!super.depleteInput(Materials.Oxygen.getGas(OXYGEN_PER_SEC))) { super.mEUt = 0; super.mEfficiency = 0; return false; } super.mEUt = EU_PER_TICK; - super.mProgresstime = 1; - super.mMaxProgresstime = 1; - super.mEfficiencyIncrease = 20; + super.mMaxProgresstime = 20; + super.mEfficiencyIncrease = 80; if(super.mEfficiency == getMaxEfficiency(null)) { - super.addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", STEAM_PER_TICK)); + super.addOutput(FluidRegistry.getFluidStack("ic2superheatedsteam", STEAM_PER_SEC)); } return true; } diff --git a/src/main/resources/assets/kekztech/lang/en_US.lang b/src/main/resources/assets/kekztech/lang/en_US.lang index d21ed0462e..1fffdf2b4e 100644 --- a/src/main/resources/assets/kekztech/lang/en_US.lang +++ b/src/main/resources/assets/kekztech/lang/en_US.lang @@ -82,6 +82,7 @@ tile.kekztech_tfftstoragefieldblock1_block.name=T.F.F.T Storage Field Block (Tie tile.kekztech_tfftstoragefieldblock2_block.name=T.F.F.T Storage Field Block (Tier II) tile.kekztech_tfftstoragefieldblock3_block.name=T.F.F.T Storage Field Block (Tier III) tile.kekztech_tfftstoragefieldblock4_block.name=T.F.F.T Storage Field Block (Tier IV) +tile.kekztech_tfftstoragefieldblock5_block.name=T.F.F.T Storage Field Block (Tier V) tile.kekztech_tfftmultihatch_block.name=T.F.F.T Multi-Fluid I/O Hatch tile.kekztech_controlrod_block.name=Nuclear Reactor Control Rod -- cgit From ba8d49bd6c77d69630135c887272e9d0c8c7311d Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Tue, 18 Feb 2020 16:01:52 +0100 Subject: Fixed Item Server structure check. Wrote better doc for the MIH --- config/IC2.ini | 2 +- config/splash.properties | 2 +- src/main/java/kekztech/KekzCore.java | 1 - src/main/java/kekztech/MultiItemHandler.java | 112 +++++++++++++++------ src/main/java/tileentities/GTMTE_ItemServer.java | 121 ++++++++++++----------- 5 files changed, 144 insertions(+), 94 deletions(-) diff --git a/config/IC2.ini b/config/IC2.ini index 9c17d451e1..2f0c00ea49 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,5 +1,5 @@ ; ic2 general config -; created Feb 18, 2020 12:21:02 PM +; created Feb 18, 2020 3:08:27 PM ;--- [worldgen] diff --git a/config/splash.properties b/config/splash.properties index e6ad6c72ce..e4d7b3edba 100644 --- a/config/splash.properties +++ b/config/splash.properties @@ -1,5 +1,5 @@ #Splash screen properties -#Tue Feb 18 12:20:53 CET 2020 +#Tue Feb 18 15:08:17 CET 2020 logoTexture=textures/gui/title/mojang.png background=0xFFFFFF font=0x0 diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index 114446ad38..64e1298d3c 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -18,7 +18,6 @@ import blocks.Block_TFFTStorageFieldBlockT3; import blocks.Block_TFFTStorageFieldBlockT4; import blocks.Block_TFFTStorageFieldBlockT5; import blocks.Block_YSZUnit; -import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.event.FMLInitializationEvent; diff --git a/src/main/java/kekztech/MultiItemHandler.java b/src/main/java/kekztech/MultiItemHandler.java index 766abbbb93..9416dbebcf 100644 --- a/src/main/java/kekztech/MultiItemHandler.java +++ b/src/main/java/kekztech/MultiItemHandler.java @@ -1,7 +1,5 @@ package kekztech; -import java.util.ArrayList; - import net.minecraft.item.ItemStack; public class MultiItemHandler { @@ -10,31 +8,44 @@ public class MultiItemHandler { private boolean locked = true; - private final ArrayList items = new ArrayList<>(); + private ItemStack[] items; public MultiItemHandler() { } - /** - * Tries to adapt the internal storage to match structure changes. - * Structure should turn off and give a warning if this returns false. - * Otherwise items might unavailable. + /** + * Adapts the internal storage to structure changes. + * In the event of structure down-sizing, all excess items + * will be dropped on the ground. * * @param itemTypeCapacity - * New item array length to adapt to. - * @return Success status of the operation. */ - public boolean setItemTypeCapacity(int itemTypeCapacity) { - if(items.size() > itemTypeCapacity) { - System.out.println("WARNING: ITEM SERVER STRUCTURE WAS DOWNSIZED TOO FAR! LOCKING FOR SAFETY."); - setLock(true); - return false; + public void setItemTypeCapacity(int itemTypeCapacity) { + if(items.length > itemTypeCapacity) { + // Generate new smaller backing array + final ItemStack[] newItems = new ItemStack[itemTypeCapacity]; + for(int i = 0; i < newItems.length; i++) { + newItems[i] = items[i]; + } + // Sort out item overflow + final ItemStack[] toDrop = new ItemStack[items.length - itemTypeCapacity]; + for(int i = 0; i < toDrop.length; i++) { + toDrop[i] = items[i + newItems.length - 1]; + } + // TODO drop overflow items to the ground + + // Swap array + items = newItems; } else { - items.ensureCapacity(itemTypeCapacity); - // If the lock was engaged, it should only be disengaged by turning - // the structure back on after fixing the above warning. - return true; + // Generate new larger backing array + final ItemStack[] newItems = new ItemStack[itemTypeCapacity]; + for(int i = 0; i < items.length; i++) { + newItems[i] = items[i]; + } + + // Swap array + items = newItems; } } @@ -44,7 +55,6 @@ public class MultiItemHandler { /** * Lock internal storage in case Item Server is not running. - * May also be engaged in case of item safety issues. * * @param state * Lock state. @@ -54,60 +64,98 @@ public class MultiItemHandler { } public int getItemTypeCapacity() { - return items.size(); + return items.length; } public int getPerTypeCapacity() { return perTypeCapacity; } + /** + * Returns the ItemStack from the specified slot. + * + * @param slot + * Storage slot number. Zero indexed. + * @return + * ItemStack from storage or null if + * storage is locked or invalid slot parameter. + */ public ItemStack getStackInSlot(int slot) { System.out.println("Stack in slot " + slot + " requested"); - if(locked || slot >= items.size()) { + if(locked || slot >= items.length) { return null; } else { - return items.get(slot); + return items[slot]; } } + /** + * Inserts a new ItemStack into storage, + * but only if the slot is still unassigned. + * + * @param slot + * Storage slot number. Zero indexed. + * @param itemStack + * ItemStack to insert. + */ public void insertStackInSlot(int slot, ItemStack itemStack) { System.out.println("Inserting " + itemStack.getDisplayName() + " into " + slot); if(itemStack == null - || items.get(slot) != null + || items[slot] != null || locked - || slot >= items.size()) { + || slot >= items.length) { return; } else { - items.set(slot, itemStack); + items[slot] = itemStack; } } + /** + * Tries to increase the item amount in a specified slot. + * + * @param slot + * Storage slot number. Zero indexed. + * @param amount + * Amount to increase by. + * @return + * Actual amount the item amount was increased by. + */ public int increaseStackInSlot(int slot, int amount) { System.out.println("Increasing item in slot " + slot + " by " + amount); - if(slot >= items.size() + if(slot >= items.length || locked || amount <= 0) { return 0; } else { - final int space = perTypeCapacity - items.get(slot).stackSize; + final int space = perTypeCapacity - items[slot].stackSize; final int fit = Math.min(space, amount); - items.get(slot).stackSize += fit; + items[slot].stackSize += fit; return fit; } } + /** + * Tries to reduce the item amount in a specified slot. + * + * @param slot + * Storage slot number. Zero indexed. + * @param amount + * Amount to decrease by. + * @return + * Actual amount the item amount was decreased by. + */ public int reduceStackInSlot(int slot, int amount) { System.out.println("Reducing item in slot " + slot + " by " + amount); - if(slot >= items.size() + if(slot >= items.length || locked || amount <= 0) { return 0; } else { - final int available = items.get(slot).stackSize; + final int available = items[slot].stackSize; final int take = Math.min(available, amount); - items.get(slot).stackSize -= take; + items[slot].stackSize -= take; if(take == available) { - items.set(slot, null); + items[slot] = null; } return take; } diff --git a/src/main/java/tileentities/GTMTE_ItemServer.java b/src/main/java/tileentities/GTMTE_ItemServer.java index 9b4d50c5d4..3753b8e17a 100644 --- a/src/main/java/tileentities/GTMTE_ItemServer.java +++ b/src/main/java/tileentities/GTMTE_ItemServer.java @@ -34,7 +34,8 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { private final Block_ItemServerDrive DRIVE = Block_ItemServerDrive.getInstance(); private final Block_ItemServerRackCasing CASING = Block_ItemServerRackCasing.getInstance(); private final Block_ItemServerIOPort IO_PORT = Block_ItemServerIOPort.getInstance(); - private final String ALU_FRAME_BOX_NAME = "gt.blockmachines.gt_frame_aluminium"; + private final String ALU_FRAME_BOX_NAME = "gt.blockmachines"; + private final int ALU_FRAME_BOX_META = 6;//4115; private final int CASING_TEXTURE_ID = 176; private MultiItemHandler mih; @@ -111,8 +112,8 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000; this.mEfficiencyIncrease = 10000; - this.mEUt = (int) (BASE_SLICE_ENERGY_COST * sliceCount * Math.pow(2, config)); - super.mMaxProgresstime = 10; + this.mEUt = (int) -(BASE_SLICE_ENERGY_COST * sliceCount * Math.pow(2, config)); + super.mMaxProgresstime = 20; mih.setPerTypeCapacity((int) (BASE_PER_ITEM_CAPACITY * Math.pow(4, config))); @@ -184,9 +185,8 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? - // TODO: Also check IO port if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) { - // yay + // is casing } else if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == IO_PORT) { final TE_ItemServerIOPort port = (TE_ItemServerIOPort) thisController.getWorld().getTileEntity( @@ -201,23 +201,31 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { } } + if(formationChecklist) { + System.out.println("Item Server front slice approved"); + } + // Check slices int slicesFound = 0; - int zOffset = 1; - for(int s = 0; s < slicesFound; s++) { - final Vector3ic probe = rotateOffsetVector(forgeDirection, 1, 0, zOffset); - // Probe if another slice might exist - if(thisController.getBlockOffset(probe.x(), probe.y(), probe.z()) == DRIVE) { - formationChecklist = checkSlice(thisController, zOffset); - if(!formationChecklist) { - break; - } else { - slicesFound++; - zOffset += 2; - } + int zOffset = -1; + + while(slicesFound < 5) { + if(checkSlice(thisController, forgeDirection, zOffset)) { + slicesFound++; + zOffset -= 3; + + System.out.println("Item Server slice approved: " + slicesFound); + } else { + System.out.println("Item Server slice rejected: " + slicesFound + 1); + break; } } + if(slicesFound < 1) { + System.out.println("At least one slice required for storage"); + formationChecklist = false; + } + if(this.mEnergyHatches.size() < 1) { System.out.println("At least one energy hatch is required!"); formationChecklist = false; @@ -229,12 +237,13 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { } if(formationChecklist) { - slicesFound = sliceCount; + sliceCount = slicesFound; if(mih == null) { mih = new MultiItemHandler(); mih.setItemTypeCapacity(slicesFound * BASE_ITEM_TYPES_PER_SLICE); } + System.out.println("Configuring " + ioPorts.size() + " ports"); for(TE_ItemServerIOPort port : ioPorts) { port.setMultiItemHandler(mih); } @@ -243,19 +252,16 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { return formationChecklist; } - public boolean checkSlice(IGregTechTileEntity thisController, int zOffset) { - // Figure out the vector for the direction the back face of the controller is facing - final Vector3ic forgeDirection = new Vector3i( - ForgeDirection.getOrientation(thisController.getBackFacing()).offsetX, - ForgeDirection.getOrientation(thisController.getBackFacing()).offsetY, - ForgeDirection.getOrientation(thisController.getBackFacing()).offsetZ - ); + public boolean checkSlice(IGregTechTileEntity thisController, Vector3ic forgeDirection, int zOffset) { boolean formationChecklist = true; - for(int Z = 0; Z <= 2; Z++) { - if(Z != 2) { + for(int Z = 0; Z >= -2; Z--) { + // Is not back slice + if(Z != -2) { + // Left to right for(int X = -1; X <= 1; X++) { - for(int Y = 0; Y < 5; Y++) { + // Bottom to top + for(int Y = 0; Y <= 4; Y++) { final Vector3ic offset = rotateOffsetVector(forgeDirection, X, Y, zOffset + Z); // Server rack roof is casings @@ -270,9 +276,8 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? - // TODO: Also check IO port if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) { - // yay + // is casing } else if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == IO_PORT) { final TE_ItemServerIOPort port = (TE_ItemServerIOPort) thisController.getWorld().getTileEntity( @@ -287,14 +292,19 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { } // Middle wall is aluminium frame boxes - else if(Y < 4 && X == 0) { - if(!(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName().equals(ALU_FRAME_BOX_NAME))) { + else if(Y <= 3 && X == 0) { + if(!(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName().equals(ALU_FRAME_BOX_NAME)) + || !(thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z()) == ALU_FRAME_BOX_META)) { + System.out.println("Rejected Frame box: " + + thisController.getBlockOffset(offset.x(), offset.y(), offset.z()).getUnlocalizedName() + + ":" + + thisController.getMetaIDOffset(offset.x(), offset.y(), offset.z())); formationChecklist = false; } } // Side walls are item server drives - else if(Y < 4 && X != 0) { + else if(Y <= 3 && X != 0) { if(!(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == DRIVE)) { formationChecklist = false; } @@ -304,38 +314,30 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { } else { // Back slice for(int X = -1; X <= 1; X++) { - for(int Y = 0; Y < 5; Y++) { + for(int Y = 0; Y <= 4; Y++) { // Get next TE final Vector3ic offset = rotateOffsetVector(forgeDirection, X, Y, zOffset + Z); IGregTechTileEntity currentTE = thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); - // Disallow nonsensical hatches in the middle of the structure - if(Y < 4 && Y > 0 && X == 0) { - if(!(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING)) { + if(!super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID) + && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID) + && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { + + // If it's not a hatch, is it the right casing for this machine? + if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) { + // is casing + } else if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == IO_PORT) { + final TE_ItemServerIOPort port = + (TE_ItemServerIOPort) thisController.getWorld().getTileEntity( + thisController.getXCoord() + offset.x(), + thisController.getYCoord() + offset.y(), + thisController.getZCoord() + offset.z()); + ioPorts.add(port); + } else { formationChecklist = false; } - } else { - if(!super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID) - && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID) - && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { - - // If it's not a hatch, is it the right casing for this machine? - // TODO: Also check IO port - if(thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == CASING) { - // yay - } else if (thisController.getBlockOffset(offset.x(), offset.y(), offset.z()) == IO_PORT) { - final TE_ItemServerIOPort port = - (TE_ItemServerIOPort) thisController.getWorld().getTileEntity( - thisController.getXCoord() + offset.x(), - thisController.getYCoord() + offset.y(), - thisController.getZCoord() + offset.z()); - ioPorts.add(port); - } else { - formationChecklist = false; - } - } } } } @@ -351,8 +353,9 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { final ArrayList ll = new ArrayList<>();//mfh.getInfoData(); ll.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET); - ll.add("Per-Fluid Capacity: " + BASE_PER_ITEM_CAPACITY); - ll.add("Running Cost: " + (-super.mEUt) + "EU/t"); + ll.add("Per-Item Capacity: " + mih.getPerTypeCapacity()); + ll.add("Item-Type Capacity: " + BASE_ITEM_TYPES_PER_SLICE * sliceCount); + ll.add("Running Cost: " + -(super.mEUt) + "EU/t"); ll.add("Maintenance Status: " + ((super.getRepairStatus() == super.getIdealStatus()) ? EnumChatFormatting.GREEN + "Working perfectly" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "Has Problems" + EnumChatFormatting.RESET)); -- cgit From e3568bc7c726a8893b45ab15fb984a88ebab1a5c Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Tue, 18 Feb 2020 16:50:20 +0100 Subject: Improved TE IS IO port code but it's still not working --- config/IC2.ini | 2 +- config/splash.properties | 2 +- src/main/java/kekztech/MultiItemHandler.java | 9 ++-- src/main/java/tileentities/GTMTE_ItemServer.java | 4 -- .../java/tileentities/TE_ItemServerIOPort.java | 62 +++++++++++++++------- 5 files changed, 51 insertions(+), 28 deletions(-) diff --git a/config/IC2.ini b/config/IC2.ini index 2f0c00ea49..f9254472e4 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,5 +1,5 @@ ; ic2 general config -; created Feb 18, 2020 3:08:27 PM +; created Feb 18, 2020 4:45:19 PM ;--- [worldgen] diff --git a/config/splash.properties b/config/splash.properties index e4d7b3edba..7b717de411 100644 --- a/config/splash.properties +++ b/config/splash.properties @@ -1,5 +1,5 @@ #Splash screen properties -#Tue Feb 18 15:08:17 CET 2020 +#Tue Feb 18 16:45:12 CET 2020 logoTexture=textures/gui/title/mojang.png background=0xFFFFFF font=0x0 diff --git a/src/main/java/kekztech/MultiItemHandler.java b/src/main/java/kekztech/MultiItemHandler.java index 9416dbebcf..58dd0660e9 100644 --- a/src/main/java/kekztech/MultiItemHandler.java +++ b/src/main/java/kekztech/MultiItemHandler.java @@ -64,7 +64,7 @@ public class MultiItemHandler { } public int getItemTypeCapacity() { - return items.length; + return items != null ? items.length : 0; } public int getPerTypeCapacity() { @@ -97,16 +97,19 @@ public class MultiItemHandler { * Storage slot number. Zero indexed. * @param itemStack * ItemStack to insert. + * @return + * Operation success state. */ - public void insertStackInSlot(int slot, ItemStack itemStack) { + public boolean insertStackInSlot(int slot, ItemStack itemStack) { System.out.println("Inserting " + itemStack.getDisplayName() + " into " + slot); if(itemStack == null || items[slot] != null || locked || slot >= items.length) { - return; + return false; } else { items[slot] = itemStack; + return true; } } diff --git a/src/main/java/tileentities/GTMTE_ItemServer.java b/src/main/java/tileentities/GTMTE_ItemServer.java index 3753b8e17a..1449e8333a 100644 --- a/src/main/java/tileentities/GTMTE_ItemServer.java +++ b/src/main/java/tileentities/GTMTE_ItemServer.java @@ -75,7 +75,6 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { .addOtherStructurePart("2nd and 3rd slice, top", "3x1x1 Item Server Rack Casing") .addOtherStructurePart("2nd and 3rd slice, sides", "2x 1x4x1 Item Server Drive") .addOtherStructurePart("Back slice", "3x5x1 Item Server Rack Casing") - .addInputBus("Instead of any casing") .signAndFinalize("Kekzdealer"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { return b.getInformation(); @@ -181,7 +180,6 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); if(!super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID) - && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID) && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? @@ -272,7 +270,6 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); if(!super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID) - && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID) && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? @@ -322,7 +319,6 @@ public class GTMTE_ItemServer extends GT_MetaTileEntity_MultiBlockBase { thisController.getIGregTechTileEntityOffset(offset.x(), offset.y(), offset.z()); if(!super.addMaintenanceToMachineList(currentTE, CASING_TEXTURE_ID) - && !super.addInputToMachineList(currentTE, CASING_TEXTURE_ID) && !super.addEnergyInputToMachineList(currentTE, CASING_TEXTURE_ID)) { // If it's not a hatch, is it the right casing for this machine? diff --git a/src/main/java/tileentities/TE_ItemServerIOPort.java b/src/main/java/tileentities/TE_ItemServerIOPort.java index a8c0f25b83..a7dc7e14f5 100644 --- a/src/main/java/tileentities/TE_ItemServerIOPort.java +++ b/src/main/java/tileentities/TE_ItemServerIOPort.java @@ -2,22 +2,22 @@ package tileentities; import kekztech.MultiItemHandler; import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.inventory.IInventory; +import net.minecraft.inventory.ISidedInventory; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; -public class TE_ItemServerIOPort extends TileEntity implements IInventory { +public class TE_ItemServerIOPort extends TileEntity implements ISidedInventory { private MultiItemHandler mih; public void setMultiItemHandler(MultiItemHandler mih) { - System.out.println("MIH set"); this.mih = mih; + System.out.println("MIH set"); } @Override public int getSizeInventory() { - return (mih != null) ? mih.getItemTypeCapacity() : 9; + return (mih != null) ? mih.getItemTypeCapacity() : 0; } @Override @@ -36,8 +36,9 @@ public class TE_ItemServerIOPort extends TileEntity implements IInventory { } else { return null; } + } else { + return null; } - return null; } @Override @@ -47,26 +48,26 @@ public class TE_ItemServerIOPort extends TileEntity implements IInventory { @Override public void setInventorySlotContents(int slot, ItemStack itemStack) { - System.out.println("Set slot, MIH: " + mih); + System.out.println("Set slot: " + slot); if(mih != null) { - if(itemStack == null || !itemStack.isItemEqual(mih.getStackInSlot(slot))) { + if(itemStack == null) { return; } else { - if(mih.getStackInSlot(slot) == null) { - System.out.println("Set slot: Allocate new"); - mih.insertStackInSlot(slot, itemStack); - } else { - final int change = itemStack.stackSize - mih.getStackInSlot(slot).stackSize; - if(change < 0) { - System.out.println("Set slot: reduce"); - mih.reduceStackInSlot(slot, change); + if(!mih.insertStackInSlot(slot, itemStack)) { + final int delta = itemStack.stackSize - mih.getStackInSlot(slot).stackSize; + if(delta < 0) { + System.out.println("Set slot reduce: " + itemStack.getDisplayName()); + mih.reduceStackInSlot(slot, delta); } else { - System.out.println("Set slot: increase"); - mih.increaseStackInSlot(slot, change); - } + System.out.println("Set slot increase: " + itemStack.getDisplayName()); + mih.increaseStackInSlot(slot, delta); + } + + } else { + System.out.println("Allocated new slot for: " + itemStack.getDisplayName()); } super.markDirty(); - } + } } } @@ -105,4 +106,27 @@ public class TE_ItemServerIOPort extends TileEntity implements IInventory { return (mih != null) ? (mih.getStackInSlot(slot).isItemEqual(itemStack) || mih.getStackInSlot(slot) == null) : false; } + @Override + public int[] getAccessibleSlotsFromSide(int side) { + if(mih != null) { + final int[] as = new int[mih.getItemTypeCapacity()]; + for(int i = 0; i < mih.getItemTypeCapacity(); i++) { + as[i] = i; + } + return as; + } else { + return new int[1]; + } + } + + @Override + public boolean canInsertItem(int slot, ItemStack itemStack, int side) { + return isItemValidForSlot(slot, itemStack); + } + + @Override + public boolean canExtractItem(int slot, ItemStack itemStack, int side) { + return (mih != null) ? true : false; + } + } -- cgit From 872412284b1a4b31bbf47e3e1deb861675aa6b2b Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Mon, 2 Mar 2020 01:52:50 +0100 Subject: added maintenance hatch to tfft tooltip --- src/main/java/tileentities/GTMTE_FluidMultiStorage.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java index 221fd03a49..05af3faad5 100644 --- a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java @@ -85,6 +85,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { .addEnergyHatch("Any top or bottom casing") .addOtherStructurePart("Inner 3x7x3 tube", "Storage Field Blocks") .addOtherStructurePart("Outer 5x7x5 glass shell", "AE2 Quartz Glass of Vanilla Stained Glass") + .addMaintenanceHatch("Instead of any casing or glass, have to touch storage field.") .addIOHatches("Instead of any casing or glass, have to touch storage field. True for the Multi-Hatch as well.") .signAndFinalize("Kekzdealer"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { @@ -118,7 +119,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { @Override public boolean checkRecipe(ItemStack guiSlotItem) { - this.mEfficiency = 10000 - (this.getIdealStatus() - this.getRepairStatus()) * 1000; + super.mEfficiency = 10000 - (super.getIdealStatus() - super.getRepairStatus()) * 1000; this.mEfficiencyIncrease = 10000; this.mEUt = runningCost; super.mMaxProgresstime = 10; -- cgit From ff7b23c1f50fcf8a92e9061f52f516f0b38d3daa Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Mon, 2 Mar 2020 02:42:50 +0100 Subject: tfft scanner data should now correctly show power usage during maintenance issues --- src/main/java/tileentities/GTMTE_FluidMultiStorage.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java index 05af3faad5..9ac2dd887a 100644 --- a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java @@ -120,8 +120,8 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { public boolean checkRecipe(ItemStack guiSlotItem) { super.mEfficiency = 10000 - (super.getIdealStatus() - super.getRepairStatus()) * 1000; - this.mEfficiencyIncrease = 10000; - this.mEUt = runningCost; + super.mEfficiencyIncrease = 10000; + super.mEUt = runningCost; super.mMaxProgresstime = 10; // If there are no basic I/O hatches, let multi hatches handle it and skip a lot of code! @@ -492,7 +492,9 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { ll.add(EnumChatFormatting.YELLOW + "Operational Data:" + EnumChatFormatting.RESET); ll.add("Auto-voiding: " + doVoidExcess); ll.add("Per-Fluid Capacity: " + mfh.getCapacity() + "L"); - ll.add("Running Cost: " + (-super.mEUt) + "EU/t"); + ll.add("Running Cost: " + // mEUt does not naturally reflect efficiency status. Do that here. + + ((-super.mEUt) * 10000 / Math.max(1000, super.mEfficiency)) + "EU/t"); ll.add("Maintenance Status: " + ((super.getRepairStatus() == super.getIdealStatus()) ? EnumChatFormatting.GREEN + "Working perfectly" + EnumChatFormatting.RESET : EnumChatFormatting.RED + "Has Problems" + EnumChatFormatting.RESET)); -- cgit From 03a0e592bd88a5609c45b0f605ab38ac07047c7f Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Wed, 4 Mar 2020 15:18:44 +0100 Subject: removed WIP things for v0.2.3 bug fix release --- config/IC2.ini | 2 +- config/splash.properties | 2 +- src/main/java/kekztech/KekzCore.java | 36 +++++++++++----------- .../java/tileentities/GTMTE_FluidMultiStorage.java | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/config/IC2.ini b/config/IC2.ini index f9254472e4..580b091f45 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,5 +1,5 @@ ; ic2 general config -; created Feb 18, 2020 4:45:19 PM +; created Mar 4, 2020 3:14:35 PM ;--- [worldgen] diff --git a/config/splash.properties b/config/splash.properties index 7b717de411..17de033fc3 100644 --- a/config/splash.properties +++ b/config/splash.properties @@ -1,5 +1,5 @@ #Splash screen properties -#Tue Feb 18 16:45:12 CET 2020 +#Wed Mar 04 15:14:27 CET 2020 logoTexture=textures/gui/title/mojang.png background=0xFFFFFF font=0x0 diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index 64e1298d3c..baf84cd18f 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -85,7 +85,7 @@ public class KekzCore { ErrorItem.getInstance().registerItem(); MetaItem_ReactorComponent.getInstance().registerItem(); MetaItem_CraftingComponent.getInstance().registerItem(); - Item_Configurator.getInstance().registerItem(); + // disabled for release; Item_Configurator.getInstance().registerItem(); Items.registerOreDictNames(); // Blocks Block_YSZUnit.getInstance().registerBlock(); @@ -100,18 +100,18 @@ public class KekzCore { Block_ReactorChamber_OFF.getInstance().registerBlock(); Block_ReactorChamber_ON.getInstance().registerBlock(); Block_ControlRod.getInstance().registerBlock(); - Block_ItemServerDrive.getInstance().registerBlock(); - Block_ItemServerRackCasing.getInstance().registerBlock(); - Block_ItemServerIOPort.getInstance().registerBlock(); - Block_ItemProxyCable.getInstance().registerBlock(); - Block_ItemProxySource.getInstance().registerBlock(); - Block_ItemProxyEndpoint.getInstance().registerBlock(); + // disabled for release; Block_ItemServerDrive.getInstance().registerBlock(); + // disabled for release; Block_ItemServerRackCasing.getInstance().registerBlock(); + // disabled for release; Block_ItemServerIOPort.getInstance().registerBlock(); + // disabled for release; Block_ItemProxyCable.getInstance().registerBlock(); + // disabled for release; Block_ItemProxySource.getInstance().registerBlock(); + // disabled for release; Block_ItemProxyEndpoint.getInstance().registerBlock(); // Register TileEntities GameRegistry.registerTileEntity(TE_TFFTMultiHatch.class, "kekztech_tfftmultihatch_tile"); - GameRegistry.registerTileEntity(TE_ItemServerIOPort.class, "kekztech_itemserverioport_tile"); - GameRegistry.registerTileEntity(TE_ItemProxyCable.class, "kekztech_itemproxycable_tile"); - GameRegistry.registerTileEntity(TE_ItemProxySource.class, "kekztech_itemproxysource_tile"); - GameRegistry.registerTileEntity(TE_ItemProxyEndpoint.class, "kekztech_itemproxyendpoint_tile"); + // disabled for release; GameRegistry.registerTileEntity(TE_ItemServerIOPort.class, "kekztech_itemserverioport_tile"); + // disabled for release; GameRegistry.registerTileEntity(TE_ItemProxyCable.class, "kekztech_itemproxycable_tile"); + // disabled for release; GameRegistry.registerTileEntity(TE_ItemProxySource.class, "kekztech_itemproxysource_tile"); + // disabled for release; GameRegistry.registerTileEntity(TE_ItemProxyEndpoint.class, "kekztech_itemproxyendpoint_tile"); // Register guis NetworkRegistry.INSTANCE.registerGuiHandler(instance, new GuiHandler()); @@ -124,9 +124,9 @@ public class KekzCore { sofc2 = new GTMTE_SOFuelCellMK2(13102, "multimachine.fuelcellmk2", "Solid-Oxide Fuel Cell Mk II"); mdr = new GTMTE_ModularNuclearReactor(13103, "multimachine.nuclearreactor", "Nuclear Reactor"); fms = new GTMTE_FluidMultiStorage(13104, "multimachine.tf_fluidtank", "T.F.F.T"); - is = new GTMTE_ItemServer(13105, "multimachine.itemserver", "Item Server"); + // disabled for release; is = new GTMTE_ItemServer(13105, "multimachine.itemserver", "Item Server"); // Register renderer - ConduitRenderer.getInstance().registerRenderer(); + // disabled for release; ConduitRenderer.getInstance().registerRenderer(); } @Mod.EventHandler @@ -165,7 +165,7 @@ public class KekzCore { 'C', OrePrefixes.circuit.get(Materials.Data) }; GT_ModHandler.addCraftingRecipe(fms.getStackForm(1), tfft_recipe); - final Object[] is_recipe = { + /*final Object[] is_recipe = { "FRF", "CGC", "PZP", 'F', GT_OreDictUnificator.get(OrePrefixes.frameGt, Materials.TungstenSteel, 1), 'R', GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.TungstenSteel, 1), @@ -174,7 +174,7 @@ public class KekzCore { 'P', GT_OreDictUnificator.get(OrePrefixes.cableGt04, Materials.VanadiumGallium, 1), 'Z', GT_OreDictUnificator.get(OrePrefixes.circuit, Materials.Master, 1) }; - GT_ModHandler.addCraftingRecipe(is.getStackForm(1), is_recipe); + GT_ModHandler.addCraftingRecipe(is.getStackForm(1), is_recipe);*/ // Ceramic Electrolyte Units @@ -204,7 +204,7 @@ public class KekzCore { 2400, 1920); // Item Server Structure blocks - final Object[] is_rack_recipe = { + /*final Object[] is_rack_recipe = { "BRB", "CFC", "BRB", 'B', GT_OreDictUnificator.get(OrePrefixes.plate, Materials.BlueSteel, 1), 'R', GT_OreDictUnificator.get(OrePrefixes.rotor, Materials.Aluminium, 1), @@ -245,7 +245,7 @@ public class KekzCore { is_drive, FluidRegistry.getFluidStack("molten.polyethylene", 1152), new ItemStack(Block_ItemServerDrive.getInstance(), 1), - 200, 7680); + 200, 7680);*/ // T.F.F.T Structure blocks final ItemStack[] tfftcasing = { @@ -321,7 +321,7 @@ public class KekzCore { tfftstoragefield5, FluidRegistry.getFluidStack("molten.epoxid", 1152), new ItemStack(Block_TFFTStorageFieldBlockT5.getInstance(), 1), - 400, 4098); + 400, 6147); final Object[] multi_hatch = { "PRP", "UFU", "PRP", 'P', GT_OreDictUnificator.get(OrePrefixes.pipeTiny, Materials.NiobiumTitanium, 1), diff --git a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java index 9ac2dd887a..07e0a56151 100644 --- a/src/main/java/tileentities/GTMTE_FluidMultiStorage.java +++ b/src/main/java/tileentities/GTMTE_FluidMultiStorage.java @@ -85,7 +85,7 @@ public class GTMTE_FluidMultiStorage extends GT_MetaTileEntity_MultiBlockBase { .addEnergyHatch("Any top or bottom casing") .addOtherStructurePart("Inner 3x7x3 tube", "Storage Field Blocks") .addOtherStructurePart("Outer 5x7x5 glass shell", "AE2 Quartz Glass of Vanilla Stained Glass") - .addMaintenanceHatch("Instead of any casing or glass, have to touch storage field.") + .addMaintenanceHatch("Instead of any casing or glass, has to touch storage field.") .addIOHatches("Instead of any casing or glass, have to touch storage field. True for the Multi-Hatch as well.") .signAndFinalize("Kekzdealer"); if(!Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) { -- cgit From 193e453b3fc84f2b2c8ad90db6372ca9f48abca4 Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Wed, 4 Mar 2020 16:22:09 +0100 Subject: updated version number --- build.gradle | 2 +- src/main/java/kekztech/KekzCore.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 6eff98df89..3ca4335418 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'forge' sourceCompatibility = 1.8 targetCompatibility = 1.8 -version = "0.2.2" +version = "0.2.3" group= "kekztech" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "kekztech" diff --git a/src/main/java/kekztech/KekzCore.java b/src/main/java/kekztech/KekzCore.java index baf84cd18f..c7fe8df8ee 100644 --- a/src/main/java/kekztech/KekzCore.java +++ b/src/main/java/kekztech/KekzCore.java @@ -67,7 +67,7 @@ public class KekzCore { public static final String NAME = "KekzTech"; public static final String MODID = "kekztech"; - public static final String VERSION = "0.2.2"; + public static final String VERSION = "0.2.3"; @Mod.Instance("kekztech") public static KekzCore instance; -- cgit From 60554a28fc5b2d0753a8c63935b00b9ba84ea058 Mon Sep 17 00:00:00 2001 From: kekzdealer Date: Wed, 11 Mar 2020 20:36:28 +0100 Subject: re-enabled WIP content for further dev work --- .classpath | 2 +- config/CodeChickenLib.cfg | 2 +- config/IC2.ini | 336 +++++++++++++++++------------------ config/splash.properties | 2 +- src/main/java/kekztech/KekzCore.java | 26 +-- 5 files changed, 184 insertions(+), 184 deletions(-) diff --git a/.classpath b/.classpath index 93ee7b3fb3..6d3a77a1a2 100644 --- a/.classpath +++ b/.classpath @@ -3,12 +3,12 @@ - + diff --git a/config/CodeChickenLib.cfg b/config/CodeChickenLib.cfg index 947513c59e..096dec5432 100644 --- a/config/CodeChickenLib.cfg +++ b/config/CodeChickenLib.cfg @@ -3,6 +3,6 @@ dump_asm=true #Path to directory holding packaged.srg, fields.csv and methods.csv for mcp remapping -mappingDir=/home/kekzdealer/.gradle/caches/minecraft/net/minecraftforge/forge/1.7.10-10.13.4.1614-1.7.10/unpacked/conf +mappingDir=C:\Users\kekzd\.gradle\caches\minecraft\net\minecraftforge\forge\1.7.10-10.13.4.1614-1.7.10\unpacked\conf textify=true diff --git a/config/IC2.ini b/config/IC2.ini index 580b091f45..859e45e7f7 100644 --- a/config/IC2.ini +++ b/config/IC2.ini @@ -1,168 +1,168 @@ -; ic2 general config -; created Mar 4, 2020 3:14:35 PM -;--- - -[worldgen] -; Enable generation of rubber trees in the world. -rubberTree = true -; Enable generation of copper in the world. -copperOre = true -; Enable generation of tin in the world. -tinOre = true -; Enable generation of uranium in the world. -uraniumOre = true -; Enable generation of Lead in the world. -leadOre = true -; Factor scaling the IC2 ore generation quantity. -oreDensityFactor = 1.0 - -[protection] -; Enable logging of players when they remove a machine using a wrench. -wrenchLogging = true -; Maximum Explosion power of a nuke, where TNT is 4. -nukeExplosionPowerLimit = 60 -; Maximum explosion power of a nuclear reactor, where TNT is 4. -reactorExplosionPowerLimit = 45 -; Enable the nuke -enableNuke = true - -[balance] -; Maximum battery tier usable by the miner. -; 1 = batteries, 2 = lead batteries, 3 = energy crystals, 4 = lapotron crystals -minerDischargeTier = 1 -; Increase the energy use by the player's inventory weight when going through a teleporter. -teleporterUseInventoryWeight = true -; Ratio of energy retained inside energy storage block Items when wrenched. -; 0 (nothing) ... 1 (100%), default 0.8 (80 %) -energyRetainedInStorageBlockDrops = 0.8 -; Factor to scale the UU-Matter production energy requirement. -uuEnergyFactor = 1.0 -; Disable the vanilla ender chest, removing existing ones from the world as well. -disableEnderChest = false -; Comma separated list of blocks and items which should not be turned into scrap by the recycler. -; Format: [@metadata], metadata * matches any. -; Ore dictionary entries can be specified with OreDict: as the name. -recyclerBlacklist = minecraft:glass_pane, minecraft:stick, minecraft:snowball, minecraft:snow_layer, minecraft:snow, IC2:blockScaffold -; Whitelist for blocks/items allowed to be recycled. -; The whitelist will be used instead of the blacklist approach if it's non-empty, disallowing everything else. -; The format is the same as the blacklist. -recyclerWhitelist = -; Allow to pick blocks up using just a pickaxe instead of needing a wrench. -ignoreWrenchRequirement = false - -; Base energy generation factors - increase for higher energy yield. -[balance / energy / generator] -generator = 1.0 -geothermal = 1.0 -; Deprecated, because of Kinetic Watermill -water = 1.0 -solar = 1.0 -; Deprecated, because of Kinetic Windmill -wind = 1.0 -nuclear = 1.0 -semiFluidOil = 1.0 -semiFluidFuel = 1.0 -semiFluidBiomass = 1.0 -semiFluidBioethanol = 1.0 -semiFluidBiogas = 1.0 -Stirling = 1.0 -Kinetic = 1.0 -radioisotope = 1.0 - -; Base heat generation factors - increase for higher heat yield. -[balance / energy / heatgenerator] -semiFluidOil = 1.0 -semiFluidFuel = 1.0 -semiFluidBiomass = 1.0 -semiFluidBioethanol = 1.0 -semiFluidBiogas = 1.0 -solid = 1.0 -radioisotope = 1.0 -electric = 1.0 - -; Base kinetic generation factors - increase for higher kinetic energy yield. -[balance / energy / kineticgenerator] -water = 1.0 -wind = 1.0 -manual = 1.0 -steam = 1.0 -electric = 1.0 - -; Basically the amount of hU the conversion of one mB of Liquid takes/gives -[balance / energy / fluidconversion] -; Lava -> PahoehoeLava -heatExchangerLava = 1.0 -; Hot Coolant <-> Cold Coolant -heatExchangerHotCoolant = 1.0 -; Hot Water <- Water -heatExchangerWater = 1.0 - -; Base Coolant conversion rate for FluidReactors. -[balance / energy / FluidReactor] -outputModifier = 1.0 - -; Balace Value for Turbine Livetime in sec. Default 86400sec = 24h -[balance / SteamKineticGenerator] -rotorlivetime = 86400 - -; Balace Values for calcification default 100.000mB Water -> to failure -[balance / steamgenerator / calcification] -maxcalcification = 100000 - -; Balance Values for Fermenter -[balance / fermenter] -need_amount_biomass_per_run = 10 -output_amount_biogas_per_run = 200 -hU_per_run = 8000 -biomass_per_fertilizier = 500 - -; Additional initial uu values, a value of 1 equals cobblestone. -; Recipes may cause the final value be lower than the one specified here. -; Format: [@metadata] = -[balance / uu-values / predefined] -IC2:itemOreIridium = 12000 - -[recipes] -; To modify recipes or add custom recipes, copy the corresponding .ini file to -; "minecraft/config/ic2" and modify it. -; -; Disable IC2 crafting recipes with the specified output, comma separated list. -; Recipes in the additional section below aren't affected. -; Format: [@metadata], e.g. minecraft:bucket to disable IC2's bucket recipe from tin. -disable = -; Purge crafting recipes with the specified output, including vanilla and mod ones, comma separated list. -; Recipes in the additional section below aren't affected. -; Format: [@metadata], e.g. minecraft:tnt to disable crafting tnt. -purge = -; Enable crafting of IC2 coins, otherwise they have to be spawned in and are thus limited. -allowCoinCrafting = true -; Allow only IC2 circuits to be used in IC2's recipes. -requireIc2Circuits = false -; Adjust smelting recipes to always output IC2 items if available. -smeltToIc2Items = false -; Ignore invalid recipes. -ignoreInvalidRecipes = false - -[misc] -; Enable IC2's custom sound system. -enableIc2Audio = true -; Maximum number of active audio sources, only change it if you know what you're doing. -maxAudioSourceCount = 32 -; Enable hiding of secret recipes in CraftGuide/NEI. -hideSecretRecipes = true -; Enable activation of the quantum leggings' speed boost when sprinting instead of holding the boost key. -quantumSpeedOnSprint = true -; Enable burning of scrap in a generator. -allowBurningScrap = true -; Comma separated list with ores the miner should harvest. -; Format: [@metadata], e.g. minecraft:torch, minecraft:chest -; The metadata * will match any, e.g. minecraft:log@*. -; Ore dictionary entries can be specified with OreDict: as the name. -additionalValuableOres = -; Use the new highly experimental current + voltage energy net model with energy loss. -; Only set this to true if you know what you are doing. -useLinearTransferModel = false -; Potion ID of radiation potion. -; Do not change this after you created a world... -radiationPotionID = 24 - +; ic2 general config +; created 10-Mar-2020 20:15:10 +;--- + +[worldgen] +; Enable generation of rubber trees in the world. +rubberTree = true +; Enable generation of copper in the world. +copperOre = true +; Enable generation of tin in the world. +tinOre = true +; Enable generation of uranium in the world. +uraniumOre = true +; Enable generation of Lead in the world. +leadOre = true +; Factor scaling the IC2 ore generation quantity. +oreDensityFactor = 1.0 + +[protection] +; Enable logging of players when they remove a machine using a wrench. +wrenchLogging = true +; Maximum Explosion power of a nuke, where TNT is 4. +nukeExplosionPowerLimit = 60 +; Maximum explosion power of a nuclear reactor, where TNT is 4. +reactorExplosionPowerLimit = 45 +; Enable the nuke +enableNuke = true + +[balance] +; Maximum battery tier usable by the miner. +; 1 = batteries, 2 = lead batteries, 3 = energy crystals, 4 = lapotron crystals +minerDischargeTier = 1 +; Increase the energy use by the player's inventory weight when going through a teleporter. +teleporterUseInventoryWeight = true +; Ratio of energy retained inside energy storage block Items when wrenched. +; 0 (nothing) ... 1 (100%), default 0.8 (80 %) +energyRetainedInStorageBlockDrops = 0.8 +; Factor to scale the UU-Matter production energy requirement. +uuEnergyFactor = 1.0 +; Disable the vanilla ender chest, removing existing ones from the world as well. +disableEnderChest = false +; Comma separated list of blocks and items which should not be turned into scrap by the recycler. +; Format: [@metadata], metadata * matches any. +; Ore dictionary entries can be specified with OreDict: as the name. +recyclerBlacklist = minecraft:glass_pane, minecraft:stick, minecraft:snowball, minecraft:snow_layer, minecraft:snow, IC2:blockScaffold +; Whitelist for blocks/items allowed to be recycled. +; The whitelist will be used instead of the blacklist approach if it's non-empty, disallowing everything else. +; The format is the same as the blacklist. +recyclerWhitelist = +; Allow to pick blocks up using just a pickaxe instead of needing a wrench. +ignoreWrenchRequirement = false + +; Base energy generation factors - increase for higher energy yield. +[balance / energy / generator] +generator = 1.0 +geothermal = 1.0 +; Deprecated, because of Kinetic Watermill +water = 1.0 +solar = 1.0 +; Deprecated, because of Kinetic Windmill +wind = 1.0 +nuclear = 1.0 +semiFluidOil = 1.0 +semiFluidFuel = 1.0 +semiFluidBiomass = 1.0 +semiFluidBioethanol = 1.0 +semiFluidBiogas = 1.0 +Stirling = 1.0 +Kinetic = 1.0 +radioisotope = 1.0 + +; Base heat generation factors - increase for higher heat yield. +[balance / energy / heatgenerator] +semiFluidOil = 1.0 +semiFluidFuel = 1.0 +semiFluidBiomass = 1.0 +semiFluidBioethanol = 1.0 +semiFluidBiogas = 1.0 +solid = 1.0 +radioisotope = 1.0 +electric = 1.0 + +; Base kinetic generation factors - increase for higher kinetic energy yield. +[balance / energy / kineticgenerator] +water = 1.0 +wind = 1.0 +manual = 1.0 +steam = 1.0 +electric = 1.0 + +; Basically the amount of hU the conversion of one mB of Liquid takes/gives +[balance / energy / fluidconversion] +; Lava -> PahoehoeLava +heatExchangerLava = 1.0 +; Hot Coolant <-> Cold Coolant +heatExchangerHotCoolant = 1.0 +; Hot Water <- Water +heatExchangerWater = 1.0 + +; Base Coolant conversion rate for FluidReactors. +[balance / energy / FluidReactor] +outputModifier = 1.0 + +; Balace Value for Turbine Livetime in sec. Default 86400sec = 24h +[balance / SteamKineticGenerator] +rotorlivetime = 86400 + +; Balace Values for calcification default 100.000mB Water -> to failure +[balance / steamgenerator / calcification] +maxcalcification = 100000 + +; Balance Values for Fermenter +[balance / fermenter] +need_amount_biomass_per_run = 10 +output_amount_biogas_per_run = 200 +hU_per_run = 8000 +biomass_per_fertilizier = 500 + +; Additional initial uu values, a value of 1 equals cobblestone. +; Recipes may cause the final value be lower than the one specified here. +; Format: [@metadata] = +[balance / uu-values / predefined] +IC2:itemOreIridium = 12000 + +[recipes] +; To modify recipes or add custom recipes, copy the corresponding .ini file to +; "minecraft/config/ic2" and modify it. +; +; Disable IC2 crafting recipes with the specified output, comma separated list. +; Recipes in the additional section below aren't affected. +; Format: [@metadata], e.g. minecraft:bucket to disable IC2's bucket recipe from tin. +disable = +; Purge crafting recipes with the specified output, including vanilla and mod ones, comma separated list. +; Recipes in the additional section below aren't affected. +; Format: [@metadata], e.g. minecraft:tnt to disable crafting tnt. +purge = +; Enable crafting of IC2 coins, otherwise they have to be spawned in and are thus limited. +allowCoinCrafting = true +; Allow only IC2 circuits to be used in IC2's recipes. +requireIc2Circuits = false +; Adjust smelting recipes to always output IC2 items if available. +smeltToIc2Items = false +; Ignore invalid recipes. +ignoreInvalidRecipes = false + +[misc] +;