-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix that kinetic stress output will never not stop #1110
Conversation
src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java
Outdated
Show resolved
Hide resolved
src/main/java/com/gregtechceu/gtceu/api/machine/trait/RecipeLogic.java
Outdated
Show resolved
Hide resolved
fbdcbbf
to
fa37e5c
Compare
I rechecked the code logic and found that I could make changes in KineticPartMachine to fix this bug without modifying RecipeLogic. But now there is a problem that the stress output cannot be stopped when the controller is paused. |
you could add a callback for that maybe? |
I think now it will not have an excessive impact on the existing code logic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't say "do a second always-ticking thing to check it"
I said "add a callback for when the machine is paused in the recipe logic, and use it here to pause the hatch."
src/main/java/com/gregtechceu/gtceu/common/machine/multiblock/part/KineticPartMachine.java
Outdated
Show resolved
Hide resolved
I didn't know how to add the callback so I used a |
Well, look at what the onWorking/onWaiting etc. Methods do and apply that to this issue by adding an |
…ine set workingEnabled to false
src/main/java/com/gregtechceu/gtceu/api/machine/feature/multiblock/IMultiPart.java
Outdated
Show resolved
Hide resolved
Sorry, my IDE displays other method as one line. |
* Fix that kinetic stress output will never not stop * Add onPaused callback which is called when the WorkableMultiblockMachine set workingEnabled to false * Format code
* Fix that kinetic stress output will never not stop * Add onPaused callback which is called when the WorkableMultiblockMachine set workingEnabled to false * Format code
* Fix can not create multiblock by using custom function (#1098) * fix turbine rotors not getting damaged (#1099) * fix shutter cover not being registered (#1100) * More KubeJS utility functions for machines (#1101) * clean up Content, GTRecipeBuilder * make research methods accessible from KJS * add callbacks for machine working/waiting/beforeWorking/afterWorking * add KubeJS IngredientAction support for item inputs. * add multiblock tank recipes (#1102) * add recipe to beforeWorking callback (#1106) * add filtering to output hatches (#1108) * make any recipe capability able to have slots like item and fluid do. * fix OreDataLoader crashing if because of already unfrozen registries if loading failed before * make `capabilitiesProxy`s use IdentityHashMaps for tables, for faster(?) lookup. * fix most inputs being marked as per tick * make recipe types sort inputs based on capability value, for consistent slot layout * add fluid output hatch filter * make pump hatch & steam boiler use fluid tags for filtration, for compatibility reasons * add way to get total amount of "stuff" from an IRecipeHandler, for sorting * make inputs & outputs be sorted according to 1. if the hatch has contents, and 2. filter priority * fix quantum tank renderer error * fix fluid hatch text * fix fusion reactor being able to run with less than required heat once recipe has started * update LDLib * fix GCyM multis using perfect OC, add recipe method for non-consumed fluid inputs, refactor recipe modifiers (#1103) * add more ore generator types. (#1104) * add `ClassicVeinGenerator` for the grognards among us * make VeinGenerator#copy() do deeper copies for safety reasons * add shortcut in GTOreDefinition for ClassicVeinGenerator * fix float provider crashing with constant value because of mojank. * finalize classic generator * add CuboidVeinGenerator * finalize cuboid generator * fix gradual falloff in cuboid vein * fix network switch crash, data bank chaining (#1114) * fix network switch sometimes crashing when the GUI is opened * fix optical cables sometimes not functioning at all * fix research recipe ids being weird sometimes (e.g. when using GT material items as input) * fix advanced data access hatch GUI being offcenter * fix scanner & research station recipes having both inputs and outputs be the output (this was introduced in #1108) * fix data bank chaining * fix fluid input hatch UI (#1115) * add partial NBT input support (#1121) * make coil material a supplier for safety * fix KJS machines not being able to have multiple recipe modifiers * try to add partial nbt support (doesn't work yet.) * fix recipe lookup finding inputs in proxies, thus doubling input stacks in lookup * it work * Use getEnergyStored in cases where energy is available but was not input recently (#1127) * rework bedrock ore miner (#1124) * it works except I get a weird codec error... * it work * mfw I accidentally swapped fluid & bedrock ore vein event * fix veined generator crashing on copy because `rareBlocks == null` * add setter for `RecipeLogic#progress` * fix miner having way too high of a multiplier * run data * fix n mB/s ore * fix singleblocks not being able to accept items via GUI * fix singleblocks not being able to accept items via GUI 2: electic boogaloo * remove useless forge impls of data loaders * return early if no valid items are found * Fix that kinetic stress output will never not stop (#1110) * Fix that kinetic stress output will never not stop * Add onPaused callback which is called when the WorkableMultiblockMachine set workingEnabled to false * Format code * fix world accelerator issues (#1126) * fix world accelerator class formatting fix world accelerator using 2x energy fix world accelerator always accelerating BEs even in random tick mode * remove bad return * fix LD pipes disconnecting on reload, not working before being rotated once (#1131) * fix item collector not working after unload & reload; fix item collector requiring KubeJS; fix item collector tooltip being broken (#1132) * fix research items not rendering in JEI if on a server (#1134) * fix research items not rendering in JEI if on a server * fix #1134 * add wood cutter recipes (#1133) * add wood cutter recipes, remake how we remove & add the wood recipes to match 1.12 fixes #1117 fixes #1051 fixes #1048 * run datagen * Remove "equality jank" in MapFluidTagIngredient to fix recipes randomly not working when server restarts (#1142) * fix ABS & large electrolyzer recipes (#1147) * Remove unused, invalidly-named files so Minecraft stops complaining in a dev environment (#1149) * Rename sounds so they get added to sound events properly (#1150) * Add various fluid blocks to tag `minecraft:replaceable` (#1148) * Fix #1125 (#1151) * Fix wrench interaction to not care about durability (#1155) (#1156) * fix treated wood recipe (#1159) * Override `BE.setChanged` to significantly reduce neighbor updates (#1164) * Add special lang-generation case for "Iron III Chloride" (#1059) (#1157) * Add special lang-generation case for "Iron III Chloride" (#1059) * Relocate fix to its proper place * Re-add chipped/flawed gem lang keys * Fix titanium large fluid cell recycling & engine intake casing assembling (#1169) Fix titanium large fluid cell recycling bug in #1068 Fix engine intake casing assembling bug in #1166 * fix all custom recipe capabilities being removed (#1165) * update ru.lang (#1173) * Translated using Weblate (Russian) Currently translated at 99.8% (5254 of 5261 strings) Translation: Gregicality/GregTech Modern Translate-URL: http://weblate.pantsu.moe/projects/gregicality/gregtech-modern/ru/ * Translated using Weblate (Russian) Currently translated at 100.0% (5261 of 5261 strings) Translation: Gregicality/GregTech Modern Translate-URL: http://weblate.pantsu.moe/projects/gregicality/gregtech-modern/ru/ --------- Co-authored-by: Western01 <[email protected]> * chore: version & changelog for 1.2.1 (#1175) * chore: version & changelog * chore: add decorative blocks to changelog * better #1176 (#1181) * added Every Single Missing Block * fix blank assets.. * fix * a * oops * greg? * ... * bruh. * fix blank assets.. * optimize the shit out of this, remove wack textures, go back to original ones * rename stone textures (we need smooth variants for dark, light concrete, marble, red granite still) * run data. * Update src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java Co-authored-by: Mikerooni <[email protected]> * Update src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java Co-authored-by: Mikerooni <[email protected]> --------- Co-authored-by: NemEzanevem <[email protected]> Co-authored-by: Mikerooni <[email protected]> * fix errors * fix errors 2: electric boogaloo * fix errors 3: return of the compile errors * run datagen --------- Co-authored-by: SmallY <[email protected]> Co-authored-by: Mikerooni <[email protected]> Co-authored-by: Alex Loving <[email protected]> Co-authored-by: Yibo Cao <[email protected]> Co-authored-by: ctrlaltmilk <[email protected]> Co-authored-by: gjmhmm8 <[email protected]> Co-authored-by: richie3366 <[email protected]> Co-authored-by: EliAyase <[email protected]> Co-authored-by: marisathewitch <[email protected]> Co-authored-by: Western01 <[email protected]> Co-authored-by: NemEzanevem <[email protected]>
* Fix can not create multiblock by using custom function (GregTechCEu#1098) * fix turbine rotors not getting damaged (GregTechCEu#1099) * fix shutter cover not being registered (GregTechCEu#1100) * More KubeJS utility functions for machines (GregTechCEu#1101) * clean up Content, GTRecipeBuilder * make research methods accessible from KJS * add callbacks for machine working/waiting/beforeWorking/afterWorking * add KubeJS IngredientAction support for item inputs. * add multiblock tank recipes (GregTechCEu#1102) * add recipe to beforeWorking callback (GregTechCEu#1106) * add filtering to output hatches (GregTechCEu#1108) * make any recipe capability able to have slots like item and fluid do. * fix OreDataLoader crashing if because of already unfrozen registries if loading failed before * make `capabilitiesProxy`s use IdentityHashMaps for tables, for faster(?) lookup. * fix most inputs being marked as per tick * make recipe types sort inputs based on capability value, for consistent slot layout * add fluid output hatch filter * make pump hatch & steam boiler use fluid tags for filtration, for compatibility reasons * add way to get total amount of "stuff" from an IRecipeHandler, for sorting * make inputs & outputs be sorted according to 1. if the hatch has contents, and 2. filter priority * fix quantum tank renderer error * fix fluid hatch text * fix fusion reactor being able to run with less than required heat once recipe has started * update LDLib * fix GCyM multis using perfect OC, add recipe method for non-consumed fluid inputs, refactor recipe modifiers (GregTechCEu#1103) * add more ore generator types. (GregTechCEu#1104) * add `ClassicVeinGenerator` for the grognards among us * make VeinGenerator#copy() do deeper copies for safety reasons * add shortcut in GTOreDefinition for ClassicVeinGenerator * fix float provider crashing with constant value because of mojank. * finalize classic generator * add CuboidVeinGenerator * finalize cuboid generator * fix gradual falloff in cuboid vein * fix network switch crash, data bank chaining (GregTechCEu#1114) * fix network switch sometimes crashing when the GUI is opened * fix optical cables sometimes not functioning at all * fix research recipe ids being weird sometimes (e.g. when using GT material items as input) * fix advanced data access hatch GUI being offcenter * fix scanner & research station recipes having both inputs and outputs be the output (this was introduced in GregTechCEu#1108) * fix data bank chaining * fix fluid input hatch UI (GregTechCEu#1115) * add partial NBT input support (GregTechCEu#1121) * make coil material a supplier for safety * fix KJS machines not being able to have multiple recipe modifiers * try to add partial nbt support (doesn't work yet.) * fix recipe lookup finding inputs in proxies, thus doubling input stacks in lookup * it work * Use getEnergyStored in cases where energy is available but was not input recently (GregTechCEu#1127) * rework bedrock ore miner (GregTechCEu#1124) * it works except I get a weird codec error... * it work * mfw I accidentally swapped fluid & bedrock ore vein event * fix veined generator crashing on copy because `rareBlocks == null` * add setter for `RecipeLogic#progress` * fix miner having way too high of a multiplier * run data * fix n mB/s ore * fix singleblocks not being able to accept items via GUI * fix singleblocks not being able to accept items via GUI 2: electic boogaloo * remove useless forge impls of data loaders * return early if no valid items are found * Fix that kinetic stress output will never not stop (GregTechCEu#1110) * Fix that kinetic stress output will never not stop * Add onPaused callback which is called when the WorkableMultiblockMachine set workingEnabled to false * Format code * fix world accelerator issues (GregTechCEu#1126) * fix world accelerator class formatting fix world accelerator using 2x energy fix world accelerator always accelerating BEs even in random tick mode * remove bad return * fix LD pipes disconnecting on reload, not working before being rotated once (GregTechCEu#1131) * fix item collector not working after unload & reload; fix item collector requiring KubeJS; fix item collector tooltip being broken (GregTechCEu#1132) * fix research items not rendering in JEI if on a server (GregTechCEu#1134) * fix research items not rendering in JEI if on a server * fix GregTechCEu#1134 * add wood cutter recipes (GregTechCEu#1133) * add wood cutter recipes, remake how we remove & add the wood recipes to match 1.12 fixes GregTechCEu#1117 fixes GregTechCEu#1051 fixes GregTechCEu#1048 * run datagen * Remove "equality jank" in MapFluidTagIngredient to fix recipes randomly not working when server restarts (GregTechCEu#1142) * fix ABS & large electrolyzer recipes (GregTechCEu#1147) * Remove unused, invalidly-named files so Minecraft stops complaining in a dev environment (GregTechCEu#1149) * Rename sounds so they get added to sound events properly (GregTechCEu#1150) * Add various fluid blocks to tag `minecraft:replaceable` (GregTechCEu#1148) * Fix GregTechCEu#1125 (GregTechCEu#1151) * Fix wrench interaction to not care about durability (GregTechCEu#1155) (GregTechCEu#1156) * fix treated wood recipe (GregTechCEu#1159) * Override `BE.setChanged` to significantly reduce neighbor updates (GregTechCEu#1164) * Add special lang-generation case for "Iron III Chloride" (GregTechCEu#1059) (GregTechCEu#1157) * Add special lang-generation case for "Iron III Chloride" (GregTechCEu#1059) * Relocate fix to its proper place * Re-add chipped/flawed gem lang keys * Fix titanium large fluid cell recycling & engine intake casing assembling (GregTechCEu#1169) Fix titanium large fluid cell recycling bug in GregTechCEu#1068 Fix engine intake casing assembling bug in GregTechCEu#1166 * fix all custom recipe capabilities being removed (GregTechCEu#1165) * update ru.lang (GregTechCEu#1173) * Translated using Weblate (Russian) Currently translated at 99.8% (5254 of 5261 strings) Translation: Gregicality/GregTech Modern Translate-URL: http://weblate.pantsu.moe/projects/gregicality/gregtech-modern/ru/ * Translated using Weblate (Russian) Currently translated at 100.0% (5261 of 5261 strings) Translation: Gregicality/GregTech Modern Translate-URL: http://weblate.pantsu.moe/projects/gregicality/gregtech-modern/ru/ --------- Co-authored-by: Western01 <[email protected]> * chore: version & changelog for 1.2.1 (GregTechCEu#1175) * chore: version & changelog * chore: add decorative blocks to changelog * better GregTechCEu#1176 (GregTechCEu#1181) * added Every Single Missing Block * fix blank assets.. * fix * a * oops * greg? * ... * bruh. * fix blank assets.. * optimize the shit out of this, remove wack textures, go back to original ones * rename stone textures (we need smooth variants for dark, light concrete, marble, red granite still) * run data. * Update src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java Co-authored-by: Mikerooni <[email protected]> * Update src/main/java/com/gregtechceu/gtceu/common/data/GTBlocks.java Co-authored-by: Mikerooni <[email protected]> --------- Co-authored-by: NemEzanevem <[email protected]> Co-authored-by: Mikerooni <[email protected]> * fix errors * fix errors 2: electric boogaloo * fix errors 3: return of the compile errors * run datagen --------- Co-authored-by: SmallY <[email protected]> Co-authored-by: Mikerooni <[email protected]> Co-authored-by: Alex Loving <[email protected]> Co-authored-by: Yibo Cao <[email protected]> Co-authored-by: ctrlaltmilk <[email protected]> Co-authored-by: gjmhmm8 <[email protected]> Co-authored-by: richie3366 <[email protected]> Co-authored-by: EliAyase <[email protected]> Co-authored-by: marisathewitch <[email protected]> Co-authored-by: Western01 <[email protected]> Co-authored-by: NemEzanevem <[email protected]>
Fix #1109
The
preWorking
andpostWorking
is not called when the machine paused or destroyed.