From 8a82143fbc28d5c9f1ab310044ec6161f0112a3c Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Wed, 6 Sep 2023 14:42:52 +0200 Subject: [PATCH 1/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20at=20what=20lev?= =?UTF-8?q?el=20restock=20slot=20acronyms=20render=20now=20that=20the=20wh?= =?UTF-8?q?ole=20sophisticated=20inventory=20renders=20on=20standard=20van?= =?UTF-8?q?illa=20level=20and=20it=20started=20rendering=20filter=20stacks?= =?UTF-8?q?=20above=20the=20acronyms?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../upgrades/refill/RefillUpgradeTab.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index 8c8499be..9a27278b 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.18.58 +mod_version=3.18.59 jei_mc_version=1.19.2-forge jei_version=11.6.0.+ curios_version=1.19.2-5.1.1.+ diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/refill/RefillUpgradeTab.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/refill/RefillUpgradeTab.java index 7983bd91..42be27db 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/refill/RefillUpgradeTab.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/upgrades/refill/RefillUpgradeTab.java @@ -130,7 +130,7 @@ private void updateTargetSlotTooltip(int mouseX, int mouseY) { private void renderTargetSlotAcronyms(PoseStack poseStack) { poseStack.pushPose(); - poseStack.translate(0, 0, 100); + poseStack.translate(0, 0, 300); getContainer().getSlots().forEach(slot -> { if (!slot.getItem().isEmpty()) { int slotIndex = slot.getSlotIndex(); From ff979ef3e50f32363d369017be83a11de29d9b79 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 7 Sep 2023 09:10:14 +0200 Subject: [PATCH 2/7] =?UTF-8?q?feat:=20=E2=9C=A8=20Stash=20symbols=20now?= =?UTF-8?q?=20show=20green=20color=20if=20the=20item=20is=20present=20in?= =?UTF-8?q?=20the=20storage=20that=20it=20can=20be=20stashed=20into.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../backpack/BackpackItem.java | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/gradle.properties b/gradle.properties index 9a27278b..d8e1afa6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.18.59 +mod_version=3.18.60 jei_mc_version=1.19.2-forge jei_version=11.6.0.+ curios_version=1.19.2-5.1.1.+ diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java index 0b16cbed..fd4609ed 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java @@ -64,6 +64,7 @@ import net.p3pp3rf1y.sophisticatedcore.api.IStashStorageItem; import net.p3pp3rf1y.sophisticatedcore.api.IStorageWrapper; import net.p3pp3rf1y.sophisticatedcore.client.gui.utils.TranslationHelper; +import net.p3pp3rf1y.sophisticatedcore.inventory.ItemStackKey; import net.p3pp3rf1y.sophisticatedcore.upgrades.ITickableUpgrade; import net.p3pp3rf1y.sophisticatedcore.upgrades.jukebox.ServerStorageSoundHandler; import net.p3pp3rf1y.sophisticatedcore.util.ColorHelper; @@ -393,8 +394,17 @@ public ItemStack stash(ItemStack storageStack, ItemStack stack) { } @Override - public boolean isItemStashable(ItemStack storageStack, ItemStack stack) { - return storageStack.getCapability(CapabilityBackpackWrapper.getCapabilityInstance()).map(wrapper -> wrapper.getInventoryForUpgradeProcessing().insertItem(stack, true).getCount() != stack.getCount()).orElse(false); + public StashResult getItemStashable(ItemStack storageStack, ItemStack stack) { + return storageStack.getCapability(CapabilityBackpackWrapper.getCapabilityInstance()).map(wrapper -> { + if (wrapper.getInventoryForUpgradeProcessing().insertItem(stack, true).getCount() == stack.getCount()) { + return StashResult.NO_SPACE; + } + if (wrapper.getInventoryForUpgradeProcessing().getTrackedStacks().contains(ItemStackKey.of(stack))) { + return StashResult.MATCH_AND_SPACE; + } + + return StashResult.SPACE; + }).orElse(StashResult.NO_SPACE); } public record BackpackContentsTooltip(ItemStack backpack) implements TooltipComponent { From 54ee281f2d530f92772e7eecfdd9b49569d6d471 Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 7 Sep 2023 15:14:16 +0200 Subject: [PATCH 3/7] =?UTF-8?q?feat:=20=E2=9C=A8=20Stash=20symbols=20now?= =?UTF-8?q?=20show=20green=20color=20if=20the=20item=20is=20present=20in?= =?UTF-8?q?=20the=20storage=20that=20it=20can=20be=20stashed=20into=20or?= =?UTF-8?q?=20there's=20a=20memorized=20slot=20that=20matches=20the=20item?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 2 +- .../sophisticatedbackpacks/backpack/BackpackItem.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle.properties b/gradle.properties index d8e1afa6..d2ac7750 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.18.60 +mod_version=3.18.61 jei_mc_version=1.19.2-forge jei_version=11.6.0.+ curios_version=1.19.2-5.1.1.+ diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java index fd4609ed..59bcb83b 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java @@ -65,6 +65,7 @@ import net.p3pp3rf1y.sophisticatedcore.api.IStorageWrapper; import net.p3pp3rf1y.sophisticatedcore.client.gui.utils.TranslationHelper; import net.p3pp3rf1y.sophisticatedcore.inventory.ItemStackKey; +import net.p3pp3rf1y.sophisticatedcore.settings.memory.MemorySettingsCategory; import net.p3pp3rf1y.sophisticatedcore.upgrades.ITickableUpgrade; import net.p3pp3rf1y.sophisticatedcore.upgrades.jukebox.ServerStorageSoundHandler; import net.p3pp3rf1y.sophisticatedcore.util.ColorHelper; @@ -399,7 +400,7 @@ public StashResult getItemStashable(ItemStack storageStack, ItemStack stack) { if (wrapper.getInventoryForUpgradeProcessing().insertItem(stack, true).getCount() == stack.getCount()) { return StashResult.NO_SPACE; } - if (wrapper.getInventoryForUpgradeProcessing().getTrackedStacks().contains(ItemStackKey.of(stack))) { + if (wrapper.getInventoryHandler().getSlotTracker().getItems().contains(stack.getItem()) || wrapper.getSettingsHandler().getTypeCategory(MemorySettingsCategory.class).matchesFilter(stack)) { return StashResult.MATCH_AND_SPACE; } From 0ba7e36930cef37f10004230088e36411f62c61c Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 7 Sep 2023 09:39:35 +0200 Subject: [PATCH 4/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20core=20dep=20ve?= =?UTF-8?q?rsion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/gradle.yml | 3 +++ build.gradle | 20 +++++++++++++++++--- gradle.properties | 2 +- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 0db20485..695e0024 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -16,6 +16,9 @@ jobs: distribution: zulu cache: gradle - name: Build with Gradle + env: + USERNAME: ${{ secrets.USERNAME }} + READ_PACKAGES_TOKEN: ${{ secrets.READ_PACKAGES_TOKEN }} uses: nick-invision/retry@v2 with: timeout_minutes: 10 diff --git a/build.gradle b/build.gradle index e73fb843..73ee2db2 100644 --- a/build.gradle +++ b/build.gradle @@ -40,6 +40,14 @@ repositories { } } maven { url "https://maven.blamejared.com/" } + maven { + name = "GitHubPackages" + url = uri("https://maven.pkg.github.com/p3pp3rf1y/sophisticatedcore") + credentials { + username = System.getenv("USERNAME") + password = System.getenv("READ_PACKAGES_TOKEN") + } + } } group = 'sophisticatedbackpacks' @@ -109,9 +117,15 @@ dependencies { if (findProject(':SophisticatedCore') != null) { implementation project(':SophisticatedCore') } else { - compileOnly fg.deobf("curse.maven:sophisticatedcore-618298:${sc_cf_file_id}") - runtimeOnly fg.deobf("curse.maven:sophisticatedcore-618298:${sc_cf_file_id}") - testImplementation fg.deobf("curse.maven:sophisticatedcore-618298:${sc_cf_file_id}") + compileOnly fg.deobf("sophisticatedcore:sophisticatedcore:${sc_version}") { + transitive = false + } + runtimeOnly fg.deobf("sophisticatedcore:sophisticatedcore:${sc_version}") { + transitive = false + } + testImplementation fg.deobf("sophisticatedcore:sophisticatedcore:${sc_version}") { + transitive = false + } } compileOnly fg.deobf("mezz.jei:jei-${jei_mc_version}:${jei_version}") diff --git a/gradle.properties b/gradle.properties index d2ac7750..f7fc5a32 100644 --- a/gradle.properties +++ b/gradle.properties @@ -9,5 +9,5 @@ botania_version=1.19.2-439-FORGE-SNAPSHOT patchouli_version=1.19.2-78-SNAPSHOT balm_cf_file_id=3914527 crafting_tweaks_cf_file_id=3914007 -sc_cf_file_id=4566112 +sc_version=1.19.2-0.5.91.+ parchment_version=1.18.2-2022.06.05-1.19 \ No newline at end of file From 3a2d074775b48e888dfb95c232bcea55169c90fd Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Thu, 19 Oct 2023 00:10:10 +0200 Subject: [PATCH 5/7] =?UTF-8?q?feat:=20=E2=9C=A8=20Add=20caching=20to=20im?= =?UTF-8?q?prove=20performance=20of=20inserts=20of=20items=20that=20can't?= =?UTF-8?q?=20fit=20in=20backpack=20/=20storage=20/=20controlled=20storage?= =?UTF-8?q?=20multiblock?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 4 ++-- .../sophisticatedbackpacks/backpack/BackpackBlockEntity.java | 3 ++- src/main/resources/META-INF/mods.toml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/gradle.properties b/gradle.properties index f7fc5a32..ca83670a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.18.61 +mod_version=3.18.62 jei_mc_version=1.19.2-forge jei_version=11.6.0.+ curios_version=1.19.2-5.1.1.+ @@ -9,5 +9,5 @@ botania_version=1.19.2-439-FORGE-SNAPSHOT patchouli_version=1.19.2-78-SNAPSHOT balm_cf_file_id=3914527 crafting_tweaks_cf_file_id=3914007 -sc_version=1.19.2-0.5.91.+ +sc_version=1.19.2-0.5.94.+ parchment_version=1.18.2-2022.06.05-1.19 \ No newline at end of file diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackBlockEntity.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackBlockEntity.java index 2b3f332a..2b2891b7 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackBlockEntity.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackBlockEntity.java @@ -23,6 +23,7 @@ import net.p3pp3rf1y.sophisticatedcore.api.IStorageWrapper; import net.p3pp3rf1y.sophisticatedcore.controller.ControllerBlockEntityBase; import net.p3pp3rf1y.sophisticatedcore.controller.IControllableStorage; +import net.p3pp3rf1y.sophisticatedcore.inventory.CachedFailedInsertInventoryHandler; import net.p3pp3rf1y.sophisticatedcore.renderdata.RenderInfo; import net.p3pp3rf1y.sophisticatedcore.renderdata.TankPosition; import net.p3pp3rf1y.sophisticatedcore.upgrades.ITickableUpgrade; @@ -144,7 +145,7 @@ public LazyOptional getCapability(Capability cap, @Nullable Direction if (cap == ForgeCapabilities.ITEM_HANDLER) { if (itemHandlerCap == null) { - itemHandlerCap = LazyOptional.of(() -> getBackpackWrapper().getInventoryForInputOutput()); + itemHandlerCap = LazyOptional.of(() -> new CachedFailedInsertInventoryHandler(getBackpackWrapper().getInventoryForInputOutput(), () -> level != null ? level.getGameTime() : 0)); } return itemHandlerCap.cast(); } else if (cap == ForgeCapabilities.FLUID_HANDLER) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 8d4028b7..d0a105e3 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -60,7 +60,7 @@ side="BOTH" [[dependencies.sophisticatedbackpacks]] modId="sophisticatedcore" #mandatory mandatory=true #mandatory -versionRange="[1.19.2-0.5.62,)" #mandatory +versionRange="[1.19.2-0.5.94,)" #mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory ordering="NONE" # Side this dependency is applied on - BOTH, CLIENT or SERVER From 6f063ea938a394dcf7d1386563c61b061be91f6b Mon Sep 17 00:00:00 2001 From: P3pp3rF1y Date: Fri, 20 Oct 2023 20:44:18 +0200 Subject: [PATCH 6/7] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Fix=20the=20enabledIt?= =?UTF-8?q?ems=20config=20that=20allows=20disabling=20sophisticated=20item?= =?UTF-8?q?s=20and=20their=20recipes=20by=20moving=20the=20config=20back?= =?UTF-8?q?=20to=20COMMON?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle.properties | 4 ++-- .../sophisticatedbackpacks/backpack/BackpackItem.java | 3 +-- src/main/resources/META-INF/mods.toml | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/gradle.properties b/gradle.properties index ca83670a..2a514d29 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,7 +1,7 @@ org.gradle.daemon=false minecraft_version=1.19.2 forge_version=43.2.13 -mod_version=3.18.62 +mod_version=3.18.63 jei_mc_version=1.19.2-forge jei_version=11.6.0.+ curios_version=1.19.2-5.1.1.+ @@ -9,5 +9,5 @@ botania_version=1.19.2-439-FORGE-SNAPSHOT patchouli_version=1.19.2-78-SNAPSHOT balm_cf_file_id=3914527 crafting_tweaks_cf_file_id=3914007 -sc_version=1.19.2-0.5.94.+ +sc_version=1.19.2-0.5.97.+ parchment_version=1.18.2-2022.06.05-1.19 \ No newline at end of file diff --git a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java index 59bcb83b..d3568bf0 100644 --- a/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java +++ b/src/main/java/net/p3pp3rf1y/sophisticatedbackpacks/backpack/BackpackItem.java @@ -64,7 +64,6 @@ import net.p3pp3rf1y.sophisticatedcore.api.IStashStorageItem; import net.p3pp3rf1y.sophisticatedcore.api.IStorageWrapper; import net.p3pp3rf1y.sophisticatedcore.client.gui.utils.TranslationHelper; -import net.p3pp3rf1y.sophisticatedcore.inventory.ItemStackKey; import net.p3pp3rf1y.sophisticatedcore.settings.memory.MemorySettingsCategory; import net.p3pp3rf1y.sophisticatedcore.upgrades.ITickableUpgrade; import net.p3pp3rf1y.sophisticatedcore.upgrades.jukebox.ServerStorageSoundHandler; @@ -116,7 +115,7 @@ public BlockEntityWithoutLevelRenderer getCustomRenderer() { public void fillItemCategory(CreativeModeTab group, NonNullList items) { super.fillItemCategory(group, items); - if (!allowedIn(group) || this != ModItems.BACKPACK.get() || !net.p3pp3rf1y.sophisticatedcore.Config.SERVER.enabledItems.isItemEnabled(this)) { + if (!allowedIn(group) || this != ModItems.BACKPACK.get() || !net.p3pp3rf1y.sophisticatedcore.Config.COMMON.enabledItems.isItemEnabled(this)) { return; } diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index d0a105e3..3d6b5bd7 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -60,7 +60,7 @@ side="BOTH" [[dependencies.sophisticatedbackpacks]] modId="sophisticatedcore" #mandatory mandatory=true #mandatory -versionRange="[1.19.2-0.5.94,)" #mandatory +versionRange="[1.19.2-0.5.97,)" #mandatory # An ordering relationship for the dependency - BEFORE or AFTER required if the relationship is not mandatory ordering="NONE" # Side this dependency is applied on - BOTH, CLIENT or SERVER From 2fec7457029c140ea39751de584619d304e12960 Mon Sep 17 00:00:00 2001 From: WeiAL <47446553+Dr-WeiAL@users.noreply.github.com> Date: Tue, 11 Jul 2023 00:34:37 +0800 Subject: [PATCH 7/7] Update zh_cn.json --- .../assets/sophisticatedbackpacks/lang/zh_cn.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/assets/sophisticatedbackpacks/lang/zh_cn.json b/src/main/resources/assets/sophisticatedbackpacks/lang/zh_cn.json index a2b3bd4b..ffd587be 100644 --- a/src/main/resources/assets/sophisticatedbackpacks/lang/zh_cn.json +++ b/src/main/resources/assets/sophisticatedbackpacks/lang/zh_cn.json @@ -27,10 +27,10 @@ "item.sophisticatedbackpacks.feeding_upgrade.tooltip": "将背包内的食物喂给玩家", "item.sophisticatedbackpacks.advanced_feeding_upgrade": "高级喂食升级", "item.sophisticatedbackpacks.advanced_feeding_upgrade.tooltip": "将背包内的食物喂给玩家\n更多喂食条件选项", - "item.sophisticatedbackpacks.compacting_upgrade": "压缩升级", - "item.sophisticatedbackpacks.compacting_upgrade.tooltip": "将物品压缩为对应的压缩变体\n仅2x2配方", - "item.sophisticatedbackpacks.advanced_compacting_upgrade": "高级压缩升级", - "item.sophisticatedbackpacks.advanced_compacting_upgrade.tooltip": "将物品压缩为对应的压缩变体\n包括2x2,3x3配方以及更多的过滤选项", + "item.sophisticatedbackpacks.compacting_upgrade": "压制升级", + "item.sophisticatedbackpacks.compacting_upgrade.tooltip": "将物品压制为对应的压缩变体\n仅2x2配方", + "item.sophisticatedbackpacks.advanced_compacting_upgrade": "高级压制升级", + "item.sophisticatedbackpacks.advanced_compacting_upgrade.tooltip": "将物品压制为对应的压缩变体\n包括2x2,3x3配方以及更多的过滤选项", "item.sophisticatedbackpacks.void_upgrade": "虚空升级", "item.sophisticatedbackpacks.void_upgrade.tooltip": "销毁过滤器中选定的物品", "item.sophisticatedbackpacks.advanced_void_upgrade": "高级虚空升级",