diff --git a/README-fml.txt b/README-fml.txt index 344bca7..867e97e 100644 --- a/README-fml.txt +++ b/README-fml.txt @@ -40,7 +40,7 @@ https://github.com/MinecraftForge/MCPConfig/blob/master/Mojang.md Additional Resources: ========================= -Community Documentation: http://mcforge.readthedocs.io/en/latest/gettingstarted/ +Community Documentation: https://mcforge.readthedocs.io/en/latest/gettingstarted/ LexManos' Install Video: https://www.youtube.com/watch?v=8VEdtQLuLO0 Forge Forum: https://forums.minecraftforge.net/ -Forge Discord: https://discord.gg/UvedJ9m \ No newline at end of file +Forge Discord: https://discord.gg/UvedJ9m diff --git a/build.gradle b/build.gradle index 1fa534a..49eeff9 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,7 @@ apply plugin: 'maven-publish' // MixinGradle: apply plugin: 'org.spongepowered.mixin' -version = '1.20.5-mc1.18.1' +version = '1.21.1-mc1.19' group = 'at.ridgo8.moreoverlays' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'moreoverlays' @@ -37,7 +37,7 @@ minecraft { // // Use non-default mappings at your own risk. They may not always work. // Simply re-run your setup task after changing the mappings to update your workspace. - mappings channel: 'official', version: '1.18.1' + mappings channel: 'official', version: '1.19' // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Currently, this location cannot be changed from the default. @@ -132,7 +132,8 @@ repositories { dependencies { minecraft "net.minecraftforge:forge:${forge_version}" - implementation fg.deobf("mezz.jei:jei-${jei_version}") + implementation fg.deobf("mezz.jei:jei-${jei_version_api}") + implementation fg.deobf("mezz.jei:jei-${jei_version_core}") //runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") implementation fg.deobf("slimeknights.mantle:Mantle:${mantle_version}") diff --git a/changelog-fml.txt b/changelog-fml.txt index a80dfd1..0878756 100644 --- a/changelog-fml.txt +++ b/changelog-fml.txt @@ -1,204 +1,103 @@ -Build: 1.18.1-39.0.19 - Wed Jan 12 02:00:21 GMT 2022 - 35673674+alcatrazescapee: - Rework world persistence hooks to fix the double registry injection when loading single player worlds. (#8234) +1.19.x Changelog +41.0 +==== + - 41.0.35 Fix EnumArgument to use enum names for suggestions (#8728) + Previously, the suggestions used the string representation of the enum + through Enum#toString, which can differ from the name of the enum as + required by Enum#valueOf, causing invalid suggestions (both in gui and + through the error message). + - 41.0.34 Jar-In-Jar (#8715) + - 41.0.33 [1.19] Fix data-gen output path of custom data-pack registries (#8724) + - 41.0.32 Fix player dive and surface animations in custom fluids (#8738) + - 41.0.31 [1.19.x] Affect ItemEntity Motion in Custom Fluids (#8737) + - 41.0.30 [1.19] Add support for items to add enchantments without setting them in NBT (#8719) + - 41.0.29 [1.19.x] Add stock biome modifier types for adding features and spawns (#8697) + - 41.0.28 [1.19.x] Fluid API Overhaul (#8695) + - 41.0.27 Replace StructureSpawnListGatherEvent with StructureModifiers (#8717) + - 41.0.26 Use stack sensitive translation key by default for FluidAttributes. (#8707) + - 41.0.25 Delete LootItemRandomChanceCondition which added looting bonus enchantment incorrectly. (#8733) + - 41.0.24 Update EventBus to 6.0, ModLauncher to 10.0.1 and BootstrapLauncher to 1.1 (#8725) + - 41.0.23 Replace support bot with support action (#8700) + - 41.0.22 Fix Reach Distance / Attack Range being clamped at 6.0 (#8699) + - 41.0.21 [1.19.x] Fix mods' worldgen data not being loaded when creating new singleplayer worlds (#8693) + - 41.0.20 [1.19.x] Fix experimental confirmation screen (#8727) + - 41.0.19 Move is_mountain to forge's tag instead of vanilla's (#8726) + - 41.0.18 [1.19.x] Add CommandBuildContext to Register Command Events (#8716) + - 41.0.17 Only rewrite datagen cache when needed (#8709) + - 41.0.16 Implement a simple feature system for Forge (#8670) + * Implement a simple feature system for Forge. Allows mods to demand certain features are available in the loading system. An example for java_version is provided, but not expected to be used widely. This is more targeted to properties of the display, such as GL version and glsl profile. + Requires https://github.com/MinecraftForge/ForgeSPI/pull/13 to be merged first in ForgeSPI, and the SPI to be updated appropriately in build.gradle files. + * rebase onto 1.19 and add in SPI update + - 41.0.15 displayTest option in mods.toml (#8656) + * displayTest option in mods.toml + * "MATCH_VERSION" (or none) is existing match version string behaviour + * "IGNORE_SERVER_VERSION" accepts anything and sends special SERVERONLY string + * "IGNORE_ALL_VERSION" accepts anything and sends an empty string + * "NONE" allows the mod to supply their own displaytest using the IExtensionPoint mechanism. + * Update display test with feedback and added the mods.toml discussion in mdk. + - 41.0.14 Update forgeSPI to v5 (#8696) + - 41.0.13 Make IVertexConsumers such as the lighting pipeline, be aware of which format they are dealing with. (#8692) + Also fix Lighting pipeline ignoring the overlay coords from the block renderer. + - 41.0.12 Fixed misaligned patch to invalidateCaps in Entity (#8705) + - 41.0.11 Fix readAdditionalLevelSaveData (#8704) + - 41.0.10 Fixes setPos to syncPacketPositionCodec (#8702) + - 41.0.9 Fix wrong param passed to PlayLevelSoundEvent.AtEntity (#8688) + - 41.0.8 Override initialize in SlotItemHandler, so it uses the itemhandler instead of container (#8679) + - 41.0.7 Update MDK for 1.19 changes (#8675) + - 41.0.6 Add helper to RecipeType, and fix eclipse compiler error in test class. + - 41.0.5 Update modlauncher to latest (#8691) + - 41.0.4 Fix getting entity data serializer id crashing due to improper port to new registry system (#8678) + - 41.0.3 Fire registry events in the order vanilla registers to registries (#8677) + Custom registries are still fired in alphabetical order, after all vanilla registries. + Move forge's data_serializers registry to forge namespace. + - 41.0.2 Add method with pre/post wrap to allow setting/clearing mod context. (#8682) + Fixes ActiveContainer in ModContext not being present in registry events. Closes #8680 + - 41.0.1 Fix the Curlie oopsie + - 41.0.0 Forge 1.19 + * Bump pack.mcmeta formats + * 1.19 biome modifiers + * Mark ClientPlayerNetworkEvent.LoggedOutEvent's getters as nullable + * Add docs and package-info to client extension interfaces package + * Move RenderBlockOverlayEvent hooks to ForgeHooksClient + * Add package-infos to client events package + * Rename SoundLoadEvent to SoundEngineLoadEvent + This reduces confusion from consumers which may think the + name SoundLoadEvent refers to an individual sound being loaded rather + than the sound engine. + * Document and change SoundLoadEvent to fire on mod bus + Previously, it fired on both the mod bus and the Forge bus, which is + confusing for consumers. + * Delete SoundSetupEvent + Looking at its original implementation shows that there isn't an + appropriate place in the new sound code to reinsert the event, and the + place of 'sound engine/manager initialization event' is taken already by SoundLoadEvent. + * Perform some cleanup on client events + - Removed nullable annotations from ClientPlayerNetworkEvent + - Renamed #getPartialTicks methods to #getPartialTick, to be consistent + with vanilla's naming of the partial tick + - Cleanup documentation to remove line breaks, use the + spelling 'cancelled' over + 'canceled', and improve docs on existing and + new methods. + * Remove EntityEvent.CanUpdate + Closes MinecraftForge/MinecraftForge#6394 + * Switch to Jetbrains nullability annotations + * New PlayLevelSoundEvent; replaces old PlaySoundAtEntityEvent + * Remove ForgeWorldPresetScreens + * Remove IForgeRegistryEntry + * Remove use of List in FML's CompletableFutures + * Add docs to mod loading stages, stages, and phases + * Gradle 7.4.2 + * Use SLF4J in FMLLoader and other subprojects + * Switch dynamic versions in subprojects to pinned ones + * Switch ForgeRoot and MDK to FG plugin markers + * Configure Forge javadoc task + The task now uses a custom stylesheet with MCForge elements, and + configured to combine the generation from the four FML subprojects + (fmlloader, fmlcore, javafmllanguage, mclanguage) and the Forge project + into the javadoc output. + * Update docs/md files, for 1.19 update and the move away from IRC to Discord. + * Make "Potentially dangerous alternative prefix" a debug warning, not info. + Co-authored-by: Curle + Co-authored-by: sciwhiz12 -========= -Build: 1.18.1-39.0.18 - Tue Jan 11 00:16:08 GMT 2022 - supermartijn642: - Update tags for new 1.17 and 1.18 content (#7891) - -========= -Build: 1.18.1-39.0.17 - Mon Jan 10 00:56:15 GMT 2022 - xfacthd: - Fix TerrainParticle rendering black under certain conditions (#8378) - -========= -Build: 1.18.1-39.0.16 - Sun Jan 09 21:36:50 GMT 2022 - cech12: - Allow modded tools to work on glow lichen (#8371) - -========= -Build: 1.18.1-39.0.15 - Sun Jan 09 21:18:44 GMT 2022 - sciwhiz12: - Fix custom climbable blocks not sending a death message (#8372) - - Fixes #8370 - -========= -Build: 1.18.1-39.0.14 - Sat Jan 08 21:20:26 GMT 2022 - pupnewfster: - Provide access to the blockstate in BucketPickup#getPickupSound for multiply-logged blocks (#8357) - -========= -Build: 1.18.1-39.0.13 - Sat Jan 08 20:47:41 GMT 2022 - pupnewfster: - Fix clients being unable to deserialize tags for custom registries (#8352) - -========= -Build: 1.18.1-39.0.12 - Sat Jan 08 20:28:36 GMT 2022 - bageldotjpg: - Fix particles going fullbright for a few frames when first spawning (#8291) - -========= -Build: 1.18.1-39.0.11 - Sat Jan 08 18:44:26 GMT 2022 - diesieben07: - Also create parent directories when creating config files (#8364) - -========= -Build: 1.18.1-39.0.10 - Sun Jan 02 18:43:24 GMT 2022 - JTK222: - Fix crash with PermissionsAPI (#8330) - - Fixes a crash in singleplayer, when the internal server didn't shut down correctly between world loads. - -========= -Build: 1.18.1-39.0.9 - Mon Dec 27 16:24:00 GMT 2021 - sciwhiz12: - Re-add missing default spawn lists in features (#8285) - - Fixes #8265 - Fixes #8301 - -========= -Build: 1.18.1-39.0.8 - Wed Dec 22 13:22:32 GMT 2021 - JTK222: - Fixed incorrect generic in PermissionAPI (#8317) - -========= -Build: 1.18.1-39.0.7 - Mon Dec 20 18:35:11 GMT 2021 - JTK222: - Redo of the whole PermissionAPI (#7780) - - - - Co-authored-by: LexManos - -========= -Build: 1.18.1-39.0.6 - Sun Dec 19 18:28:43 GMT 2021 - JTK222: - Fix misplaced patch in SpreadingSnowyDirtBlock. - - Fixes #8308. - -========= -Build: 1.18.1-39.0.5 - Mon Dec 13 21:58:30 GMT 2021 - pupnewfster: - Add RenderArmEvent to make overriding just the arm rendering not require copying nearly as much vanilla code (#8254) - -========= -Build: 1.18.1-39.0.4 - Mon Dec 13 21:32:20 GMT 2021 - bageldotjpg: - Add MobEffect tags (#8231) - -========= -Build: 1.18.1-39.0.3 - Mon Dec 13 19:49:00 GMT 2021 - xfacthd: - Log missing or unsupported dependencies (#8218) - -========= -Build: 1.18.1-39.0.2 - Mon Dec 13 19:33:05 GMT 2021 - sciwhiz12: - Fix datagen test for sounds definitions provider (#8249) - -========= -Build: 1.18.1-39.0.1 - Mon Dec 13 19:14:15 GMT 2021 - williewillus: - Fix wrong stage being declared in transition to common (#8267) - -========= -Build: 1.18.1-39.0.0 - Fri Dec 10 19:32:24 GMT 2021 - curle: - Update to 1.18.1 - - Co-Authored by: - - Curle - _ Orion - -========= -Build: 1.18-38.0.17 - Fri Dec 10 09:23:45 GMT 2021 - oriondevelopment: - [CVE-2021-44228]: Update Log4J to fix the security issue inside it. (#8268) - -========= -Build: 1.18-38.0.16 - Wed Dec 08 00:09:40 GMT 2021 - jaredlll08: - Fix KeyMappings only checking if they conflict with themselves. (#8256) - -========= -Build: 1.18-38.0.15 - Sun Dec 05 19:40:15 GMT 2021 - xfacthd: - Fix ChunkWatchEvent not being fired (#8253) - -========= -Build: 1.18-38.0.14 - Sat Dec 04 01:30:30 GMT 2021 - git: - Call handleUpdateTag for BlockEntities again (#8237) - -========= -Build: 1.18-38.0.13 - Fri Dec 03 22:10:25 GMT 2021 - commoble: - Fix test worldgen data (#8248) - -========= -Build: 1.18-38.0.12 - Thu Dec 02 20:16:47 GMT 2021 - lexmanos: - Allow Forge Registries to return key information for overridden objects. Fixes #8230 - -========= -Build: 1.18-38.0.11 - Thu Dec 02 19:17:12 GMT 2021 - curle: - Save Chunk capabilities to the chunk, rather than recursively to the capabilities. - -========= -Build: 1.18-38.0.10 - Thu Dec 02 15:24:47 GMT 2021 - gigaherz: - Make HandshakeConsumer public again. - Fixes #8241 - - gigaherz: - Fix LevelChunk capability attach crash. - Fix client chunks not having capability providers attached. - Add capability attach tests. - -========= -Build: 1.18-38.0.8 - Thu Dec 02 00:44:15 GMT 2021 - curle: - Add missing biomes back to the BiomeDictionary - - curle: - Complete TODO in ShapedRecipe patch causing logspam related to minecraft:air - -========= -Build: 1.18-38.0.6 - Wed Dec 01 22:12:05 GMT 2021 - curle: - Readd Mixin 0.8.5 to fix modules issues. - -========= -Build: 1.18-38.0.5 - Wed Dec 01 16:56:24 GMT 2021 - curle: - Readd PoseStack field to RenderTooltipEvent. - -========= -Build: 1.18-38.0.4 - Wed Dec 01 01:29:57 GMT 2021 - curle: - Fix custom loot serializers using wrong registry names - -========= -Build: 1.18-38.0.3 - Wed Dec 01 01:15:13 GMT 2021 - lexmanos: - Fix DungeonHooks not returning correct values. Fixes dungeons in world spawning pigs. - -========= -Build: 1.18-38.0.2 - Wed Dec 01 00:23:23 GMT 2021 - lexmanos: - Fix dedicated server install. Closes #8226 - Fix example mod - Fix obf issue with records. Closes #8228 - Fix dependencies beingg out of sync from vanilla. Closes #8227 - Disable mixin due to module incompatibility. - -========= -Build: 1.18-38.0.1 - Tue Nov 30 20:56:52 GMT 2021 - gigaherz: - Fix mod resources not loading. - Add BreakingItemParticle.java.patch which I forgot to commit during the porting. diff --git a/gradle.properties b/gradle.properties index ea0d711..f20c258 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,6 +3,7 @@ org.gradle.jvmargs=-Xmx3G org.gradle.daemon=false -forge_version=1.18.1-39.0.66 -jei_version=1.18.1:9.2.3.84 +forge_version=1.19-41.0.35 +jei_version_api=1.19-common-api:11.0.0.203 +jei_version_core=1.19-common:11.0.0.203 mantle_version=1.18.1-1.8.35 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 7454180..41d9927 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index e750102..aa991fc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index c53aefa..1b6c787 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # diff --git a/src/main/java/at/ridgo8/moreoverlays/api/lightoverlay/LightScannerBase.java b/src/main/java/at/ridgo8/moreoverlays/api/lightoverlay/LightScannerBase.java index 749b9d1..ff72e9e 100644 --- a/src/main/java/at/ridgo8/moreoverlays/api/lightoverlay/LightScannerBase.java +++ b/src/main/java/at/ridgo8/moreoverlays/api/lightoverlay/LightScannerBase.java @@ -1,6 +1,7 @@ package at.ridgo8.moreoverlays.api.lightoverlay; import at.ridgo8.moreoverlays.config.Config; +import net.minecraft.core.Holder; import net.minecraft.world.entity.MobCategory; import net.minecraft.world.entity.player.Player; import net.minecraft.core.BlockPos; @@ -84,8 +85,8 @@ public boolean shouldCheck(BlockPos pos, Level world) { if (Config.light_IgnoreSpawnList.get()) { return true; } - Biome biome = world.getBiome(pos); - return biome.getMobSettings().getCreatureProbability() > 0 && !biome.getMobSettings().getMobs(MobCategory.MONSTER).isEmpty(); + Holder biome = world.getBiome(pos); + return biome.get().getMobSettings().getCreatureProbability() > 0 && !biome.get().getMobSettings().getMobs(MobCategory.MONSTER).isEmpty(); } public abstract byte getSpawnModeAt(BlockPos pos, Level world); diff --git a/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsHandler.java b/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsHandler.java index 17bf650..6c50e3a 100644 --- a/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsHandler.java +++ b/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsHandler.java @@ -48,7 +48,7 @@ public static void toggleMode() { @SubscribeEvent public void renderWorldLastEvent(RenderLevelLastEvent event) { - if (mode != RenderMode.NONE && Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (mode != RenderMode.NONE && Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { ChunkBoundsRenderer.renderOverlays(event.getPoseStack()); } } @@ -64,7 +64,7 @@ public void onOverlayRender(RenderGameOverlayEvent.Text event) { } int y = 0; for (String text : regionInfo) { - mc.font.draw(event.getMatrixStack(), text, 10, y += 10, 0xFFFFFF); + mc.font.draw(event.getPoseStack(), text, 10, y += 10, 0xFFFFFF); } } diff --git a/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsRenderer.java b/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsRenderer.java index a24772f..f8b83a7 100644 --- a/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsRenderer.java +++ b/src/main/java/at/ridgo8/moreoverlays/chunkbounds/ChunkBoundsRenderer.java @@ -38,7 +38,7 @@ public static void renderOverlays(PoseStack matrixstack) { Quaternion cameraRotation = Minecraft.getInstance().gameRenderer.getMainCamera().rotation(); - if (Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { // Use old renderer RenderSystem.depthMask(false); RenderSystem.enableCull(); @@ -121,7 +121,7 @@ public static void renderOverlays(PoseStack matrixstack) { // restore render settings RenderSystem.enableTexture(); - if (Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { RenderSystem.disableCull(); RenderSystem.depthMask(true); } else { diff --git a/src/main/java/at/ridgo8/moreoverlays/gui/ConfigScreen.java b/src/main/java/at/ridgo8/moreoverlays/gui/ConfigScreen.java index d527bb6..5a3d1d7 100644 --- a/src/main/java/at/ridgo8/moreoverlays/gui/ConfigScreen.java +++ b/src/main/java/at/ridgo8/moreoverlays/gui/ConfigScreen.java @@ -10,7 +10,6 @@ import net.minecraft.client.gui.components.Button; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraftforge.common.ForgeConfigSpec; import java.util.ArrayList; @@ -34,7 +33,7 @@ public class ConfigScreen extends Screen { public ConfigScreen(Screen modListScreen, ForgeConfigSpec spec, String modId) { //super(new TranslatableComponent("gui.config." + modId + ".tile")); - super(new TranslatableComponent("Config screen is broken - To edit input fields please edit config/moreoverlays.toml Manually!").withStyle(ChatFormatting.DARK_RED)); + super(Component.translatable("Config screen is broken - To edit input fields please edit config/moreoverlays.toml Manually!").withStyle(ChatFormatting.DARK_RED)); this.modListScreen = modListScreen; this.configSpec = spec; this.modId = modId; diff --git a/src/main/java/at/ridgo8/moreoverlays/itemsearch/GuiRenderer.java b/src/main/java/at/ridgo8/moreoverlays/itemsearch/GuiRenderer.java index 65010e0..68d61ef 100644 --- a/src/main/java/at/ridgo8/moreoverlays/itemsearch/GuiRenderer.java +++ b/src/main/java/at/ridgo8/moreoverlays/itemsearch/GuiRenderer.java @@ -198,7 +198,7 @@ private void checkSlots(AbstractContainerScreen container) { private boolean isSearchedItem(ItemStack stack) { if (emptyFilter) return true; else if (stack.isEmpty()) return false; - for (Object ingredient : JeiModule.filter.getFilteredIngredients(VanillaTypes.ITEM)) { + for (Object ingredient : JeiModule.filter.getFilteredIngredients(VanillaTypes.ITEM_STACK)) { if (ItemUtils.ingredientMatches(ingredient, stack)) { return true; } diff --git a/src/main/java/at/ridgo8/moreoverlays/itemsearch/JeiModule.java b/src/main/java/at/ridgo8/moreoverlays/itemsearch/JeiModule.java index dcd2719..05ac69c 100644 --- a/src/main/java/at/ridgo8/moreoverlays/itemsearch/JeiModule.java +++ b/src/main/java/at/ridgo8/moreoverlays/itemsearch/JeiModule.java @@ -8,7 +8,7 @@ import mezz.jei.api.runtime.IIngredientFilter; import mezz.jei.api.runtime.IIngredientListOverlay; import mezz.jei.api.runtime.IJeiRuntime; -import mezz.jei.gui.overlay.IngredientListOverlay; +import mezz.jei.common.gui.overlay.IngredientListOverlay; import net.minecraft.client.gui.components.EditBox; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.ItemStack; diff --git a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java index 8774508..2973b8e 100644 --- a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java +++ b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayHandler.java @@ -7,6 +7,7 @@ import at.ridgo8.moreoverlays.config.Config; import net.minecraft.client.GraphicsStatus; import net.minecraft.client.Minecraft; +import net.minecraft.client.OptionInstance; import net.minecraftforge.client.event.RenderLevelLastEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.TickEvent; @@ -81,7 +82,7 @@ public void onWorldUnload(final WorldEvent.Unload event) { @SubscribeEvent public void renderWorldLastEvent(RenderLevelLastEvent event) { - if (enabled && Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (enabled && Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { renderer.renderOverlays(scanner, event.getPoseStack()); } } diff --git a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayRenderer.java b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayRenderer.java index 46d0900..9e37466 100644 --- a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayRenderer.java +++ b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/LightOverlayRenderer.java @@ -99,7 +99,7 @@ public void renderOverlays(ILightScanner scanner, PoseStack matrixstack) { Quaternion cameraRotation = Minecraft.getInstance().gameRenderer.getMainCamera().rotation(); - if (Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { // Use old renderer RenderSystem.depthMask(false); RenderSystem.enableCull(); @@ -137,7 +137,7 @@ else if (mode == 2) tess.end(); // restore render settings RenderSystem.enableTexture(); - if (Minecraft.getInstance().options.graphicsMode != GraphicsStatus.FABULOUS) { + if (Minecraft.getInstance().options.graphicsMode().get() != GraphicsStatus.FABULOUS) { RenderSystem.disableCull(); RenderSystem.depthMask(true); } else { diff --git a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/integration/CustomSpawnerLightScanner.java b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/integration/CustomSpawnerLightScanner.java index 3fc39c8..63fa524 100644 --- a/src/main/java/at/ridgo8/moreoverlays/lightoverlay/integration/CustomSpawnerLightScanner.java +++ b/src/main/java/at/ridgo8/moreoverlays/lightoverlay/integration/CustomSpawnerLightScanner.java @@ -2,6 +2,7 @@ import at.ridgo8.moreoverlays.lightoverlay.LightScannerVanilla; import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; import net.minecraft.world.level.Level; import net.minecraft.world.level.biome.Biome; @@ -13,8 +14,8 @@ public class CustomSpawnerLightScanner extends LightScannerVanilla { @Override public boolean shouldCheck(BlockPos pos, Level world) { - Biome biome = world.getBiome(pos); - return biome.getMobSettings().getCreatureProbability() <= 0; + Holder biome = world.getBiome(pos); + return biome.get().getMobSettings().getCreatureProbability() <= 0; /* EnvironmentSettings environment = CMSUtils.getEnvironment(world); diff --git a/src/main/java/at/ridgo8/moreoverlays/mixin/MixinDebugRenderer.java b/src/main/java/at/ridgo8/moreoverlays/mixin/MixinDebugRenderer.java index ebca35e..b62ec1b 100644 --- a/src/main/java/at/ridgo8/moreoverlays/mixin/MixinDebugRenderer.java +++ b/src/main/java/at/ridgo8/moreoverlays/mixin/MixinDebugRenderer.java @@ -19,10 +19,10 @@ public class MixinDebugRenderer { @Inject(method = "render", at = @At("HEAD")) private void render(PoseStack p_113458_, MultiBufferSource.BufferSource p_113459_, double p_113460_, double p_113461_, double p_113462_, CallbackInfo ci) { - if (ChunkBoundsHandler.getMode() != ChunkBoundsHandler.RenderMode.NONE && Minecraft.getInstance().options.graphicsMode == GraphicsStatus.FABULOUS) { + if (ChunkBoundsHandler.getMode() != ChunkBoundsHandler.RenderMode.NONE && Minecraft.getInstance().options.graphicsMode().get() == GraphicsStatus.FABULOUS) { ChunkBoundsRenderer.renderOverlays(p_113458_); } - if(LightOverlayHandler.isEnabled() && Minecraft.getInstance().options.graphicsMode == GraphicsStatus.FABULOUS){ + if(LightOverlayHandler.isEnabled() && Minecraft.getInstance().options.graphicsMode().get() == GraphicsStatus.FABULOUS){ LightOverlayHandler.renderer.renderOverlays(LightOverlayHandler.scanner, p_113458_); } } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 760cfc1..db74c58 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader="javafml" -loaderVersion="[39,)" +loaderVersion="[41,)" issueTrackerURL="https://github.com/r8420/MoreOverlays-1.15/issues" license="The MIT License (MIT)" [[mods]] @@ -21,7 +21,7 @@ license="The MIT License (MIT)" [[dependencies.moreoverlays]] modId="forge" mandatory=true - versionRange="[39,)" + versionRange="[41,)" ordering="NONE" side="CLIENT" [[dependencies.moreoverlays]]