From e7624b97f571ee5a7d955514aa1741b10b21270e Mon Sep 17 00:00:00 2001 From: Ghostipedia Date: Mon, 9 Dec 2024 10:53:27 -0500 Subject: [PATCH] Allow Overseers to destroy EuP2P (Functionality Hard Disabled) --- build.gradle | 10 +++++- .../mixin/MAE2GTIntegrationMixin.java | 33 +++++++++++++++++++ src/main/resources/cosmiccore.mixins.json | 1 + 3 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 src/main/java/com/ghostipedia/cosmiccore/mixin/MAE2GTIntegrationMixin.java diff --git a/build.gradle b/build.gradle index e05f714..29c5987 100644 --- a/build.gradle +++ b/build.gradle @@ -62,6 +62,13 @@ repositories { maven { url "https://maven.teamresourceful.com/repository/maven-public/" } + maven { + name "Modmaven" + url "https://modmaven.dev/" + content { + includeGroup 'appeng' + } + } maven { name = 'GTCEu Maven' url = 'https://maven.gtceu.com' @@ -146,7 +153,8 @@ dependencies { modImplementation("com.lowdragmc.ldlib:ldlib-forge-${project.minecraft_version}:${project.ldlib_version}") { transitive = false } modImplementation("com.tterrag.registrate:Registrate:${project.registrate_version}") modImplementation("dev.latvian.mods:kubejs-forge:${project.kubejs_version}") - + modImplementation("appeng:appliedenergistics2-forge:15.2.13") { transitive = false } + modImplementation("curse.maven:modern-ae2-additions-1028068:5826205") { transitive = false } // Ad Astra forgeRuntimeLibrary("com.teamresourceful:yabn:1.0.3") // Cause architectury is kinda dumb with some java libs forgeRuntimeLibrary("com.teamresourceful:bytecodecs:1.0.2") // Cause architectury is kinda dumb with some java libs diff --git a/src/main/java/com/ghostipedia/cosmiccore/mixin/MAE2GTIntegrationMixin.java b/src/main/java/com/ghostipedia/cosmiccore/mixin/MAE2GTIntegrationMixin.java new file mode 100644 index 0000000..2844440 --- /dev/null +++ b/src/main/java/com/ghostipedia/cosmiccore/mixin/MAE2GTIntegrationMixin.java @@ -0,0 +1,33 @@ +package com.ghostipedia.cosmiccore.mixin; + + +import appeng.api.parts.PartModels; +import appeng.items.parts.PartItem; +import appeng.items.parts.PartModelsHelper; +import net.minecraft.Util; +import net.minecraft.world.item.Item; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.RegistryObject; +import org.spongepowered.asm.mixin.Debug; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Overwrite; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.Redirect; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; +import stone.mae2.integration.GregTechIntegration; +import stone.mae2.core.MAE2Items; +import stone.mae2.integration.GregTechIntegration; +import stone.mae2.parts.p2p.EUP2PTunnelPart; +import stone.mae2.parts.p2p.multi.EUMultiP2PPart; + +@Debug(export = true) +@Mixin(value = GregTechIntegration.class, remap = false) +public abstract class MAE2GTIntegrationMixin { + @Inject(method = "init", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/eventbus/api/IEventBus;addListener(Ljava/util/function/Consumer;)V"), cancellable = true, remap = false) + private static void init(IEventBus bus, CallbackInfo callbackInfo) { + callbackInfo.cancel(); + } + +} diff --git a/src/main/resources/cosmiccore.mixins.json b/src/main/resources/cosmiccore.mixins.json index 421fa70..5940e3e 100644 --- a/src/main/resources/cosmiccore.mixins.json +++ b/src/main/resources/cosmiccore.mixins.json @@ -8,6 +8,7 @@ "AdAstraSpaceSuitItemMixin", "DivingHelmetItemMixin", "PlayerBreathingMixin", + "MAE2GTIntegrationMixin", "accessor.LivingEntityAccessor", "accessor.LootTableAccessor", "client.CosmicCoreRemainingAirOverlayMixin"