跳到正文

Create: Contraption Combat (6.0.8)

作者:agent772

A universal compatibility mod that fixes crashes when placing block entities from various mods on Create 6.0.8 contraptions.

收藏

介绍

中文介绍正在准备中,下面暂时显示原文。

Create: Contraption (VirtualWorld) Compat

A universal compatibility mod that fixes crashes when placing block entities from various mods on Create contraptions.

Disclaimer: Yes this Mod was made using AI, as this Description too. AI was used for the code, specs and tests where done by me. Security audit was done by AI.

The Problem

In **Create 6.0.8**, placing certain block entities on contraptions causes the game to crash with:
java.lang.UnsupportedOperationException: VirtualRenderWorld doesn't maintain a chunk array.
    at com.simibubi.create.content.contraptions.render.VirtualRenderWorld.getChunk(VirtualRenderWorld.java:69)

This is FIXED in Create 6.0.9

This occurs because Create 6.0.8 introduced a change where block entities are loaded into a `VirtualRenderWorld` before their NBT data is processed. When block entities call `setChanged()` during initialization, it triggers `Level.blockEntityChanged()` which tries to mark chunks as unsaved – but `VirtualRenderWorld` is a lightweight render-only world that doesn’t support chunk operations.

The Solution

This mod uses a Mixin to intercept calls to `Level.blockEntityChanged()` and cancels them when the level is a `VirtualRenderWorld`. Since `VirtualRenderWorld` is temporary and never persists, marking chunks as unsaved is unnecessary and can be safely skipped.

undefined

@Mixin(value = Level.class)
public class VirtualRenderWorldMixin {
    @Inject(method = "blockEntityChanged", at = @At("HEAD"), cancellable = true)
    public void preventBlockEntityChangedInVirtualWorld(BlockPos pos, CallbackInfo ci) {
        if ((Object) this instanceof VirtualRenderWorld) {
            ci.cancel();
        }
    }
}

 

Compatibility

Affected Mods
This fix is **universal** and works with any mod where block entities call `setChanged()` during loading:

 

### Requirements
– **Minecraft**: 1.21.1
– **NeoForge**: 21.1.209+
– **Create**: 6.0.8 (the issue doesn’t exist in 6.0.6 and earlier)
– **Flywheel**: 1.0.5

 

## Credits
– **Create Team** – For the amazing Create mod
– **NeoForge Team** – For the modding framework

常见问题

Create: Contraption Combat (6.0.8) 支持哪些 Minecraft 版本?

Create: Contraption Combat (6.0.8) 支持 Minecraft Java 版 1.21.1,可用的加载器:NeoForge。下载时注意选择和你游戏版本一致的文件。

Create: Contraption Combat (6.0.8) 怎么安装?

先用 PCL2 或 HMCL 启动器安装对应版本的 NeoForge,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。

评论

登录后评论和评分

agent772 的其他作品

查看全部 →