Skip to content

Commit 869a2fa

Browse files
committed
Add back curious support
1 parent fc1a079 commit 869a2fa

File tree

4 files changed

+15
-9
lines changed

4 files changed

+15
-9
lines changed

build.gradle

+5
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ repositories {
9494
includeGroup "curse.maven"
9595
}
9696
}
97+
maven {
98+
name = 'Curios'
99+
url = "https://maven.theillusivec4.top/"
100+
}
97101
}
98102

99103
dependencies {
@@ -108,6 +112,7 @@ dependencies {
108112
implementation ("com.refinedmods:refinedstorage:${project.rs_version}") {
109113
transitive false
110114
}
115+
implementation "top.theillusivec4.curios:curios-neoforge:7.2.0+1.20.4"
111116
}
112117

113118
// This block of code expands all declared replace properties in the specified resource targets.

gradle.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod_name=Reborn Storage
2929
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
3030
mod_license=MIT
3131
# The mod version. See https://semver.org/
32-
mod_version=5.1.2
32+
mod_version=5.1.3
3333
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
3434
# This should match the base package used for the mod sources.
3535
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html

src/main/java/net/gigabit101/rebornstorage/grid/crafting/WirelessCraftingGrid.java

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import com.refinedmods.refinedstorage.inventory.player.PlayerSlot;
1111
import com.refinedmods.refinedstorage.util.StackUtils;
1212
import net.gigabit101.rebornstorage.RebornStorage;
13+
import net.gigabit101.rebornstorage.items.ItemWirelessGrid;
1314
import net.minecraft.core.RegistryAccess;
1415
import net.minecraft.nbt.CompoundTag;
1516
import net.minecraft.network.chat.Component;

src/main/java/net/gigabit101/rebornstorage/packet/PacketChangeMode.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import net.neoforged.neoforge.network.handling.PlayPayloadContext;
1818
import org.apache.commons.lang3.tuple.ImmutableTriple;
1919
import org.jetbrains.annotations.NotNull;
20+
import top.theillusivec4.curios.api.CuriosApi;
2021

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

0 commit comments

Comments
 (0)