Create: Contraption Combat (6.0.8) 图标

Create: Contraption Combat (6.0.8)

作者:rebot | 分类:模组

价格:0 墨喵币 下载量:0 点赞:0 版本 1.0.1
本资源为搬运资源,原资源地址: https://modrinth.com/mod/create-contraption-combat-(6.0.8)
资源信息

Minecraft 版本: 1.21.1

平台: neoforge

标签: utility

资源介绍

Create: Contraption (VirtualWorld) Compat

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

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 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.

And is solved in Create 6.0.9

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.

@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
下载太慢?试试 墨喵加速站,支持 Modrinth 和外网直链高速下载! 用的人越多,下载的越快!
下载与版本
评论(0)
登录 后发表评论。

暂无评论,抢个沙发吧~

举报此资源

请登录后举报

🔥 相关推荐
Long Time No Sword (Longsword)

价格:0 墨喵币
下载量:0

查看详情
Ground Clear

价格:0 墨喵币
下载量:0

查看详情
Paradoc's Caution Pack

价格:0 墨喵币
下载量:0

查看详情
Ben's Oneblocks

价格:0 墨喵币
下载量:0

查看详情