Why do spigot and forge not work together

Discussion in 'Spigot Help' started by Fraserofsmeg, Feb 24, 2020.

  1. A few brief clarifications: (a) I'm not asking anyone to fix the issue, I'm trying to understand and (b) I'm talking about the software not the companies behind it.

    I naively wanted to setup a server and use some plugins (spigot) and a mod (forge). I now understand that I might as well have tried to paint the Mona Lisa with my toes. I accept that this isn't doable, but I have some semi-technical questions to make sure I understand what's going on (FYI, I have some programming knowledge, but I know nothing of java):

    Clarifications:
    1. Spigot plugins essentially work with the 'original' Minecraft and as such require this as their baseline to work off. They make no edits to the core code or functionality of Minecraft, but produce 'extra' content by using this core Minecraft code. (Yes or No?)
    2. Mods modify the Minecraft code in some way. They can contain completely original content (such as new items/sprites) that isn't directly drawn from minecraft. (Yes or No?)

    Questions:
    3. If a mod *doesn't* change the way Minecraft works, it just adds more content (eg. here's dirtblock 2.0, twice as dirty) would spigot plugins be able to work with this mod?
    4. Assuming a plugin uses certain Minecraft functionality that a mod doesn't alter, can a mod alter other functionality without it effecting the way the plugin works? [eg. if I have two functions, one that adds two number and one that subtracts two numbers, and the plugin uses the addition function but the mod modifies the subtraction function, would that cause issues? - oversimplification aside].
    5. For each function in Spigot and Forge that can be used by plugins and mods respectively, is there an equivalent function in the other (I'm assuming not for every function, but for some). Would this type of system allow for relatively simple code conversion for mods that use the subset of functions for which there is a translation?

    I've had a look through the forums and I've not got a solid answer to this, I have found some very useful information that has answered a lot of my other questions.
     
  2. electronicboy

    IRC Staff

    bukkits API cannot represent or access data which bukkit doesn't understand, which puts a maaaajor limitation on what bukkit plugins can access and work with, plugins cannot in any capacity work with custom items, etc within the bounds of the API

    Other limitations of bukkit also mean that using NMS is pretty common, forge maps the server internals differently compared to plugins, this is semi workable with remapping, but, is pretty 'eh and creates its own headaches
     
  3. SteelPhoenix

    Moderator

    Forge and Bukkit are two different things, so they don't work together. Sponge tries to combine the two I believe.

    Bukkit wraps the Minecraft server (and modifies some of its code) to provide an easily accessible API for devs to hook into (plugins). Plugins do not change how minecraft works. Forge does allow you to change the game (mods) and clients need to also have these mods if you want to join the server.

    Also, as far as I know Bukkit and Forge use different nms obfuscation mappings.
     
  4. You can use Sponge if you want to use mods and "plugins" together.
    Of course there are a lot of plugins that are not supported by Sponge but it's better than nothing I guess