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 another lag caused by IC2 spamming detectAndSendChanges #238

Merged
merged 2 commits into from
Sep 8, 2023
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
5 changes: 1 addition & 4 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//version: 1691351470
//version: 1692122114
/*
DO NOT CHANGE THIS FILE!
Also, you may replace this file at any time if there is an update available.
Expand Down Expand Up @@ -562,9 +562,6 @@ repositories {
maven {
name 'Overmind forge repo mirror'
url 'https://gregtech.overminddl1.com/'
mavenContent {
excludeGroup("net.minecraftforge") // missing the `universal` artefact
}
}
maven {
name = "GTNH Maven"
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/mitchej123/hodgepodge/mixins/Mixins.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ public enum Mixins {
.setApplyIf(() -> Common.config.fixIc2HoverMode).addTargetedMod(TargetedMod.IC2)),
IC2_ARMOR_LAG_FIX(new Builder("IC2 Armor Lag Fix").setPhase(Phase.LATE)
.addMixinClasses(
"ic2.MixinElectricItemManager",
"ic2.MixinIC2ArmorHazmat",
"ic2.MixinIC2ArmorJetpack",
"ic2.MixinIC2ArmorNanoSuit",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package com.mitchej123.hodgepodge.mixins.late.ic2;

import net.minecraft.inventory.Container;

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

import ic2.core.item.ElectricItemManager;

@Mixin(ElectricItemManager.class)
public class MixinElectricItemManager {

@Redirect(
method = "chargeFromArmor",
at = @At(value = "INVOKE", target = "Lnet/minecraft/inventory/Container;detectAndSendChanges()V"),
remap = false)
public void hodgepodge$cancelDetectAndSendChanges(Container instance) {}
}