Skip to content
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 extra utilities ender quarry freeze/soft-lock randomly #480

Merged
merged 2 commits into from
Jan 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions dependencies.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ dependencies {
transformedModCompileOnly("com.github.GTNewHorizons:Baubles:1.0.4:dev")
// Transitive updates to make runClient17 work
transformedModCompileOnly("com.github.GTNewHorizons:ForgeMultipart:1.6.2:dev")
transformedModCompileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.89:dev")
transformedModCompileOnly("com.github.GTNewHorizons:GT5-Unofficial:5.09.51.93:dev")
transformedModCompileOnly("com.github.GTNewHorizons:harvestcraft:1.3.0-GTNH:dev")
transformedModCompileOnly("com.github.GTNewHorizons:HungerOverhaul:1.1.0-GTNH:dev")
transformedModCompileOnly("com.github.GTNewHorizons:MrTJPCore:1.3.0:dev") // Do not update, fixed afterwards
transformedModCompileOnly("com.github.GTNewHorizons:Railcraft:9.16.3:dev") { exclude group: "thaumcraft", module: "Thaumcraft" }
transformedModCompileOnly("com.github.GTNewHorizons:TinkersConstruct:1.13.7-GTNH:dev")
transformedModCompileOnly("com.github.GTNewHorizons:TinkersConstruct:1.13.8-GTNH:dev")
transformedModCompileOnly(rfg.deobf("curse.maven:bibliocraft-228027:2423369"))
transformedModCompileOnly(rfg.deobf("curse.maven:biomes-o-plenty-220318:2499612"))
transformedModCompileOnly("curse.maven:cofh-core-69162:2388751")
Expand All @@ -45,7 +45,7 @@ dependencies {
transformedModCompileOnly(rfg.deobf("curse.maven:glibys-voice-chat-225110:2301492"))

transformedModCompileOnly(rfg.deobf("curse.maven:automagy-222153:2285272"))
transformedModCompileOnly("com.github.GTNewHorizons:Galacticraft:3.3.3-GTNH:dev")
transformedModCompileOnly("com.github.GTNewHorizons:Galacticraft:3.3.4-GTNH:dev")
transformedModCompileOnly("curse.maven:minechem-368422:2905830")
transformedModCompileOnly("curse.maven:thermal-dynamics-227443:2388756")
transformedModCompileOnly("curse.maven:thermal-expansion-69163:2388759")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,10 @@ public class FixesConfig {
@Config.DefaultBoolean(true)
public static boolean fixExtraUtilitiesFilterDupe;

@Config.Comment("Fixes Ender Quarry get stuck at a mostly random location under certain conditions")
@Config.DefaultBoolean(true)
public static boolean fixExtraUtilitiesEnderQuarryFreeze;

// Galacticraft

@Config.Comment("Fix time commands with GC")
Expand Down
4 changes: 4 additions & 0 deletions src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,10 @@ public enum Mixins {
.addMixinClasses("extrautilities.MixinTileEntityEnderQuarry").setPhase(Phase.LATE).setSide(Side.BOTH)
.setApplyIf(() -> TweaksConfig.extraUtilitiesEnderQuarryOverride > 0)
.addTargetedMod(TargetedMod.EXTRA_UTILITIES)),
FIX_ENDERQUARRY_FREEZE(new Builder("Fix Ender Quarry freezes randomly")
.addMixinClasses("extrautilities.MixinTileEntityEnderQuarry_FixFreeze").setPhase(Phase.LATE)
.setSide(Side.BOTH).setApplyIf(() -> FixesConfig.fixExtraUtilitiesEnderQuarryFreeze)
.addTargetedMod(TargetedMod.EXTRA_UTILITIES)),

// Gliby's Voice Chat
FIX_GLIBYS_VC_THREAD_SHUTDOWN_CLIENT(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package com.mitchej123.hodgepodge.mixins.late.extrautilities;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;

import com.llamalad7.mixinextras.injector.ModifyReturnValue;
import com.rwtema.extrautils.tileentity.enderquarry.TileEntityEnderQuarry;

@Mixin(TileEntityEnderQuarry.class)
public class MixinTileEntityEnderQuarry_FixFreeze {

@ModifyReturnValue(method = "harvestBlock", at = @At("RETURN"), remap = false)
private boolean hodgepodge$fixFreeze(boolean original) {
// To fix a weird issue with certain mods that let the Ender Quarry stuck at a
// mostly random location, return true also in the following (all) scenario:
// - The harvested block has no drops
// - The harvested block has unexpected drops
// - The harvested block has been harvested by another Entity
return true;
}
}
Loading