diff --git a/images/mixin-export.png b/images/mixin-export.png new file mode 100644 index 00000000..a388df6c Binary files /dev/null and b/images/mixin-export.png differ diff --git a/tags/faq/appendproperties.ytag b/tags/faq/appendproperties.ytag new file mode 100644 index 00000000..53953a23 --- /dev/null +++ b/tags/faq/appendproperties.ytag @@ -0,0 +1,20 @@ +type: text + +--- + +When trying to create a block with block state properties you might come across an error like this: +`java.lang.IllegalArgumentException: Cannot set property ... as it does not exist in Block{minecraft:air}` + +This happens when you don't (correctly) override the `appendProperties` method in your block class. Overriding this method is necessary to tell minecraft which properties your block has. +It should look something like this: +```java +@Override +protected void appendProperties(StateManager.Builder builder) { + builder.add(YOUR, PROPERTIES, HERE); +} +``` + +On older versions (before 1.20.5) the method has to be `public` instead of `protected`. + +The error refers to your block as `minecraft:air` because it usually hasn't been registered by the time the error is thrown. +You can usually find which block is having issues by looking for the constructor of it in the stacktrace. diff --git a/tags/faq/chatgpt.ytag b/tags/faq/chatgpt.ytag new file mode 100644 index 00000000..97c01b21 --- /dev/null +++ b/tags/faq/chatgpt.ytag @@ -0,0 +1,2 @@ +type: alias +target: faq/llm diff --git a/tags/faq/copilot.ytag b/tags/faq/copilot.ytag new file mode 100644 index 00000000..97c01b21 --- /dev/null +++ b/tags/faq/copilot.ytag @@ -0,0 +1,2 @@ +type: alias +target: faq/llm diff --git a/tags/faq/gemini.ytag b/tags/faq/gemini.ytag new file mode 100644 index 00000000..97c01b21 --- /dev/null +++ b/tags/faq/gemini.ytag @@ -0,0 +1,2 @@ +type: alias +target: faq/llm diff --git a/tags/faq/llm.ytag b/tags/faq/llm.ytag new file mode 100644 index 00000000..8771bdf2 --- /dev/null +++ b/tags/faq/llm.ytag @@ -0,0 +1,16 @@ +type: text + +--- + +Whilst LLMs (Large Language Models) like [ChatGPT]() and [Gemini]() are impressive tools, **they are not recommended for first-time Fabric mod developers due to their inconsistency and potential for generating inaccurate code. ** + +LLMs may generate incorrect code that: + +- Targets the wrong Minecraft version, leading to outdated or incompatible features. +- Uses incorrect mappings, causing errors or unexpected behavior. +- Is designed for the wrong loader (NeoForge vs. Fabric), resulting in incompatibility. +- Relies on non-existent Fabric API modules, creating code that references features that don't exist (called LLM hallucinations) + +It's crucial to remember that LLMs should be seen as **problem-solving aids**, not code-generating machines. The output they provide often requires significant modification and understanding of Java before it can be implemented as a functional mod. + +**Therefore, learning Java is an absolute necessity before attempting to use any LLM-generated code in your mod.** Knowing how the generated code works is key to using it effectively and fixing any problems that may arise. diff --git a/tags/guide/mixindebug.ytag b/tags/guide/mixindebug.ytag deleted file mode 100644 index 643580bc..00000000 --- a/tags/guide/mixindebug.ytag +++ /dev/null @@ -1,5 +0,0 @@ -type: text - ---- - -`-Dmixin.debug.export=true` diff --git a/tags/guide/mixinexport.ytag b/tags/guide/mixinexport.ytag new file mode 100644 index 00000000..427027bc --- /dev/null +++ b/tags/guide/mixinexport.ytag @@ -0,0 +1,25 @@ +type: embed + +colour: black +embed: + title: Exporting Mixin Classes + image: + url: "https://raw.githubusercontent.com/FabricMC/community/main/images/mixin-export.png" + +--- + +Annotate your Mixin class with `@Debug(export = true)`, which will export the individual Mixin. + +Example: +```java +@Debug(export = true) +@Mixin(...) +public class MyMixin { + // Mixin code here +} +``` +You can export **all** Mixin classes by adding `-Dmixin.debug.export=true` to your VM options. +> IntelliJ IDEA - [Run/debug configurations - More options](https://www.jetbrains.com/help/idea/run-debug-configuration-java-application.html#more_options) (See "VM options") +> VSCode - [Running and debugging Java - Configuration options](https://code.visualstudio.com/docs/java/java-debugging#_configuration-options) (See "vmArgs") + +Exported finalized classes will appear in `run/.mixin.out`. \ No newline at end of file diff --git a/tags/link/jdk.ytag b/tags/link/jdk.ytag index fe5df176..23ddaabb 100644 --- a/tags/link/jdk.ytag +++ b/tags/link/jdk.ytag @@ -6,5 +6,6 @@ embed: --- -[Java 17](https://adoptium.net/?variant=openjdk17&jvmVariant=hotspot) for Minecraft 1.17 and later +[Java 21](https://adoptium.net/?variant=openjdk21&jvmVariant=hotspot) for Minecraft 1.20.5 and later +[Java 17](https://adoptium.net/?variant=openjdk17&jvmVariant=hotspot) for Minecraft 1.17 to 1.20.4 [Java 8](https://adoptium.net/?variant=openjdk8&jvmVariant=hotspot) for Minecraft 1.16 and earlier