### Mod Initialization and Dimension Registry - Java Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt The VMTweak class is the main entry point for the mod. It initializes the mod, sets up a bidirectional map for dimension IDs and their short identifiers, and handles dynamic dimension discovery during world loading. ```Java import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.eventhandler.SubscribeEvent; import net.minecraftforge.event.world.WorldEvent; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; @Mod( modid = "vmtweak", version = "0.0.2", name = "vmtweak", acceptableRemoteVersions = "*", acceptedMinecraftVersions = "[1.7.10]" ) public class VMTweak { // Bidirectional map: Dimension ID <-> Short identifier public static BiMap dimDirectMap = HashBiMap.create(); // Pre-registered dimension mappings after mod loading completes: // 0 -> "Ow" (Overworld) // -1 -> "Ne" (Nether) // 1 -> "ED" (End) // 7 -> "TF" (Twilight Forest) // Ross128b dimensions from BartWorks config // Dynamic dimension discovery on world load @SubscribeEvent public void onWorldLoad(WorldEvent.Load e) { int dimID = e.world.provider.dimensionId; // Checks chunk provider to identify dimension type // Maps to GalacticGreg dimension definitions } } ``` -------------------------------- ### Mixin Configuration Handler - Java Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt The MixinPlugin class implements IMixinConfigPlugin to manage which mixins are loaded. It specifies the refmap configuration file and returns a list of mixin classes to be applied during runtime. ```Java import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin; import java.util.ArrayList; import java.util.List; public class MixinPlugin implements IMixinConfigPlugin { @Override public String getRefMapperConfig() { return "mixins.vmtweak.refmap.json"; } @Override public List getMixins() { ArrayList ret = new ArrayList<>(); ret.add("MTEVoidMinerBaseMixin"); // Main mixin for Void Miner return ret; } @Override public boolean shouldApplyMixin(String targetClassName, String mixinClassName) { return true; // Always apply configured mixins } } ``` -------------------------------- ### Mixin Configuration for Void Miner Tweak Mod Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt Defines the mixin environment settings and lists all mixin classes to be applied for the Void Miner Tweak Mod. This JSON file is essential for the mod's core functionality and integration with the game's mixin system. ```json { "required": true, "minVersion": "0.8.5-GTNH", "package": "reobf.vmtweak.main.mixin.mixins", "plugin": "reobf.vmtweak.main.mixin.MixinPlugin", "refmap": "mixins.vmtweak.refmap.json", "target": "@env(DEFAULT)", "compatibilityLevel": "JAVA_8", "mixins": [ "MTEVoidMinerBaseMixin" ], "client": [], "server": [] } ``` -------------------------------- ### Localization Strings for Void Miner Tweak Mod GUI Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt Provides user-facing messages for the GUI overlay in the Void Miner machine interface. These properties files are used to display information and error messages to the player in the default en_US locale. ```properties # en_US.lang gui.dimension.overwrite.description=Overwrite Dimension: gui.dimension.overwrite.failed=Overwrite not success. You must visit this dimension at first. gui.dimension.overwrite.error=You must visit the dimension at least once to enable its drops. gui.dimension.overwrite.EndAsteroids=T0: End Asteroids. Same as the End. ``` -------------------------------- ### Gradle Build Configuration for GTNH Modpack Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt Configures build settings and dependencies for the Void Miner Tweak Mod within the GTNH modpack ecosystem. This includes defining key dependencies and project properties like Minecraft and Forge versions. ```groovy // dependencies.gradle - Key dependencies dependencies { api('com.github.GTNewHorizons:BlockRenderer6343:1.3.16:dev') api("com.github.GTNewHorizons:ModularUI:1.2.20:dev") api('com.github.GTNewHorizons:GT5-Unofficial:5.09.51.435:dev') api('com.github.GTNewHorizons:NewHorizonsCoreMod:2.7.243:dev') runtimeOnlyNonPublishable("com.github.GTNewHorizons:NotEnoughItems:2.7.79-GTNH:dev") runtimeOnlyNonPublishable('com.github.GTNewHorizons:Angelica:1.0.0-beta55:api') runtimeOnlyNonPublishable('com.github.GTNewHorizons:Galacticraft:3.3.12-GTNH:dev') } // gradle.properties - Key settings // minecraftVersion = 1.7.10 // forgeVersion = 10.13.4.1614 // usesMixins = true // mixinPlugin = mixin.MixinPlugin // mixinsPackage = mixin.mixins ``` -------------------------------- ### Void Miner Dimension Override - Java Source: https://context7.com/reobf/void-miner-tweak-mod/llms.txt This mixin modifies the MTEVoidMinerBase class to intercept dimension detection. It allows overriding the dimension ID based on an ItemDimensionDisplay in the machine's inventory, persists the override state to NBT, and includes GUI elements for status display. ```Java import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.injection.At; import org.spongepowered.asm.mixin.injection.ModifyVariable; import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; import java.util.Optional; @Mixin(MTEVoidMinerBase.class) public abstract class MTEVoidMinerBaseMixin extends MTEEnhancedMultiBlockBase { // Override dimension ID in extra drops handler @ModifyVariable(method = "handleExtraDrops", at = @At("HEAD"), remap = false, argsOnly = true) private int handleExtraDrops(int id) { // Returns overridden dimension ID based on NEI ore block in inventory return VMTweak.dimDirectMap.inverse() .getOrDefault(VMTweak$checkNEIOreBlockDim(), id); } // Check inventory slot for dimension display item private String VMTweak$checkNEIOreBlockDim() { return Optional.ofNullable(this.mInventory[1]) .filter(s -> s.getItem() instanceof ItemDimensionDisplay) .map(ItemDimensionDisplay::getDimension) .orElse("None"); } // Persist dimension override to NBT @Inject(method = "saveNBTData", at = @At("HEAD"), remap = false) public void saveNBTData(NBTTagCompound aNBT, CallbackInfo c) { aNBT.setString("VMTweak$mLastDimensionOverride", this.VMTweak$mLastDimensionOverride); } // Load dimension override from NBT @Inject(method = "loadNBTData", at = @At("HEAD"), remap = false) public void loadNBTData(NBTTagCompound aNBT, CallbackInfo c) { this.VMTweak$mLastDimensionOverride = aNBT.getString("VMTweak$mLastDimensionOverride"); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.