Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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<Pair<String, ItemStack>> {
Expand Down Expand Up @@ -95,6 +98,13 @@ 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) {
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();
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/groovyscript/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down