Immersive Industry (1.16/1.20)

Immersive Industry (1.16/1.20)

719k Downloads

Crash on start

zEpiixz opened this issue ยท 9 comments

commented

Some here

commented

Yey! I got the same crash! https://pastebin.com/E5V9Fr1v

Edit: yes, crashes during loading. Loading failed error.

commented

Me too :(

commented
commented

I'm Sorry, this mod is not compatible with Immersive Engineering 5.0.4 or later version. Since IE changed a lot in api, and causing damage to existing saves.

commented

As an IE dev: We did not break any API in 5.0.4, we changed internal code that is not supposed to be used by addons. The only code that is considered API is in blusunrize.immersiveengineering.api and blusunrize.lib.manual, while the crash is due to a change in blusunrize.immersiveengineering.common. And "causing damage to existing saves" is news to me, if it's true no one has reported it yet.

Sorry for my inaccurate expression, but updating to new IE version breaks multiblock BlockEntity data, and I got the exception:

Failed to load data for block entity frostedheart:heat_radiator
java.lang.NullPointerException: null
	at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?]
	at blusunrize.immersiveengineering.common.blocks.IEBaseTileEntity.getWorldNonnull(IEBaseTileEntity.java:228) ~[immersiveengineering:?]
	at blusunrize.immersiveengineering.common.blocks.generic.MultiblockPartTileEntity.getTileForPos(MultiblockPartTileEntity.java:433) ~[immersiveengineering:?]
	at blusunrize.immersiveengineering.common.blocks.generic.MultiblockPartTileEntity.master(MultiblockPartTileEntity.java:304) ~[immersiveengineering:?]

As This method is provided by IE, I refer to IE api.
This exception breaks any existing IE multiblock structure.

commented

As an IE dev: We did not break any API in 5.0.4, we changed internal code that is not supposed to be used by addons. The only code that is considered API is in blusunrize.immersiveengineering.api and blusunrize.lib.manual, while the crash is due to a change in blusunrize.immersiveengineering.common.
And "causing damage to existing saves" is news to me, if it's true no one has reported it yet.

commented
  1. No one has reported this yet, so I'm pretty sure it's something on your end (frostedheart:heat_radiator). And a bunch of people have updated existing worlds to 5.0.4, so "breaks any existing IE multiblock structure" is simply wrong.
  2. That is anything but a full stacktrace, the part you're showing only tells me that something is trying to get the master BE from a BE before it is properly added to the world.
  3. IE API should only refer to the actual API, not to any IE code. And those methods are most certainly not part of the API.
  4. While I'm at it, how about you don't blindly copy code from IE:
    @Override
    public void onResourceManagerReload(@Nonnull IResourceManager resourceManager) {
    if (dataPackRegistries != null) {
    MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
    if (server != null) {
    Iterator<ServerWorld> it = server.getWorlds().iterator();
    // Should only be false when no players are loaded, so the data will be synced on login
    if (it.hasNext())
    ApiUtils.addFutureServerTask(it.next(),
    () -> StaticTemplateManager.syncMultiblockTemplates(PacketDistributor.ALL.noArg(), true)
    );
    }
    }
    }
    RecipeManager clientRecipeManager;
    @SubscribeEvent
    public void onTagsUpdated(TagsUpdatedEvent event) {
    if (clientRecipeManager != null)
    TagUtils.setTagCollectionGetters(ItemTags::getCollection, BlockTags::getCollection);
    }
    Neither of these methods should be called from addons.
commented
  1. No one has reported this yet, so I'm pretty sure it's something on your end (frostedheart:heat_radiator). And a bunch of people have updated existing worlds to 5.0.4, so "breaks any existing IE multiblock structure" is simply wrong.
  2. That is anything but a full stacktrace, the part you're showing only tells me that something is trying to get the master BE from a BE before it is properly added to the world.
  3. IE API should only refer to the actual API, not to any IE code. And those methods are most certainly not part of the API.
  4. While I'm at it, how about you don't blindly copy code from IE:
    @Override
    public void onResourceManagerReload(@Nonnull IResourceManager resourceManager) {
    if (dataPackRegistries != null) {
    MinecraftServer server = ServerLifecycleHooks.getCurrentServer();
    if (server != null) {
    Iterator<ServerWorld> it = server.getWorlds().iterator();
    // Should only be false when no players are loaded, so the data will be synced on login
    if (it.hasNext())
    ApiUtils.addFutureServerTask(it.next(),
    () -> StaticTemplateManager.syncMultiblockTemplates(PacketDistributor.ALL.noArg(), true)
    );
    }
    }
    }
    RecipeManager clientRecipeManager;
    @SubscribeEvent
    public void onTagsUpdated(TagsUpdatedEvent event) {
    if (clientRecipeManager != null)
    TagUtils.setTagCollectionGetters(ItemTags::getCollection, BlockTags::getCollection);
    }

    Neither of these methods should be called from addons.

Great Thanks for your help. We would fix these problems later.