1.8.8 Recreating pre 1.8 anvil on 1.8+

Discussion in 'Spigot Plugin Development' started by AsssassinJianer, Jan 13, 2020.

  1. Hey,

    So I've been working on a project that requires me to create patches to a Spigot JAR that enable, via a boolean in the config, the pre 1.8 anvil and enchanting table features. I had no issues figuring out the enchanting table, the problem lies within bringing back the old anvil level costs.

    I looked up the formula for pre 1.8 anvil but that wasn't useful at all, so my next step was to decompile 1.7.10 bukkit and analyze the ContainerAnvil.java behavior. The method e() is the one that handles all the functions of an anvil, for what I could interpret from the code. I logically proceeded to tried to replicate the method e() on to the ContainerAnvil of my own spigot but the issue is that there were a lot of method name changes and variable changes in 1.8 compared to 1.7. At this point I'm just guessing what everything means since the code is not legible.

    Does anyone have an idea on how to go about doing this?
     
  2. any news ?
     
  3. Yup, it's possible but extremely buggy since anvil level cost is calculated client side
     
  4. Oh ok, anyway I have my own client, and I finally succeeded by modifying the game and server side. And its works great!