Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master-1.18' into master-1.19-lts
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Apr 14, 2024
2 parents 6fef4df + fb18633 commit c3a603a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
6 changes: 6 additions & 0 deletions resources/changelog/1.18.2-1.17.5.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,16 @@ public Component validate() {
} catch (NumberFormatException e) {
return Component.translatable(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 Component.translatable(L10NValues.VALUETYPE_ERROR_INVALIDINPUT, inputStack.getItemTag());
}
}
}
return null;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit c3a603a

Please sign in to comment.