Skip to content

Commit

Permalink
Add back curious support
Browse files Browse the repository at this point in the history
  • Loading branch information
gigabit101 committed Mar 14, 2024
1 parent fc1a079 commit 869a2fa
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ repositories {
includeGroup "curse.maven"
}
}
maven {
name = 'Curios'
url = "https://maven.theillusivec4.top/"
}
}

dependencies {
Expand All @@ -108,6 +112,7 @@ dependencies {
implementation ("com.refinedmods:refinedstorage:${project.rs_version}") {
transitive false
}
implementation "top.theillusivec4.curios:curios-neoforge:7.2.0+1.20.4"
}

// This block of code expands all declared replace properties in the specified resource targets.
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ mod_name=Reborn Storage
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
mod_license=MIT
# The mod version. See https://semver.org/
mod_version=5.1.2
mod_version=5.1.3
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
# This should match the base package used for the mod sources.
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.refinedmods.refinedstorage.inventory.player.PlayerSlot;
import com.refinedmods.refinedstorage.util.StackUtils;
import net.gigabit101.rebornstorage.RebornStorage;
import net.gigabit101.rebornstorage.items.ItemWirelessGrid;
import net.minecraft.core.RegistryAccess;
import net.minecraft.nbt.CompoundTag;
import net.minecraft.network.chat.Component;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import net.neoforged.neoforge.network.handling.PlayPayloadContext;
import org.apache.commons.lang3.tuple.ImmutableTriple;
import org.jetbrains.annotations.NotNull;
import top.theillusivec4.curios.api.CuriosApi;

import java.util.Arrays;
import java.util.HashSet;
Expand Down Expand Up @@ -75,14 +76,13 @@ public static void handle(final PacketChangeMode message, PlayPayloadContext ctx
//If we don't find our stack and Curio is loaded look in the curio slots
if (CuriosIntegration.isLoaded() && slotFound == -1)
{
//TODO
// Optional<ImmutableTriple<String, Integer, ItemStack>> curio = CuriosApi.getCuriosHelper().findEquippedCurio((stack) -> validItems.contains(stack.getItem()), player);
// if (curio.isPresent())
// {
// //if we find our stack update its nbt/mode
// updateStack(curio.get().getRight(), player);
// return;
// }
Optional<ImmutableTriple<String, Integer, ItemStack>> curio = CuriosApi.getCuriosHelper().findEquippedCurio((stack) -> validItems.contains(stack.getItem()), player);
if (curio.isPresent())
{
//if we find our stack update its nbt/mode
updateStack(curio.get().getRight(), player);
return;
}
}
if (slotFound != -1)
{
Expand Down

0 comments on commit 869a2fa

Please sign in to comment.