MinecraftModDevelopmentMods / AdditionalLootTables

MIT License
2 stars 2 forks source link

Possibility of server-side only option? #20

Open nazzyz opened 3 years ago

nazzyz commented 3 years ago

Minecraft Forge v14.23.5.2854 I'm not sure how or if the client really interacts with the loot tables, I'd like to think that it doesn't? Is there a possible way to have this mod load as a server-only option? Thank you for your willingness to look into this.

dshadowwolf commented 3 years ago

I don't know, myself - the available docs when I did the rewrite didn't note a difference and the existing code from before the rewrite also ran on both sides.

nazzyz commented 3 years ago

Man thanks for looking into this. I came across this mod because I was looking for an easy way to modify loot tables for a custom server I am building. This is really a great way to incorporate added mob drops without messing with the original loot tables. I especially liked the way it could incorporate fishing which I haven't found in very many mods. I tried this out on my server but required the client to I have it installed. My goal for this server is to be able to connect to it without using any mods. I would love to use this mod if I could but I need it to be able to let clients connect without having to install it if possible. Thanks for your help looking into this and hopefully able to edit it to make it work.

On Sun, Sep 13, 2020, 12:00 AM dshadowwolf notifications@github.com wrote:

I don't know, myself - the available docs when I did the rewrite didn't note a difference and the existing code from before the rewrite also ran on both sides.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/MinecraftModDevelopmentMods/AdditionalLootTables/issues/20#issuecomment-691606485, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOHUGNJH7QHWG2CQ3ED7HKDSFQ7XJANCNFSM4RKGOY3Q .

dshadowwolf commented 3 years ago

Not a problem. I cannot find information in any of the available documentation as to whether this needs to be on both sides or not, so when writing it, as I said, I defaulted to just having it required on both sides.

The-Fireplace commented 3 years ago

I took a quick glance through the code, I don't see anything that looks like it should be required on the client if the server has it loaded. Honestly, you could probably just stick acceptableRemoteVersions="*" in the @Mod and I think that'll do it. On a related note, going through that proxy to get the world is also unnecessary, the only time it's used is from the dump command, and that function already has access to the MinecraftServer instance, which has a getter for the world on it.

dshadowwolf commented 3 years ago

With the code being set for both client and server it is needed. At that it is needed for single-player runs. I'll do some testing in a bit, as I have some extensions to the setup that should allow for both non-vanilla loot tables being modified and adding the ability to flatly override any table.

The-Fireplace commented 3 years ago

The singleplayer aspect of it is why I suggested acceptableRemoteVersions="*", which doesn't prevent loading in Singleplayer like serverSideOnly=true does.