diff --git a/CHANGELOG.md b/CHANGELOG.md index 665047eb0..20c591ee3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Removed + +- The Curios integration has been removed and will be moved to an addon mod. + ## [2.0.0-milestone.3.10] - 2024-06-16 ## [2.0.0-milestone.3.9] - 2024-06-09 diff --git a/gradle.properties b/gradle.properties index 8d638ebd3..a130241d3 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,6 +1,5 @@ noIndiumVersion=1.1.0+1.20.4 trinketsVersion=3.8.0 cardinalComponentsVersion=5.4.0 -curiosVersion=7.1.0+1.20.4 # Gradle org.gradle.jvmargs=-Xmx1G diff --git a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json index 4da3bef51..bd0a02ec4 100644 --- a/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json +++ b/refinedstorage2-platform-common/src/main/resources/assets/refinedstorage2/lang/en_us.json @@ -270,7 +270,6 @@ "key.refinedstorage2.clear_crafting_grid_matrix_to_inventory": "Clear Crafting Grid matrix to inventory", "key.refinedstorage2.open_wireless_grid": "Open Wireless Grid", "refinedstorage2.subtitle.wrench": "Wrench used", - "curios.identifier.refinedstorage2": "Refined Storage 2", "trinkets.slot.refinedstorage2.wireless": "Refined Storage 2", "permission.refinedstorage2.insert": "Insert", "permission.refinedstorage2.insert.description": "Whether the player can insert resources in a network.", diff --git a/refinedstorage2-platform-forge/build.gradle b/refinedstorage2-platform-forge/build.gradle index 35d7fa24a..02fc5d3fe 100644 --- a/refinedstorage2-platform-forge/build.gradle +++ b/refinedstorage2-platform-forge/build.gradle @@ -1,21 +1,5 @@ -plugins { - id 'java-library' -} - -repositories { - maven { - name = 'Curios' - url = "https://maven.theillusivec4.top/" - } -} - forgeProject("refinedstorage2", project(":refinedstorage2-platform-common"), apis, compileApis) archivesBaseName = 'refinedstorage2-platform-forge' -dependencies { - runtimeOnly "top.theillusivec4.curios:curios-neoforge:${curiosVersion}" - compileOnlyApi "top.theillusivec4.curios:curios-neoforge:${curiosVersion}:api" -} - enablePublishing() diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java index b5cb440f7..9025bb209 100644 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java +++ b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/ModInitializer.java @@ -37,8 +37,6 @@ import com.refinedmods.refinedstorage2.platform.forge.storage.externalstorage.ItemHandlerPlatformExternalStorageProviderFactory; import com.refinedmods.refinedstorage2.platform.forge.storage.portablegrid.ForgePortableGridBlockEntity; import com.refinedmods.refinedstorage2.platform.forge.support.energy.EnergyStorageAdapter; -import com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem.CuriosSlotReferenceFactory; -import com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem.CuriosSlotReferenceProvider; import com.refinedmods.refinedstorage2.platform.forge.support.packet.c2s.CraftingGridClearPacket; import com.refinedmods.refinedstorage2.platform.forge.support.packet.c2s.CraftingGridRecipeTransferPacket; import com.refinedmods.refinedstorage2.platform.forge.support.packet.c2s.GridExtractPacket; @@ -383,18 +381,6 @@ private void registerTickHandler() { NeoForge.EVENT_BUS.addListener(this::onServerTick); } - @Override - protected void registerSlotReferenceProviders() { - super.registerSlotReferenceProviders(); - CuriosSlotReferenceProvider.create().ifPresent(slotReferenceProvider -> { - PlatformApi.INSTANCE.getSlotReferenceFactoryRegistry().register( - createIdentifier("curios"), - CuriosSlotReferenceFactory.INSTANCE - ); - PlatformApi.INSTANCE.addSlotReferenceProvider(slotReferenceProvider); - }); - } - @SubscribeEvent public void onCommonSetup(final FMLCommonSetupEvent e) { registerUpgradeMappings(); diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java deleted file mode 100644 index 505f32dac..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReference.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; - -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; - -import java.util.Optional; - -import net.minecraft.network.FriendlyByteBuf; -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.ItemStack; -import top.theillusivec4.curios.api.CuriosApi; -import top.theillusivec4.curios.api.SlotResult; - -class CuriosSlotReference implements SlotReference { - private final String identifier; - private final int index; - - CuriosSlotReference(final String identifier, final int index) { - this.identifier = identifier; - this.index = index; - } - - @Override - public boolean isDisabledSlot(final int playerSlotIndex) { - return false; - } - - @Override - public void writeToBuffer(final FriendlyByteBuf buf) { - buf.writeUtf(identifier); - buf.writeInt(index); - } - - @Override - public Optional resolve(final Player player) { - return CuriosApi.getCuriosInventory(player) - .flatMap(curiosInventory -> curiosInventory.findCurio(identifier, index)) - .map(SlotResult::stack); - } - - @Override - public SlotReferenceFactory getFactory() { - return CuriosSlotReferenceFactory.INSTANCE; - } -} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java deleted file mode 100644 index be9e2362b..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceFactory.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; - -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceFactory; - -import net.minecraft.network.FriendlyByteBuf; - -public class CuriosSlotReferenceFactory implements SlotReferenceFactory { - public static final SlotReferenceFactory INSTANCE = new CuriosSlotReferenceFactory(); - - private CuriosSlotReferenceFactory() { - } - - @Override - public SlotReference create(final FriendlyByteBuf buf) { - return new CuriosSlotReference(buf.readUtf(), buf.readInt()); - } -} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java deleted file mode 100644 index ff3970877..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/CuriosSlotReferenceProvider.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; - -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReference; -import com.refinedmods.refinedstorage2.platform.api.support.network.bounditem.SlotReferenceProvider; - -import java.util.Collections; -import java.util.List; -import java.util.Optional; -import java.util.Set; - -import net.minecraft.world.entity.player.Player; -import net.minecraft.world.item.Item; -import net.neoforged.fml.ModList; -import top.theillusivec4.curios.api.CuriosApi; - -public class CuriosSlotReferenceProvider implements SlotReferenceProvider { - private CuriosSlotReferenceProvider() { - } - - @Override - public List find(final Player player, final Set validItems) { - return CuriosApi.getCuriosInventory(player) - .map(curiosInventory -> curiosInventory.findCurios("refinedstorage2")) - .orElse(Collections.emptyList()) - .stream() - .filter(slotResult -> validItems.contains(slotResult.stack().getItem())) - .map(slotResult -> (SlotReference) new CuriosSlotReference( - slotResult.slotContext().identifier(), - slotResult.slotContext().index() - )) - .toList(); - } - - public static Optional create() { - if (!ModList.get().isLoaded("curios")) { - return Optional.empty(); - } - return Optional.of(new CuriosSlotReferenceProvider()); - } -} diff --git a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java b/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java deleted file mode 100644 index 0f09ee47e..000000000 --- a/refinedstorage2-platform-forge/src/main/java/com/refinedmods/refinedstorage2/platform/forge/support/network/bounditem/package-info.java +++ /dev/null @@ -1,7 +0,0 @@ -@ParametersAreNonnullByDefault -@FieldsAndMethodsAreNonnullByDefault -package com.refinedmods.refinedstorage2.platform.forge.support.network.bounditem; - -import com.refinedmods.refinedstorage2.api.core.FieldsAndMethodsAreNonnullByDefault; - -import javax.annotation.ParametersAreNonnullByDefault; diff --git a/refinedstorage2-platform-forge/src/main/resources/assets/refinedstorage2/textures/slot/curios.png b/refinedstorage2-platform-forge/src/main/resources/assets/refinedstorage2/textures/slot/curios.png deleted file mode 100644 index e48e77d76..000000000 Binary files a/refinedstorage2-platform-forge/src/main/resources/assets/refinedstorage2/textures/slot/curios.png and /dev/null differ diff --git a/refinedstorage2-platform-forge/src/main/resources/data/curios/tags/items/refinedstorage2.json b/refinedstorage2-platform-forge/src/main/resources/data/curios/tags/items/refinedstorage2.json deleted file mode 100644 index 778353b57..000000000 --- a/refinedstorage2-platform-forge/src/main/resources/data/curios/tags/items/refinedstorage2.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "replace": false, - "values": [ - "refinedstorage2:wireless_grid", - "refinedstorage2:creative_wireless_grid" - ] -} \ No newline at end of file diff --git a/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/entities/refinedstorage2.json b/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/entities/refinedstorage2.json deleted file mode 100644 index 6cc2d352f..000000000 --- a/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/entities/refinedstorage2.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "entities": [ - "player" - ], - "slots": [ - "refinedstorage2" - ] -} \ No newline at end of file diff --git a/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/slots/refinedstorage2.json b/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/slots/refinedstorage2.json deleted file mode 100644 index 1d751f8d6..000000000 --- a/refinedstorage2-platform-forge/src/main/resources/data/refinedstorage2/curios/slots/refinedstorage2.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "order": 5, - "size": 2, - "icon": "refinedstorage2:slot/curios" -} \ No newline at end of file