-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
69 additions
and
6 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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<Block, BlockState> 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type: alias | ||
target: faq/llm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type: alias | ||
target: faq/llm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type: alias | ||
target: faq/llm |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
type: text | ||
|
||
--- | ||
|
||
Whilst LLMs (Large Language Models) like [ChatGPT](<https://chat.openai.com/>) and [Gemini](<https://gemini.google.com/>) 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. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters