Quark Stonelings in EnderIO Powered Spawner Crash
NielsPilgaard opened this issue ยท 5 comments
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:
- Make a Powered Stoneling Spawner
- Place and power it
- 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
(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().
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.
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.