Inspired by 2020's April Fools' 20w14infinite Snapshot, this mod brings endless randomly generated dimensions into Minecraft.

irid tweaks and settings

Lera 90c7e8df 78429701

+17 -13
+3 -4
common/src/main/java/net/lerariemann/infinity/iridescence/Iridescence.java
··· 14 14 import net.lerariemann.infinity.entity.custom.ChaosPawn; 15 15 import net.lerariemann.infinity.util.InfinityMethods; 16 16 import net.lerariemann.infinity.util.core.NbtUtils; 17 - import net.lerariemann.infinity.util.core.RandomProvider; 18 17 import net.lerariemann.infinity.util.loading.ShaderLoader; 19 18 import net.lerariemann.infinity.util.teleport.WarpLogic; 20 19 import net.lerariemann.infinity.util.var.ColorLogic; ··· 139 138 return ticksInHour * (3 + amplifier); 140 139 } 141 140 static int getOffsetLength(int amplifier) { 142 - return ticksInHour/2 * (4 + amplifier); 141 + return ticksInHour * (4 + amplifier) / 2; 143 142 } 144 143 static int getAfterglowDuration() { 145 - int minDuration = ticksInHour * RandomProvider.ruleInt("afterglowDuration"); //default is 24 minutes 144 + int minDuration = ticksInHour * 20; 146 145 return (int)Math.floor(minDuration * Math.pow(2, InfinityMod.random.nextDouble(-1, 1))); 147 146 } 148 147 static int getCooldownDuration() { 149 - return ticksInHour * RandomProvider.ruleInt("iridescenceCooldownDuration"); //default is 7*24 minutes 148 + return ticksInHour * 20 * 7; 150 149 } 151 150 152 151 enum Phase {
+5 -3
common/src/main/java/net/lerariemann/infinity/iridescence/IridescentEffect.java
··· 3 3 import net.lerariemann.infinity.InfinityMod; 4 4 import net.lerariemann.infinity.entity.custom.ChaosPawn; 5 5 import net.lerariemann.infinity.options.InfinityOptions; 6 + import net.lerariemann.infinity.util.core.RandomProvider; 6 7 import net.lerariemann.infinity.util.loading.ShaderLoader; 7 8 import net.lerariemann.infinity.util.teleport.WarpLogic; 8 9 import net.lerariemann.infinity.registry.core.ModStatusEffects; ··· 48 49 switch (entity) { 49 50 case PlayerEntity player -> { 50 51 if (player instanceof ServerPlayerEntity serverPlayer) { 51 - if (player.isInvulnerable()) endJourney(serverPlayer, true, 0); 52 + if (player.isInvulnerable()) player.setInvulnerable(false); 53 + if (Iridescence.getPhase(entity) == Iridescence.Phase.PLATEAU) endJourney(serverPlayer, true, 0); 52 54 unloadShader(serverPlayer); 53 55 } 54 56 else { ··· 73 75 if (entity instanceof PlayerEntity p) { 74 76 if (p instanceof ServerPlayerEntity player) { 75 77 if (shouldWarp(duration, amplifier)) { 76 - if (!player.isInvulnerable()) { 77 - player.setInvulnerable(true); 78 + if (Iridescence.getPhase(duration + ticksInHour, amplifier) != Iridescence.Phase.PLATEAU) { //the first warp 79 + if (RandomProvider.rule("iridSafeMode")) player.setInvulnerable(true); 78 80 saveCookie(player); 79 81 } 80 82 Identifier id = getIdForWarp(player);
+5 -1
common/src/main/resources/assets/infinity/lang/en_us.json
··· 223 223 "config.infinity.gameRules.maxDimensionScale.description": "The maximum allowed factor by which the coordinates can be multiplied or divided when travelling between the Overworld and custom dimensions. Set to zero to disable this cap.", 224 224 "config.infinity.gameRules.consumePortalKey": "Consume Portal Key", 225 225 "config.infinity.gameRules.consumePortalKey.description": "By default the portal key is consumed when a portal is activated. This can be disabled, in cases where you want to keep the key.", 226 - "config.infinity.gameRules.useSoundSyncPackets": "Use sound sync packets", 227 226 "config.infinity.gameRules.enforceModLoadedChecks": "Enforce checks for mods being loaded", 228 227 "config.infinity.gameRules.enforceModLoadedChecks.description": "The default option makes InfDim ignore config data for mods that are not present, as a safety net. This can cause issues with datapacks as well as some mods (which add content under a mod ID different from their own); if you encounter those, disabling this flag might be a fix.", 229 228 "config.infinity.gameRules.pawnsCanDropIllegalItems": "Illegal items enabled from pawn drops", 230 229 "config.infinity.gameRules.pawnsCanDropIllegalItems.description": "By default chaos pawns drop contents of a random loot table. Setting this flag to true changes the loot pool to any random items, including spawn eggs and operator blocks.", 230 + "config.infinity.gameRules.useSoundSyncPackets": "Use sound sync packets", 231 231 "config.infinity.gameRules.useSoundSyncPackets.description": "The Infinite Dimensions mod has a system in place that generates and auto-installs on the client a resource pack containing individual sound events for every music track in the game. This system can be disabled server-side if the presence of such a pack on the client is assured in a different way (i.e. by it being included in files of a modpack).", 232 + "config.infinity.gameRules.forceLowercase": "Force lowercase", 233 + "config.infinity.gameRules.forceLowercase.description": "When true, all book text is converted to lowercase before hashing into numeric seed, therefore \"WORD\", \"Word\" and \"word\" will all lead to the same dimension.", 234 + "config.infinity.gameRules.iridSafeMode": "Safe mode for iridescence", 235 + "config.infinity.gameRules.iridSafeMode.description": "When true, the player cannot die on the iridescent journey", 232 236 "config.infinity.rootChances.features_rules.generate_vanilla_features.description": "This setting handles whether or not to try to generate vanilla, unmodified features alongside modded ones.", 233 237 "config.infinity.rootChances.features_rules.rotate_blocks.description": "This setting handles the percentage chance that a block is rotated inside a feature.", 234 238 "config.infinity.rootChances.features_rules.flood_geodes.description": "This setting handles the percentage chance a geode is flooded with a random fluid.",
+1 -1
common/src/main/resources/assets/infinity/shaders/program/color_wheel.fsh
··· 77 77 78 78 float Luma = dot(OutColor, vec3(0.3, 0.59, 0.11)); 79 79 vec3 Chroma = OutColor - Luma; 80 - OutColor = Chroma * (1 + alpha*(0.8 + 0.1*IridLevel)) + Luma; 80 + OutColor = Chroma * (1 + alpha*(0.5 + 0.1*IridLevel)) + Luma; 81 81 82 82 fragColor = vec4(OutColor, 1.0); 83 83 }
+2 -3
common/src/main/resources/config/infinity.json
··· 1 1 { 2 - "infinity_version": 2004007, 2 + "infinity_version": 2004008, 3 3 "gameRules": { 4 4 "safeMode": false, 5 5 "longArithmeticEnabled": false, ··· 11 11 "useSoundSyncPackets": true, 12 12 "enforceModLoadedChecks": true, 13 13 "forceLowercase": false, 14 + "iridSafeMode": false, 14 15 "maxBiomeCount": 6, 15 16 "maxDimensionScale": 0, 16 17 "avgDimensionHeight": 256, 17 18 "iridescenceContactLevel": 0, 18 19 "iridescencePotionLevel": 4, 19 - "iridescenceCooldownDuration": 168, 20 - "afterglowDuration": 24, 21 20 "resetChargeCooldown": 6000 22 21 }, 23 22 "disabledDimensions": ["ant", "bash", "checkerboard",
+1 -1
gradle.properties
··· 7 7 maven_group = net.lerariemann 8 8 archives_name = infinity 9 9 enabled_platforms = fabric,neoforge 10 - tbversion = 8 10 + tbversion = 0 11 11 12 12 # Minecraft properties 13 13 minecraft_version = 1.21.1