From 9f4b4a2358b11a33d8d323a2c92a551a11e2ab51 Mon Sep 17 00:00:00 2001 From: repo_alt Date: Tue, 8 Sep 2020 00:37:20 +0300 Subject: A simple cache for the furnace recipes, to avoid linear iteration (Should help with https://github.com/GTNewHorizons/GT-New-Horizons-Modpack/issues/6416) --- src/main/java/gregtech/api/util/GT_ModHandler.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index e195bf9b02..4f318bb752 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -122,6 +122,7 @@ public class GT_ModHandler { public static List sSingleNonBlockDamagableRecipeList_warntOutput = new ArrayList(50); public static List sVanillaRecipeList_warntOutput = new ArrayList(50); public static final List sSingleNonBlockDamagableRecipeList_verified = new ArrayList(1000); + private static HashMap smeltingRecipeCache = new LinkedHashMap<>(); static { sNativeRecipeClasses.add(ShapedRecipes.class.getName()); @@ -1566,7 +1567,13 @@ public class GT_ModHandler { */ public static ItemStack getSmeltingOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { if (aInput == null || aInput.stackSize < 1) return null; - ItemStack rStack = GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput)); + GT_ItemStack gtInput = new GT_ItemStack(aInput); + ItemStack rStack = smeltingRecipeCache.get(gtInput); + if (rStack == null) { + rStack = GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput)); + if (rStack != null) + smeltingRecipeCache.put(gtInput, rStack); + } if (rStack != null && (aOutputSlot == null || (GT_Utility.areStacksEqual(rStack, aOutputSlot) && rStack.stackSize + aOutputSlot.stackSize <= aOutputSlot.getMaxStackSize()))) { if (aRemoveInput) aInput.stackSize--; return rStack; -- cgit From edbf6cb86a352a4b84a09f85b5869ba41ba35563 Mon Sep 17 00:00:00 2001 From: Glease <4586901+Glease@users.noreply.github.com> Date: Wed, 9 Sep 2020 08:04:03 +0800 Subject: Fix GTNewHorizons/GT-New-Horizons-Modpack#6586 This makes it waste the extra fuel value, give the optimal output advertised on tooltip and always have an efficiency of 100%. --- .../machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java index 8e29d620c3..4bd44ef80c 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_LargeTurbine_Gas.java @@ -88,6 +88,17 @@ public class GT_MetaTileEntity_LargeTurbine_Gas extends GT_MetaTileEntity_LargeT FluidStack firstFuelType = new FluidStack(aFluids.get(0), 0); // Identify a SINGLE type of fluid to process. Doesn't matter which one. Ignore the rest! int fuelValue = getFuelValue(firstFuelType); + + if (aOptFlow < fuelValue) { + // turbine too weak and/or fuel too powerful + // at least consume 1L + this.realOptFlow = 1; + // wastes the extra fuel and generate aOptFlow directly + depleteInput(new FluidStack(firstFuelType, 1)); + this.storedFluid += 1; + return GT_Utility.safeInt((long)aOptFlow * (long)aBaseEff / 10000L); + } + actualOptimalFlow = GT_Utility.safeInt((long)aOptFlow / fuelValue); this.realOptFlow = actualOptimalFlow; -- cgit From 726e3d0fe46e3ba793f3c3e9b7acc3fd00a752ef Mon Sep 17 00:00:00 2001 From: repo_alt Date: Wed, 9 Sep 2020 08:24:03 +0300 Subject: replace HashMap with a (bounded) Guava Cache --- src/main/java/gregtech/api/util/GT_ModHandler.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/util/GT_ModHandler.java b/src/main/java/gregtech/api/util/GT_ModHandler.java index 4f318bb752..4d264bec9b 100644 --- a/src/main/java/gregtech/api/util/GT_ModHandler.java +++ b/src/main/java/gregtech/api/util/GT_ModHandler.java @@ -1,5 +1,7 @@ package gregtech.api.util; +import com.google.common.cache.Cache; +import com.google.common.cache.CacheBuilder; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.registry.GameRegistry; import gregtech.GT_Mod; @@ -122,7 +124,7 @@ public class GT_ModHandler { public static List sSingleNonBlockDamagableRecipeList_warntOutput = new ArrayList(50); public static List sVanillaRecipeList_warntOutput = new ArrayList(50); public static final List sSingleNonBlockDamagableRecipeList_verified = new ArrayList(1000); - private static HashMap smeltingRecipeCache = new LinkedHashMap<>(); + private static Cache sSmeltingRecipeCache = CacheBuilder.newBuilder().maximumSize(1000).build(); static { sNativeRecipeClasses.add(ShapedRecipes.class.getName()); @@ -1566,14 +1568,14 @@ public class GT_ModHandler { * Used in my own Furnace. */ public static ItemStack getSmeltingOutput(ItemStack aInput, boolean aRemoveInput, ItemStack aOutputSlot) { - if (aInput == null || aInput.stackSize < 1) return null; - GT_ItemStack gtInput = new GT_ItemStack(aInput); - ItemStack rStack = smeltingRecipeCache.get(gtInput); - if (rStack == null) { - rStack = GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput)); - if (rStack != null) - smeltingRecipeCache.put(gtInput, rStack); + if (aInput == null || aInput.stackSize < 1) + return null; + ItemStack rStack = null; + try { + rStack = sSmeltingRecipeCache.get(new GT_ItemStack(aInput), () -> GT_OreDictUnificator.get(FurnaceRecipes.smelting().getSmeltingResult(aInput))); + } catch (Exception ignored){ } + if (rStack != null && (aOutputSlot == null || (GT_Utility.areStacksEqual(rStack, aOutputSlot) && rStack.stackSize + aOutputSlot.stackSize <= aOutputSlot.getMaxStackSize()))) { if (aRemoveInput) aInput.stackSize--; return rStack; -- cgit From 68dd34753ccf0d8d646a57e5384122234359cf1c Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Tue, 15 Sep 2020 20:11:57 +0200 Subject: fix horibe tps lag on multie smelter --- .../multi/GT_MetaTileEntity_MultiFurnace.java | 47 ++++++++++++++++++---- 1 file changed, 40 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index b21d8fe73c..1bb610e5a0 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -82,15 +82,48 @@ public class GT_MetaTileEntity_MultiFurnace ArrayList tInputList = getStoredInputs(); if (!tInputList.isEmpty()) { int mVolatage=GT_Utility.safeInt(getMaxInputVoltage()); - - int j = 0; - this.mOutputItems = new ItemStack[8 * this.mLevel]; - for (int i = 0; (i < 256) && (j < this.mOutputItems.length); i++) { - if (null != (this.mOutputItems[j] = GT_ModHandler.getSmeltingOutput((ItemStack) tInputList.get(i % tInputList.size()), true, null))) { - j++; + int tMaxParrallel = 8 * this.mLevel; + int tCurrenParrallel = 0; + ItemStack tSmeltStack = tInputList.get(0); + ItemStack tOutputStack = GT_ModHandler.getSmeltingOutput(tSmeltStack,false,null); + if (tOutputStack == null) + return false; + for (int i = 0;i 0) { +// this.mOutputItems = new ItemStack[8 * this.mLevel]; +// for (int i = 0; (i < 256) && (j < this.mOutputItems.length); i++) { +// if (null != (this.mOutputItems[j] = GT_ModHandler.getSmeltingOutput((ItemStack) tInputList.get(i % tInputList.size()), true, null))) { +// j++; +// } +// } + this.mOutputItems = new ItemStack[(tCurrenParrallel/64)+1]; + for (int i = 0; i64 ? 64 : tCurrenParrallel; + tNewStack.stackSize = size; + tCurrenParrallel -= size; + this.mOutputItems[i] = tNewStack; + } + + + if (this.mOutputItems != null && this.mOutputItems.length > 0) { this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiencyIncrease = 10000; calculateOverclockedNessMulti(4, 512, 1, mVolatage); -- cgit From efbaa3fcb94da0aea4a4d51519b58df4641e68d9 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Fri, 18 Sep 2020 22:31:23 +0200 Subject: fix energy consumption on OC past tick limit fix the energy consumption of the large chemical reactor where it would reduce the energy consumption if the it OCd past the tick limit --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index c6828c707e..c41d2ca316 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -617,8 +617,17 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { while (tempEUt <= V[mTier - 1] * mAmperage) { tempEUt <<= 2;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking + int oldTime = mMaxProgresstime; mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking - xEUt = mMaxProgresstime==0 ? xEUt >> ocTimeShift : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power + if (mMaxProgresstime <1) + { + xEUt *= oldTime * (perfectOC ? 1:2); + break; + } + else + { + xEUt <<= ocTimeShift; + } } if(xEUt > Integer.MAX_VALUE - 1) { mEUt = Integer.MAX_VALUE - 1; -- cgit From ce56bfde0fd9d9e032fbbd5b431923dbf0d679a4 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Sat, 19 Sep 2020 19:40:57 +0200 Subject: Revert "fix energy consumption on OC past tick limit" This reverts commit efbaa3fcb94da0aea4a4d51519b58df4641e68d9. --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index c41d2ca316..c6828c707e 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -617,17 +617,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { while (tempEUt <= V[mTier - 1] * mAmperage) { tempEUt <<= 2;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking - int oldTime = mMaxProgresstime; mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking - if (mMaxProgresstime <1) - { - xEUt *= oldTime * (perfectOC ? 1:2); - break; - } - else - { - xEUt <<= ocTimeShift; - } + xEUt = mMaxProgresstime==0 ? xEUt >> ocTimeShift : xEUt << 2;//U know, if the time is less than 1 tick make the machine use less power } if(xEUt > Integer.MAX_VALUE - 1) { mEUt = Integer.MAX_VALUE - 1; -- cgit From 40a6b42cd5e2ad4f6a97fffebf991d56c3ac50fc Mon Sep 17 00:00:00 2001 From: korneel vandamme Date: Sat, 19 Sep 2020 19:55:01 +0200 Subject: fix to much power on non perfect OC --- .../implementations/GT_MetaTileEntity_MultiBlockBase.java | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index c41d2ca316..6d2110baee 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -621,6 +621,8 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking if (mMaxProgresstime <1) { + if(oldTime == 1) + break; xEUt *= oldTime * (perfectOC ? 1:2); break; } -- cgit From 305d6832b7e2a501b45eb41bf2cdb8e4edb65cfb Mon Sep 17 00:00:00 2001 From: korneel vandamme Date: Sat, 19 Sep 2020 20:30:48 +0200 Subject: put back oldTime --- .../metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java index a64073d67e..6d2110baee 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_MultiBlockBase.java @@ -617,6 +617,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity { while (tempEUt <= V[mTier - 1] * mAmperage) { tempEUt <<= 2;//this actually controls overclocking //xEUt *= 4;//this is effect of everclocking + int oldTime = mMaxProgresstime; mMaxProgresstime >>= ocTimeShift;//this is effect of overclocking if (mMaxProgresstime <1) { -- cgit From db4377f681aa81eac1eb310c0eabc35f37c39f3e Mon Sep 17 00:00:00 2001 From: boubou19 Date: Fri, 25 Sep 2020 00:47:45 +0200 Subject: fixed data bank achievement --- src/main/resources/assets/gregtech/lang/en_US.lang | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/main/resources/assets/gregtech/lang/en_US.lang b/src/main/resources/assets/gregtech/lang/en_US.lang index 882c237c5b..bda0fbff87 100644 --- a/src/main/resources/assets/gregtech/lang/en_US.lang +++ b/src/main/resources/assets/gregtech/lang/en_US.lang @@ -815,6 +815,8 @@ achievement.gt.blockmachines.multimachine.em.emtoessentia=Essentia Dequantizer achievement.gt.blockmachines.multimachine.em.emtoessentia.desc=Pickup this item to see the recipe in NEI achievement.gt.blockmachines.multimachine.em.scanner=Elemental Scanner achievement.gt.blockmachines.multimachine.em.scanner.desc=Pickup this item to see the recipe in NEI +achievement.gt.blockmachines.multimachine.em.scanner=Data Bank +achievement.gt.blockmachines.multimachine.em.databank.desc=Pickup this item to see the recipe in NEI achievement.gt.blockcasingsTT.8=Hollow Casing achievement.gt.blockcasingsTT.8.desc=Pickup this item to see the recipe in NEI achievement.gt.blockcasingsTT.7=Molecular Coil -- cgit From d8331a70f92f1c272a28f86fb0655433080aff34 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Sun, 27 Sep 2020 19:41:51 +0200 Subject: fix furnace recipes with 2+ output fix multi smelter only given 1 item if the even if the recipe gave more then 1 item --- .../tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java index 1bb610e5a0..cdc68702d2 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_MultiFurnace.java @@ -112,6 +112,7 @@ public class GT_MetaTileEntity_MultiFurnace // j++; // } // } + tCurrenParrallel *= tOutputStack.stackSize; this.mOutputItems = new ItemStack[(tCurrenParrallel/64)+1]; for (int i = 0; i Date: Wed, 30 Sep 2020 01:34:57 +0200 Subject: Fix AE2 compat to be independant at runtime Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../loaders/oreprocessing/ProcessingWire.java | 34 ++++++++++++++++++---- 1 file changed, 29 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java index 63f4abcf65..1951c37382 100644 --- a/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java +++ b/src/main/java/gregtech/loaders/oreprocessing/ProcessingWire.java @@ -2,6 +2,7 @@ package gregtech.loaders.oreprocessing; import appeng.api.config.TunnelType; import appeng.core.Api; +import cpw.mods.fml.common.Optional; import gregtech.GT_Mod; import gregtech.api.enums.*; import gregtech.api.util.GT_Log; @@ -18,7 +19,8 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr private Materials[] dielectrics = {Materials.PolyvinylChloride, Materials.Polydimethylsiloxane}; private Materials[] rubbers = {Materials.Rubber, Materials.StyreneButadieneRubber, Materials.Silicone}; private Materials[] syntheticRubbers = {Materials.StyreneButadieneRubber, Materials.Silicone}; - static private TunnelType tt = TunnelType.ME; + + private static Object tt; public ProcessingWire() { OrePrefixes.wireGt01.add(this); OrePrefixes.wireGt02.add(this); @@ -93,7 +95,7 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr GT_ModHandler.addShapelessCraftingRecipe(GT_Utility.copyAmount(1L, new Object[]{aStack}), new Object[]{OrePrefixes.wireGt12.get(aMaterial), OrePrefixes.wireGt04.get(aMaterial)}); if (GT_Mod.gregtechproxy.mAE2Integration) { - Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, tt); + AE2addNewAttunement(aStack); } break; default: @@ -183,8 +185,30 @@ public class ProcessingWire implements gregtech.api.interfaces.IOreRecipeRegistr } GT_Values.RA.addUnboxingRecipe(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), GT_Utility.copyAmount(1L, new Object[]{aStack}), null, 100, 8); if (GT_Mod.gregtechproxy.mAE2Integration) { - Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, tt); - Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L), tt); + AE2AddNetAttunementCable(aStack, correspondingCable, aMaterial); } } -} + + //region AE2 compat + static { + if (GT_Mod.gregtechproxy.mAE2Integration) + setAE2Field(); + } + + @Optional.Method(modid = "appliedenergistics2") + private static void setAE2Field(){ + tt = TunnelType.ME; + } + + @Optional.Method(modid = "appliedenergistics2") + private void AE2addNewAttunement(ItemStack aStack){ + Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, (TunnelType) tt); + } + + @Optional.Method(modid = "appliedenergistics2") + private void AE2AddNetAttunementCable(ItemStack aStack, OrePrefixes correspondingCable, Materials aMaterial){ + Api.INSTANCE.registries().p2pTunnel().addNewAttunement(aStack, (TunnelType) tt); + Api.INSTANCE.registries().p2pTunnel().addNewAttunement(GT_OreDictUnificator.get(correspondingCable, aMaterial, 1L),(TunnelType) tt); + } +//end region +} \ No newline at end of file -- cgit From 6d0cb6ec9146fd98d9b0671a7be92f9fe647d4e1 Mon Sep 17 00:00:00 2001 From: kaziu687 Date: Thu, 1 Oct 2020 21:06:14 +0200 Subject: Update BaseMetaTileEntity.java Fixes problem that may cause explosion on Thermos servers with load-chunks-on-request: false When machine stays at the edge of loaded chunk (where siblings is not loaded) worldObj.getPrecipitationHeight will return -1 (cuz chunk wont be loaded on request). Machine will explode even if there is a roof. --- src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 2a275a5354..7e711aaccd 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -448,10 +448,10 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE if (getRandomNumber(1000) == 0) { if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord) - || (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord) - || (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord) - || (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord) - || (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord)) { + || (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) > -1) + || (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) > -1) + || (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) > -1) + || (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord) && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) > -1) { if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) { if (getRandomNumber(10) == 0) { try{ -- cgit From b9170d551d95e9fe61234397dbd5ae67df2b6149 Mon Sep 17 00:00:00 2001 From: kaziu687 Date: Thu, 1 Oct 2020 22:41:24 +0200 Subject: worldObj.getPrecipitationHeight moved to variable --- .../gregtech/api/metatileentity/BaseMetaTileEntity.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index 7e711aaccd..cfb34eb34e 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -447,11 +447,16 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE } if (getRandomNumber(1000) == 0) { + int precipitationHeightAtSide2 = worldObj.getPrecipitationHeight(xCoord, zCoord - 1); + int precipitationHeightAtSide3 = worldObj.getPrecipitationHeight(xCoord, zCoord + 1); + int precipitationHeightAtSide4 = worldObj.getPrecipitationHeight(xCoord - 1, zCoord); + int precipitationHeightAtSide5 = worldObj.getPrecipitationHeight(xCoord + 1, zCoord); + if ((getCoverIDAtSide((byte) 1) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord) - 2 < yCoord) - || (getCoverIDAtSide((byte) 2) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord, zCoord - 1) > -1) - || (getCoverIDAtSide((byte) 3) == 0 && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord, zCoord + 1) > -1) - || (getCoverIDAtSide((byte) 4) == 0 && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) - 1 < yCoord && worldObj.getPrecipitationHeight(xCoord - 1, zCoord) > -1) - || (getCoverIDAtSide((byte) 5) == 0 && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) - 1 < yCoord) && worldObj.getPrecipitationHeight(xCoord + 1, zCoord) > -1) { + || (getCoverIDAtSide((byte) 2) == 0 && precipitationHeightAtSide2 - 1 < yCoord && precipitationHeightAtSide2 > -1) + || (getCoverIDAtSide((byte) 3) == 0 && precipitationHeightAtSide3 - 1 < yCoord && precipitationHeightAtSide3 > -1) + || (getCoverIDAtSide((byte) 4) == 0 && precipitationHeightAtSide4 - 1 < yCoord && precipitationHeightAtSide4 > -1) + || (getCoverIDAtSide((byte) 5) == 0 && precipitationHeightAtSide5 - 1 < yCoord && precipitationHeightAtSide5 > -1)) { if (GregTech_API.sMachineRainExplosions && worldObj.isRaining() && getBiome().rainfall > 0) { if (getRandomNumber(10) == 0) { try{ -- cgit From 58b75ea942aed3d2b7fe1187ddcc2d4c15be5bff Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Fri, 2 Oct 2020 11:54:56 +0200 Subject: add QoL for flasks add the option to set the capacity of flasks trough a assembler and circuit --- .../loaders/postload/GT_MachineRecipeLoader.java | 26 +++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 82992d1272..4759647914 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -530,7 +530,31 @@ public class GT_MachineRecipeLoader implements Runnable { GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Gold, 1L), ItemList.Circuit_Chip_LPIC.get(2L), ItemList.HV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_HV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_HV.get(1L), 200, 480); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Aluminium, 1L), ItemList.Circuit_Chip_PIC.get(2L), ItemList.EV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_1.get(1L), ItemList.Electric_Pump_EV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_EV.get(1L), 200, 1920); GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.spring, Materials.Vanadiumtriindinid, 1L), ItemList.Circuit_Chip_HPIC.get(2L), ItemList.IV_Coil.get(2L), ItemList.Reactor_Coolant_NaK_3.get(1L), ItemList.Electric_Pump_IV.get(1L)}, GT_Values.NF, ItemList.Hatch_Dynamo_IV.get(1L), 200, 7680); - + + {//limiting life time of the variables + ItemStack flask = ItemList.VOLUMETRIC_FLASK.get(1); + NBTTagCompound nbtFlask = new NBTTagCompound(); + nbtFlask.setInteger("Capacity", 144); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); + nbtFlask.setInteger("Capacity", 250); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); + nbtFlask.setInteger("Capacity", 288); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); + nbtFlask.setInteger("Capacity", 500); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); + nbtFlask.setInteger("Capacity", 576); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); + // make the 1000L recipe actualy in + ItemStack flask500 = flask.copy(); + nbtFlask.setInteger("Capacity", 1000); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(6), flask, 10, 30); + } // GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Brass, 1L), ItemList.Conveyor_Module_HV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_HV.get(1L), 200, 480); // GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Electrum, 1L), ItemList.Conveyor_Module_EV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_EV.get(1L), 200, 1920); // GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_IV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Platinum, 1L), ItemList.Conveyor_Module_IV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_IV.get(1L), 200, 7680); -- cgit From edd0434ebe9a960476aba38ee41b071a3f9cd742 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Fri, 2 Oct 2020 14:15:13 +0200 Subject: add 720L valua and turn 1000 to circuit 24 --- src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 4759647914..9ac56f3173 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -549,11 +549,14 @@ public class GT_MachineRecipeLoader implements Runnable { nbtFlask.setInteger("Capacity", 576); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); + nbtFlask.setInteger("Capacity", 720); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, 30); // make the 1000L recipe actualy in ItemStack flask500 = flask.copy(); nbtFlask.setInteger("Capacity", 1000); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(6), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe(flask500, GT_Utility.getIntegratedCircuit(24), flask, 10, 30); } // GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_HV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Brass, 1L), ItemList.Conveyor_Module_HV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_HV.get(1L), 200, 480); // GT_Values.RA.addAssemblerRecipe(new ItemStack[]{ItemList.Hull_EV.get(1L), GT_OreDictUnificator.get(OrePrefixes.pipeMedium, Materials.Electrum, 1L), ItemList.Conveyor_Module_EV.get(1L), new ItemStack(Blocks.chest, 1, 0), GT_Utility.getIntegratedCircuit(1)}, GT_Values.NF, ItemList.Hatch_Input_Bus_EV.get(1L), 200, 1920); -- cgit From 6ab71a2776e41c65193e98f4d982acc5a471d210 Mon Sep 17 00:00:00 2001 From: botn365 <42187820+botn365@users.noreply.github.com> Date: Fri, 2 Oct 2020 14:24:34 +0200 Subject: add 864 and make circuit numbers better --- .../gregtech/loaders/postload/GT_MachineRecipeLoader.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index 9ac56f3173..b84ea3b52d 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -537,21 +537,24 @@ public class GT_MachineRecipeLoader implements Runnable { nbtFlask.setInteger("Capacity", 144); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(1), flask, 10, 30); - nbtFlask.setInteger("Capacity", 250); + nbtFlask.setInteger("Capacity", 288); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(2), flask, 10, 30); - nbtFlask.setInteger("Capacity", 288); + nbtFlask.setInteger("Capacity", 576); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(3), flask, 10, 30); - nbtFlask.setInteger("Capacity", 500); + nbtFlask.setInteger("Capacity", 720); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(4), flask, 10, 30); - nbtFlask.setInteger("Capacity", 576); + nbtFlask.setInteger("Capacity", 864); flask.setTagCompound(nbtFlask); GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(5), flask, 10, 30); - nbtFlask.setInteger("Capacity", 720); + nbtFlask.setInteger("Capacity", 250); + flask.setTagCompound(nbtFlask); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(10), flask, 10, 30); + nbtFlask.setInteger("Capacity", 500); flask.setTagCompound(nbtFlask); - GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(6), flask, 10, 30); + GT_Values.RA.addAssemblerRecipe(ItemList.VOLUMETRIC_FLASK.get(1), GT_Utility.getIntegratedCircuit(11), flask, 10, 30); // make the 1000L recipe actualy in ItemStack flask500 = flask.copy(); nbtFlask.setInteger("Capacity", 1000); -- cgit From 4e7529054cd805c94a64b77202cf2ee3c77c1d34 Mon Sep 17 00:00:00 2001 From: DreamMasterXXL Date: Fri, 2 Oct 2020 20:27:09 +0200 Subject: fix(GT)add missing NBT Imort --- src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java index b84ea3b52d..1b70ac498e 100644 --- a/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java +++ b/src/main/java/gregtech/loaders/postload/GT_MachineRecipeLoader.java @@ -17,6 +17,7 @@ import mods.railcraft.common.items.RailcraftToolItems; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; +import net.minecraft.nbt.NBTTagCompound; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.fluids.Fluid; import net.minecraftforge.fluids.FluidRegistry; -- cgit From 749e36968f3a2b392f497e59934ad521f4c78742 Mon Sep 17 00:00:00 2001 From: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> Date: Sun, 4 Oct 2020 23:36:56 +0200 Subject: Invalid Muffler Hatch Facing Added the ability to change the invalid facing orientation on the Muffler Hatch Signed-off-by: bartimaeusnek <33183715+bartimaeusnek@users.noreply.github.com> --- .../GT_MetaTileEntity_Hatch_Muffler.java | 97 +++++++++++++--------- 1 file changed, 56 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java index 9cadeaddc2..b3998b62e7 100644 --- a/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java +++ b/src/main/java/gregtech/api/metatileentity/implementations/GT_MetaTileEntity_Hatch_Muffler.java @@ -12,6 +12,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; +import java.util.Arrays; + import static gregtech.api.objects.XSTR.XSTR_INSTANCE; public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @@ -53,10 +55,23 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { return true; } + private int[] mFacings; + + /*private void init()*/ { + setInValidFacings(ForgeDirection.DOWN); + } + + public void setInValidFacings(ForgeDirection... aFacings) { + mFacings = Arrays.stream(aFacings).mapToInt(Enum::ordinal).toArray(); + } + @Override public boolean isFacingValid(byte aFacing) { - return aFacing != 0; - } + for (int x : mFacings) + if (x == aFacing) + return false; + return true; + } @Override public boolean isAccessAllowed(EntityPlayer aPlayer) { @@ -80,9 +95,9 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { } return false; } - - public int calculatePollutionReduction(int aPollution){ - return (int) (aPollution *(Math.pow(0.85F, mTier - 1))); + + public int calculatePollutionReduction(int aPollution) { + return (int) (aPollution * (Math.pow(0.85F, mTier - 1))); } @Override @@ -98,51 +113,51 @@ public class GT_MetaTileEntity_Hatch_Muffler extends GT_MetaTileEntity_Hatch { @Override public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) { super.onPostTick(aBaseMetaTileEntity, aTick); - if(aBaseMetaTileEntity.isClientSide() && this.getBaseMetaTileEntity().isActive()) - pollutionParticles(this.getBaseMetaTileEntity().getWorld(),"largesmoke"); - } - - public void pollutionParticles(World aWorld,String name){ - boolean chk1,chk2,chk3; - float ran1=XSTR_INSTANCE.nextFloat(),ran2=0,ran3=0; - chk1=ran1*100= GT_Mod.gregtechproxy.mPollutionSmogLimit){ - ran2=XSTR_INSTANCE.nextFloat(); - ran3=XSTR_INSTANCE.nextFloat(); - chk2=ran2*100= GT_Mod.gregtechproxy.mPollutionSmogLimit) { + ran2 = XSTR_INSTANCE.nextFloat(); + ran3 = XSTR_INSTANCE.nextFloat(); + chk2 = ran2 * 100 < calculatePollutionReduction(100); + chk3 = ran3 * 100 < calculatePollutionReduction(100); + if (!(chk1 || chk2 || chk3)) return; + } else { + if (!chk1) return; + chk2 = chk3 = false; } - IGregTechTileEntity aMuffler=this.getBaseMetaTileEntity(); - ForgeDirection aDir=ForgeDirection.getOrientation(aMuffler.getFrontFacing()); - float xPos=aDir.offsetX*0.76F+aMuffler.getXCoord()+0.25F; - float yPos=aDir.offsetY*0.76F+aMuffler.getYCoord()+0.25F; - float zPos=aDir.offsetZ*0.76F+aMuffler.getZCoord()+0.25F; + IGregTechTileEntity aMuffler = this.getBaseMetaTileEntity(); + ForgeDirection aDir = ForgeDirection.getOrientation(aMuffler.getFrontFacing()); + float xPos = aDir.offsetX * 0.76F + aMuffler.getXCoord() + 0.25F; + float yPos = aDir.offsetY * 0.76F + aMuffler.getYCoord() + 0.25F; + float zPos = aDir.offsetZ * 0.76F + aMuffler.getZCoord() + 0.25F; - float ySpd=aDir.offsetY*0.1F+0.2F+0.1F*XSTR_INSTANCE.nextFloat(); + float ySpd = aDir.offsetY * 0.1F + 0.2F + 0.1F * XSTR_INSTANCE.nextFloat(); float xSpd; float zSpd; - if(aDir.offsetY==-1){ - float temp=XSTR_INSTANCE.nextFloat()*2*(float)Math.PI; - xSpd=(float)Math.sin(temp)*0.1F; - zSpd=(float)Math.cos(temp)*0.1F; - }else{ - xSpd=aDir.offsetX*(0.1F+0.2F*XSTR_INSTANCE.nextFloat()); - zSpd=aDir.offsetZ*(0.1F+0.2F*XSTR_INSTANCE.nextFloat()); + if (aDir.offsetY == -1) { + float temp = XSTR_INSTANCE.nextFloat() * 2 * (float) Math.PI; + xSpd = (float) Math.sin(temp) * 0.1F; + zSpd = (float) Math.cos(temp) * 0.1F; + } else { + xSpd = aDir.offsetX * (0.1F + 0.2F * XSTR_INSTANCE.nextFloat()); + zSpd = aDir.offsetZ * (0.1F + 0.2F * XSTR_INSTANCE.nextFloat()); } - if(chk1) - aWorld.spawnParticle(name, xPos + ran1*0.5F, yPos + XSTR_INSTANCE.nextFloat()*0.5F, zPos + XSTR_INSTANCE.nextFloat()*0.5F, xSpd, ySpd, zSpd); + if (chk1) + aWorld.spawnParticle(name, xPos + ran1 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); - if(chk2) - aWorld.spawnParticle(name, xPos + ran2*0.5F, yPos + XSTR_INSTANCE.nextFloat()*0.5F, zPos + XSTR_INSTANCE.nextFloat()*0.5F, xSpd, ySpd, zSpd); + if (chk2) + aWorld.spawnParticle(name, xPos + ran2 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); - if(chk3) - aWorld.spawnParticle(name, xPos + ran3*0.5F, yPos + XSTR_INSTANCE.nextFloat()*0.5F, zPos + XSTR_INSTANCE.nextFloat()*0.5F, xSpd, ySpd, zSpd); + if (chk3) + aWorld.spawnParticle(name, xPos + ran3 * 0.5F, yPos + XSTR_INSTANCE.nextFloat() * 0.5F, zPos + XSTR_INSTANCE.nextFloat() * 0.5F, xSpd, ySpd, zSpd); } } -- cgit