Ender IO Forestry

Ender IO Forestry

954k Downloads

Quark Stonelings in EnderIO Powered Spawner Crash

NielsPilgaard opened this issue ยท 5 comments

commented

Issue Description:

Game crashes when using EnderIO Powered Spawner set to the Stoneling mob from Quark.
I have also reported the issue to Quark, here: VazkiiMods/Quark#1270

What happens:

The game crashes.

What you expected to happen:

The Powered Spawner to spawn Stonelings without crashing.

Steps to reproduce:

  1. Make a Powered Stoneling Spawner
  2. Place and power it
  3. Crash

Affected Versions (Do not use "latest"):

  • EnderIO-1.12.2-5.0.44
  • EnderCore-1.12.2-0.5.57
  • Quark-r1.5-152
  • Forge-1.12.2-14.23.5.2836
  • Minecraft-1.12.2
  • SpongeForge? no
  • Optifine? no
  • Single Player and/or Server? SP

Your most recent log file where the issue was present:

Crash Report
I've requested the latest.log from the original reporter

commented

Another mod that needs a exact copy spawn it seems..

commented

(EntityStoneling.java:136) List<ItemStack> items = world.getLootTableManager().getLootTableFromLocation(CARRY_LOOT_TABLE).generateLootForPools(rand, new LootContext.Builder((WorldServer) world).build());

This code only works server-side and must crash on the client. However, onInitialSpawn() is not a server-only method, as can be seen in net.minecraft.tileentity.MobSpawnerBaseLogic.getCachedEntity(), which itself is client-only and calls onInitialSpawn().

commented

Thank you, I will re-post that in the Quark issue.

commented

Actually, it is meant to be used server side only, and its use in MobSpawnerBaseLogic is already on the vanilla bug tracker. MC-114019. Also I only know this because of Jredfox which makes him not all bad.

commented

I actually don't concur with the analysis in that ticket. onInitialSpawn() is also necessary for entities that are noicht backed server-side because it sets parameters that are needed for rendering, e.g. weapons, the child flag, head gear etc. The bug in MC-114019 is that the zombie jockey code runs before the entity is added to the world (and without checking world.isRemote). Minecraft needs to shift that code into a new callback from world.onEntityAdded() instead.