ForestryMC / Binnie

Minecraft addons for the Forestry mod. Extra Bees, Extra Trees, Genetics, and more.
https://minecraft.curseforge.com/projects/binnies-mods
Other
69 stars 59 forks source link

[1.7.10] Crash server on startup #50

Closed KorDum closed 7 years ago

KorDum commented 7 years ago

At the minimum server assembly: Foresty + Binnie https://pastebin.com/raw/dyd420vq

KorDum commented 7 years ago

binnie.extratrees.FakeWorld constructor use client side superconstructor

@SideOnly(Side.CLIENT)
public World(ISaveHandler p_i45368_1_, String p_i45368_2_, WorldProvider p_i45368_3_, WorldSettings p_i45368_4_, Profiler p_i45368_5_)

but we need to use

public World(@NotNull ISaveHandler p_i45369_1_, String p_i45369_2_, WorldSettings p_i45369_3_, WorldProvider p_i45369_4_, Profiler p_i45369_5_)

But I don't know what to pass the first parameter to constructor. Can someone help me figure this out?

KorDum commented 7 years ago

Can I'll be get help and I'll fix it? This is blockstone for beta version and #26

marcin212 commented 7 years ago

@KorDum You need to use the serverside constructor. FakeWorld is used only to get the wood texture to TreeDatabase. I think that this class shouldn't be used serverside. Did you change anything around the uses of this class? All the arguments can be nulls or fake objects.

KorDum commented 7 years ago

Did you change anything around the uses of this class?

Nope. If you checkout to 8f319fa commit (9 feb 2017) then you see server startup with crash in FakeWorld.

KorDum commented 7 years ago

Is uses FakeWorld in Forestry? I think not. Instead genome.getPrimary().getGenerator().setLogBlock() method take real world object.

Non-clientside code uses FakeWorld always. I think it's сonsequences of porting to Forestry 4.2 and not right.

marcin212 commented 7 years ago

Fixed