09-anti-patterns Cursor ruleA
09-anti-patterns from guguzea/mc-ai-coding-assistant-tool is a Cursor rule: instructions the Cursor agent follows in that repo.
mdr add guguzea/mc-ai-coding-assistant-tool/fabric/1.14.4/.cursor/rules/09-anti-patterns.mdc@git:20260918.7ca5a1fPins git:20260918.7ca5a1f in mdr.lock. Pin the fingerprint instead.
- Audit grade
- A, 14 of 14 checks passed
- Kind
- Cursor rule
- Repository
- guguzea/mc-ai-coding-assistant-tool
- Path
fabric/1.14.4/.cursor/rules/09-anti-patterns.mdc- Versions recorded
- 6
- Latest version
- git:20260918.7ca5a1f, committed Sep 18, 2026
- First version recorded
- Jul 11, 2026
- Size
- 7,733 bytes
- Repository stars
- 135
- License
- a license file GitHub does not identify
Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.
What the file says
# 09 — 反模式库
> 适用版本:Fabric 1.14.4
---
## 约束
### 核心原则
- 本文件列出 Fabric 开发中最常见的错误模式和正确方案
- 遇到问题时,先查阅本文件
- 错误通常源于 Forge 习惯迁移或对 Fabric 机制不熟悉
---
## 1. 注册系统反模式
### ❌ 在 onInitialize() 外注册
```java
// ❌ 错误
public class ExampleMod implements ModInitializer {
private static final Item MY_ITEM = new Item(new Item.Settings());
// 类加载时注册,但应在 onInitialize() 中
static {
Registry.register(Registry.ITEM, new Identifier(MOD_ID, "my_item"), MY_ITEM);
}
}
// ✅ 正确
public class ExampleMod implements ModInitializer {
private static final Item MY_ITEM =
Registry.register(Registry.ITEM, new Identifier(MOD_ID, "my_item"), new Item(new Item.Settings()));
@Override
public void onInitialize() {
// 静态初始化已在类加载时完成,但最佳实践是在此处初始化
}
}
```
### ❌ BlockItem 与 Block 注册名不一致
```java
// ❌ 错误
Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "my_block"), myBlock);
Registry.register(Registry.ITEM, new Identifier(MOD_ID, "my_block_item"), // 不同名!
new BlockItem(myBlock, new Item.Settings()));
// ✅ 正确:使用完全相同的 Identifier
Registry.register(Registry.BLOCK, new Identifier(MOD_ID, "my_block"), myBlock);
…Read the whole file at its exact version.
How to install
mdr add guguzea/mc-ai-coding-assistant-tool/fabric/1.14.4/.cursor/rules/09-anti-patterns.mdc@sha256:425ebc9fb7698f59The line at the top of this page pins the label git:20260918.7ca5a1f, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.
[](https://markdownregistry.com/a/art_lq4bryxm5jinfbw4)
4 badge image fetches in 30 days. What the badge shows.
Versions
The registry has recorded 6 versions of this file, between Jul 11, 2026 and Sep 18, 2026, about one every 14 days.
| version | committed | commit | size | audit | |
|---|---|---|---|---|---|
| git:20260918.7ca5a1f latest | 2026-09-18 | 7ca5a1f | 7,733 B | A | view · diff |
| git:20260827.527ef8b | 2026-08-27 | 527ef8b | 7,690 B | A | view · diff |
| git:20260819.ca99162 | 2026-08-19 | ca99162 | 7,686 B | A | view · diff |
| git:20260818.b1ccba0 | 2026-08-18 | b1ccba0 | 7,591 B | A | view · diff |
| git:20260817.2126da0 | 2026-08-17 | 2126da0 | 7,575 B | A | view · diff |
| git:20260711.586c86f | 2026-07-11 | 586c86f | 7,579 B | A | view |
Audit of the latest version
- pass: Size between 200 bytes and 200 KB (7733 bytes)
- pass: No zero-width or bidi control characters
- pass: No instruction hidden inside an HTML comment
- pass: No link to an exfiltration or paste host
- pass: No credential-shaped string
- pass: No instruction to send local credentials anywhere
- pass: No text hidden with inline styles
- pass: No prompt-injection phrasing
- pass: No curl or wget piped into a shell
- pass: No recursive delete of root, home or parent
- pass: No instruction to read or print local credentials
- pass: No base64 blob over 200 characters
- pass: No link to a raw IP address
- pass: No script tag
Source
guguzea/mc-ai-coding-assistant-tool · 135 stars · license a license file GitHub does not identify · pushed 2026-11-05 · branch main
API
GET https://markdownregistry.com/api/v1/artifacts/art_lq4bryxm5jinfbw4 GET https://markdownregistry.com/api/v1/resolve?ref=guguzea/mc-ai-coding-assistant-tool/fabric/1.14.4/.cursor/rules/09-anti-patterns.mdc GET https://markdownregistry.com/api/v1/blob/425ebc9fb7698f599dab1360b28a103293a85d36598bc4f5f3bc8804977d5eab
Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.
Guides: Cursor rules vs AGENTS.md · which agent file does what.
More from guguzea/mc-ai-coding-assistant-tool
Every file in guguzea/mc-ai-coding-assistant-tool