From 3d0e98f723f715369b1638314233167437499c63 Mon Sep 17 00:00:00 2001 From: Waiting Idly <25394029+WaitingIdly@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:18:40 -0700 Subject: [PATCH 1/3] add warning about registry replacement --- .../cleanroommc/groovyscript/compat/mods/chisel/Carving.java | 5 ++++- src/main/resources/assets/groovyscript/lang/en_us.lang | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java index 15c7a2659..7b6cffc26 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java @@ -21,7 +21,10 @@ @RegistryDescription( category = RegistryDescription.Category.ENTRIES, - admonition = @Admonition(value = "groovyscript.wiki.chisel.carving.note", type = Admonition.Type.DANGER, format = Admonition.Format.STANDARD), + admonition = { + @Admonition(value = "groovyscript.wiki.chisel.carving.note0", type = Admonition.Type.DANGER, format = Admonition.Format.STANDARD), + @Admonition(value = "groovyscript.wiki.chisel.carving.note1", type = Admonition.Type.BUG, format = Admonition.Format.STANDARD) + }, isFullyDocumented = false // TODO fully document Chisel Carving ) public class Carving extends VirtualizedRegistry> { diff --git a/src/main/resources/assets/groovyscript/lang/en_us.lang b/src/main/resources/assets/groovyscript/lang/en_us.lang index 2e361f80e..a572b2023 100644 --- a/src/main/resources/assets/groovyscript/lang/en_us.lang +++ b/src/main/resources/assets/groovyscript/lang/en_us.lang @@ -1080,7 +1080,8 @@ groovyscript.wiki.calculator.stone_separator.description=Converts an input items # Chisel groovyscript.wiki.chisel.carving.title=Carving groovyscript.wiki.chisel.carving.description=Sets a group of items any item can be converted between freely, in world and in a GUI -groovyscript.wiki.chisel.carving.note=You cannot addVariation/removeVariation to chisel groups based on the oredict, you have to modify the oredict directly. +groovyscript.wiki.chisel.carving.note0=You cannot addVariation/removeVariation to chisel groups based on the oredict, you have to modify the oredict directly. +groovyscript.wiki.chisel.carving.note1=Some mods use "registry replacement" to change a preexisting entry in a registry. If this has been done to a block used by chisel, this will result in errors when manipulating *any* carving group and prevent the chiseling of that block. Of particular note is Inspirations, which can replace carpets and causes [this issue](https://github.com/Chisel-Team/Chisel/issues/828). groovyscript.wiki.chisel.carving.setSound=Sets the sound of the Chisel Group groovyscript.wiki.chisel.carving.addGroup=Adds a new Chisel Group with the given name groovyscript.wiki.chisel.carving.addVariation=Adds a new Item Variation to the Chisel Group From 845267226b798b8b7f22cdc07da3da5203105185 Mon Sep 17 00:00:00 2001 From: Waiting Idly <25394029+WaitingIdly@users.noreply.github.com> Date: Thu, 28 Aug 2025 11:41:21 -0700 Subject: [PATCH 2/3] catch warning and note possible cause --- .../cleanroommc/groovyscript/compat/mods/chisel/Carving.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java index 7b6cffc26..afa171925 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java @@ -98,6 +98,8 @@ public void removeVariation(String groupName, ItemStack item) { .add("instead, edit the oredict via `oredict.remove('{}', {})`", groupName, GroovyScriptCodeConverter.asGroovyCode(item, false, false)) .error() .post(); + } catch (NullPointerException e) { + GroovyLog.get().exception("An exception occurred with chisel carving - possibly due to some other mod doing registry replacement.", e); } } From 3428872de92848c296dbf8e5adf69513897cdaf1 Mon Sep 17 00:00:00 2001 From: Waiting Idly <25394029+WaitingIdly@users.noreply.github.com> Date: Sat, 4 Oct 2025 13:39:48 -0700 Subject: [PATCH 3/3] expand carving warning, add inspirations note --- .../groovyscript/compat/mods/chisel/Carving.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java index afa171925..514d76b24 100644 --- a/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java +++ b/src/main/java/com/cleanroommc/groovyscript/compat/mods/chisel/Carving.java @@ -99,7 +99,12 @@ public void removeVariation(String groupName, ItemStack item) { .error() .post(); } catch (NullPointerException e) { - GroovyLog.get().exception("An exception occurred with chisel carving - possibly due to some other mod doing registry replacement.", e); + var log = GroovyLog.msg("An exception occurred with Chisel Carving - likely due to some other mod doing registry replacement") + .add("This is not a bug with GroovyScript! It is a bug between Chisel and whatever mod is doing registry replacement.") + .exception(e) + .error(); + if (ModSupport.INSPIRATIONS.isLoaded()) log.add("The Inspirations Fitted Carpets feature will cause this if enabled - you will need to disable it in 'config/inspirations.cfg'"); + log.post(); } }