Skip to content

Commit

Permalink
Ladies and Gentlemen, i present to you: BugFix™ (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Leclowndu93150 committed Aug 31, 2024
1 parent bee6931 commit 84e3f25
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ mod_name=Modular Angel Ring

mod_license=All Rights Reserved

mod_version=1.3.0
mod_version=1.3.1

mod_group_id=com.leclowndu93150.modular_angelring

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.leclowndu93150.modular_angelring.common;

import com.leclowndu93150.modular_angelring.AngelRingMain;
import com.leclowndu93150.modular_angelring.registry.DataComponentRegistry;
import com.leclowndu93150.modular_angelring.registry.ItemRegistry;
import com.leclowndu93150.modular_angelring.utils.FlightSpeedPercentage;
Expand All @@ -17,6 +18,7 @@
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.item.TooltipFlag;
import net.minecraft.world.level.Level;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.neoforge.common.NeoForgeMod;
import org.jetbrains.annotations.NotNull;
import top.theillusivec4.curios.api.CuriosApi;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
import net.minecraft.world.level.Level;
import net.neoforged.api.distmarker.Dist;
import net.neoforged.bus.api.SubscribeEvent;
import net.neoforged.fml.ModList;
import net.neoforged.fml.common.EventBusSubscriber;
import net.neoforged.fml.loading.FMLLoader;
import net.neoforged.neoforge.client.event.ClientTickEvent;
import net.neoforged.neoforge.client.event.InputEvent;
import net.neoforged.neoforge.common.NeoForge;
import net.neoforged.neoforge.network.PacketDistributor;
import top.theillusivec4.curios.api.CuriosApi;
import top.theillusivec4.curios.api.SlotResult;
Expand Down Expand Up @@ -88,7 +91,7 @@ public static void onClientTick(ClientTickEvent.Pre event){
double initialGamma = 1.0;
double maxGamma = 9999.0;
Player player = Minecraft.getInstance().player;
if (player == null) return;
if (player == null || ModList.get().isLoaded("fullbrightnesstoggle")) return;
Optional<SlotResult> slotResult = CuriosApi.getCuriosInventory(player).flatMap(handler -> handler.findFirstCurio(ItemRegistry.ANGEL_RING.get()));
if (slotResult.isPresent()) {
ItemStack angelRingStack = slotResult.get().stack();
Expand Down

0 comments on commit 84e3f25

Please sign in to comment.