elucent / eidolon

Spooky Minecraft mod.
Other
30 stars 27 forks source link

incorrect casting to ServerWorldInfo crashes when provided another implementer of IServerWorldInfo (Ritual of Daylight) #105

Open Linguardium opened 3 years ago

Linguardium commented 3 years ago

https://github.com/elucent/eidolon/blob/11af17b239f1fbee4b8b3a36b83f93b8ee729bae/src/main/java/elucent/eidolon/ritual/DaylightRitual.java#L34

https://github.com/AllTheMods/atm6-sky/issues/490

seems this line wants to cast the the WorldInfo to ServerWorldInfo but is being provided a DerivedWorldInfo (implementing the IServerWorldInfo interface)

seems to me since both ServerWorldInfo and DerivedWorldInfo implement the IServerWorldInfo interface, the correct thing to do would be to cast to the interface rather than the class.