diff --git a/build.gradle.kts b/build.gradle.kts index 14eaca7..c1b51f6 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -177,6 +177,9 @@ dependencies { //Nostalgic World Generation 1.0.0 compileOnly(deobfCurse("nostalgiagenerator-927053:4816167")) + //Hbm's Nuclear Tech Mod 1.0.27X5027 + compileOnly(deobfCurse("hbm-ntm-235439:5534354")) + //RandomThings 2.2.4 compileOnly(deobfCurse("randomthings-59816:2225310")) diff --git a/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISMMixin.java b/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISMMixin.java new file mode 100644 index 0000000..fe3efcb --- /dev/null +++ b/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISMMixin.java @@ -0,0 +1,43 @@ +/* + * EndlessIDs + * + * Copyright (C) 2022-2024 FalsePattern + * All Rights Reserved + * + * The above copyright notice, this permission notice and the words "MEGA" + * shall be included in all copies or substantial portions of the Software. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.falsepattern.endlessids.mixin.mixins.common.blockitem.ntm; + +import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook; +import com.hbm.handler.radiation.ChunkRadiationHandlerPRISM; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +import net.minecraft.world.chunk.storage.ExtendedBlockStorage; + +@Mixin(ChunkRadiationHandlerPRISM.class) +public abstract class ChunkRadiationHandlerPRISMMixin { + @Redirect(method = "updateSystem", + at = @At(value = "INVOKE", + target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"), + require = 1) + private byte[] extendLSBArray(ExtendedBlockStorage instance) { + return ((SubChunkBlockHook)instance).getB1(); + } +} diff --git a/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISM_SubChunkMixin.java b/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISM_SubChunkMixin.java new file mode 100644 index 0000000..eee3f7c --- /dev/null +++ b/src/main/java/com/falsepattern/endlessids/mixin/mixins/common/blockitem/ntm/ChunkRadiationHandlerPRISM_SubChunkMixin.java @@ -0,0 +1,43 @@ +/* + * EndlessIDs + * + * Copyright (C) 2022-2024 FalsePattern + * All Rights Reserved + * + * The above copyright notice, this permission notice and the words "MEGA" + * shall be included in all copies or substantial portions of the Software. + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + */ + +package com.falsepattern.endlessids.mixin.mixins.common.blockitem.ntm; + +import com.falsepattern.endlessids.mixin.helpers.SubChunkBlockHook; +import com.hbm.handler.radiation.ChunkRadiationHandlerPRISM; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Redirect; + +import net.minecraft.world.chunk.storage.ExtendedBlockStorage; + +@Mixin(ChunkRadiationHandlerPRISM.SubChunk.class) +public abstract class ChunkRadiationHandlerPRISM_SubChunkMixin { + @Redirect(method = "rebuild", + at = @At(value = "INVOKE", + target = "Lnet/minecraft/world/chunk/storage/ExtendedBlockStorage;getBlockLSBArray()[B"), + require = 1) + private byte[] extendLSBArray(ExtendedBlockStorage instance) { + return ((SubChunkBlockHook)instance).getB1(); + } +} diff --git a/src/main/java/com/falsepattern/endlessids/mixin/plugin/Mixin.java b/src/main/java/com/falsepattern/endlessids/mixin/plugin/Mixin.java index a4c5caa..ba7d104 100644 --- a/src/main/java/com/falsepattern/endlessids/mixin/plugin/Mixin.java +++ b/src/main/java/com/falsepattern/endlessids/mixin/plugin/Mixin.java @@ -215,6 +215,10 @@ public enum Mixin implements IMixin { DragonAPIBlockPropertiesMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.DRAGONAPI)), "blockitem.dragonapi.BlockPropertiesMixin"), DragonAPIBlockItemIDTypeMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.DRAGONAPI)), "blockitem.dragonapi.IDTypeMixin"), //endregion DragonAPI + //region HBM's Nuclear Tech Nod + NTMChunkRadiationHandlerPRISMMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISMMixin"), + NTMChunkRadiationHandlerPRISM_SubChunkMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.HBM_NTM)), "blockitem.ntm.ChunkRadiationHandlerPRISMMixin"), + //endregion HBM's Nuclear Tech Nod //region Matter Overdrive MOInventoryMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.MATTEROVERDRIVE).or(require(TargetedMod.MATTERMEGADRIVE))), "blockitem.matteroverdrive.InventoryMixin"), MOItemPatternMixin(Side.COMMON, condition(() -> GeneralConfig.extendBlockItem).and(require(TargetedMod.MATTEROVERDRIVE).or(require(TargetedMod.MATTERMEGADRIVE))), "blockitem.matteroverdrive.ItemPatternMixin"), diff --git a/src/main/java/com/falsepattern/endlessids/mixin/plugin/TargetedMod.java b/src/main/java/com/falsepattern/endlessids/mixin/plugin/TargetedMod.java index 16dde35..41ae649 100644 --- a/src/main/java/com/falsepattern/endlessids/mixin/plugin/TargetedMod.java +++ b/src/main/java/com/falsepattern/endlessids/mixin/plugin/TargetedMod.java @@ -55,6 +55,7 @@ public enum TargetedMod implements ITargetedMod { FUTUREPACK("Futurepack", false, contains("futurepack")), GALACTICRAFTCORE("GalactiCraftCore", false, contains("galacticraftcore")), GALAXYSPACE("GalaxySpace", false, contains("galaxyspace-")), + HBM_NTM("Hbm's Nuclear Tech Mod", false, contains("hbm-ntm")), HIGHLANDS("Highlands", false, contains("highlands")), ICG("Immersive Cavegen", false, contains("immersivecavegen")), IR3("Industrial Revolution by Redstone Rebooted", false, contains("industrialrevolutionbyredstonerebooted-")),