hilburn / StevesAddons

Additional functionality for SFM
Other
17 stars 10 forks source link

Remove icons field on client #6

Closed shadowfacts closed 9 years ago

shadowfacts commented 9 years ago

To prevent this crash.

shadowfacts commented 9 years ago

Update: Temporary patched version here until the pull request is merged.

hilburn commented 9 years ago

Have you tested this? because I've seen this sort of thing cause far more harm than good

shadowfacts commented 9 years ago

Yep, tried putting StevesAddons on my server which crashed, this fixed it.

hilburn commented 9 years ago

that's... odd - do you run anything like cauldron or non-standard?

shadowfacts commented 9 years ago

Nope, just a normal Forge server

hilburn commented 9 years ago

I will try to hunt it down then, because that definitely shouldn't be happening - if I can't find a solution I will build with this, but I have had issues with doing that kind of thing in other projects so am wry of it causing more problems for other people

shadowfacts commented 9 years ago

@SideOnly is necessary, the issue is caused because all of the methods in IIcon don't exist on a dedicated server. Anything trying to use IIcon will break.

hilburn commented 9 years ago

I am well aware of that, however, as I said, I have run into issues with @SideOnly() on fields before and would prefer not to use it

As it is, you are the only person to have reported an issue with running a server, and it works in my dev environment completely fine - this is because the only methods that access IIcon are client side only, so the server never attempts to call anything.

Regardless - I'm pushing a fix I should have used before which means it doesn't try to generate the IIcon array on the server side - should fix your issues - if it doesn't then I'll accept this PR

Fixed Steve's Addons

shadowfacts commented 9 years ago

Thank you very much :smile:, this fixed it!