From d5eeff512cc9f4bedfb1e5ce6c8ae8ce7dd16862 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Sun, 7 Apr 2024 16:01:57 +0200 Subject: [PATCH 1/3] Fix Dank Storage item removal when placing cables, Closes #1332 --- .../org/cyclops/integrateddynamics/item/ItemBlockCable.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cyclops/integrateddynamics/item/ItemBlockCable.java b/src/main/java/org/cyclops/integrateddynamics/item/ItemBlockCable.java index 88f3a4c2988..3b93898d356 100644 --- a/src/main/java/org/cyclops/integrateddynamics/item/ItemBlockCable.java +++ b/src/main/java/org/cyclops/integrateddynamics/item/ItemBlockCable.java @@ -95,7 +95,9 @@ protected boolean attempItemUseTarget(UseOnContext context, BlockPos pos, Direct protected void afterItemUse(UseOnContext context, BlockPos pos, BlockCable blockCable, boolean calledSuper) { if(!calledSuper) { playPlaceSound(context.getLevel(), pos); - context.getItemInHand().shrink(1); + if (context.getItemInHand().getItem() == RegistryEntries.ITEM_CABLE) { + context.getItemInHand().shrink(1); + } } blockCable.setDisableCollisionBox(false); } From c9ec5d085193eea4efd7b7e05f9009873e439194 Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Mon, 8 Apr 2024 14:28:19 +0200 Subject: [PATCH 2/3] Fix crash for illegal item tag chars in recipe in LP Closes CyclopsMC/IntegratedCrafting#103 --- .../core/logicprogrammer/ValueTypeRecipeLPElement.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/main/java/org/cyclops/integrateddynamics/core/logicprogrammer/ValueTypeRecipeLPElement.java b/src/main/java/org/cyclops/integrateddynamics/core/logicprogrammer/ValueTypeRecipeLPElement.java index 7c1e88ad39b..233694c0506 100644 --- a/src/main/java/org/cyclops/integrateddynamics/core/logicprogrammer/ValueTypeRecipeLPElement.java +++ b/src/main/java/org/cyclops/integrateddynamics/core/logicprogrammer/ValueTypeRecipeLPElement.java @@ -309,6 +309,16 @@ public Component validate() { } catch (NumberFormatException e) { return new TranslatableComponent(L10NValues.VALUETYPE_ERROR_INVALIDINPUT, outputEnergy); } + // Validate input item tag strings if they are defined + for (ItemMatchProperties inputStack : inputStacks) { + if (inputStack.getItemTag() != null) { + try { + new ResourceLocation(inputStack.getItemTag()); + } catch (ResourceLocationException e) { + return new TranslatableComponent(L10NValues.VALUETYPE_ERROR_INVALIDINPUT, inputStack.getItemTag()); + } + } + } return null; } From fb18633836e2f5dcf2ce164297835c6099fe8c1e Mon Sep 17 00:00:00 2001 From: Ruben Taelman Date: Sun, 14 Apr 2024 13:56:47 +0200 Subject: [PATCH 3/3] Bump mod version --- gradle.properties | 2 +- resources/changelog/1.18.2-1.17.5.txt | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 resources/changelog/1.18.2-1.17.5.txt diff --git a/gradle.properties b/gradle.properties index c7d8a94d2a0..0d24d769ba5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -mod_version=1.17.4 +mod_version=1.17.5 api_version=0.2.0 minecraft_version=1.18.2 forge_version=40.1.16 diff --git a/resources/changelog/1.18.2-1.17.5.txt b/resources/changelog/1.18.2-1.17.5.txt new file mode 100644 index 00000000000..949b7729620 --- /dev/null +++ b/resources/changelog/1.18.2-1.17.5.txt @@ -0,0 +1,6 @@ +As always, don't forget to backup your world before updating! +Requires CyclopsCore version 1.17.0 or higher. + +Fixes: +* Fix crash for illegal item tag chars in recipe in LP, Closes CyclopsMC/IntegratedCrafting#103 +* Fix Dank Storage item removal when placing cables, Closes #1332