⁠
joe: Include much more detail in inspection descriptions
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- 当传递给实体数据参数定义的类与包含的实体类不一致时,会发出报告。
- </body>
- </html>
- <!--
- Minecraft Development for IntelliJ
-
- https://mcdev.io/
-
- Copyright (C) 2026 minecraft-dev
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License as published
- by the Free Software Foundation, version 3.0 only.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public License
- along with this program. If not, see <https://www.gnu.org/licenses/>.
- -->
-
- <html>
- <body>
- <p>
- 当传递给 synched entity data 定义的类与包含的实体类不一致时,会发出报告。
- </p>
- <!-- tooltip end -->
- <p>
- Synched entity data 按实体类编号,编号取决于该类及其父类定义了多少个参数。使用其他类定义 data accessor 可能会使其 ID 与另一个
- data accessor 冲突,从而破坏 entity data 的同步。
- </p>
- <pre><code>
- public class MyEntity extends Entity {
- // 错误
- private static final EntityDataAccessor<Integer> DATA = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.INT);
-
- // 正确
- private static final EntityDataAccessor<Integer> DATA = SynchedEntityData.defineId(MyEntity.class, EntityDataSerializers.INT);
- }
- </code></pre>
- </body>
- </html>