KettleFoundation / Kettle

Minecraft Forge Hybrid server implementing the Spigot/Bukkit API, formerly known as Contigo/Thermos/Cauldron/MCPC+
GNU General Public License v3.0
157 stars 38 forks source link

The server could not be started #15

Closed JackMeds closed 5 years ago

JackMeds commented 5 years ago

The server could not be started log Seems to be an issue with applecore

josephworks commented 5 years ago

Here are the technical issues: java.lang.NoClassDefFoundError: net/minecraft/block/BlockCake java.lang.ClassNotFoundException: net.minecraft.block.BlockCake

The issue is because of the BlockCake class is missing. Does that mean that cake doesn't work in kettle

josephworks commented 5 years ago

I have a fix for @aolko @Hexeption !!! copy or rename https://github.com/KettleFoundation/Kettle/blob/master/patches/net/minecraft/block/BlockCake.java.patch to BlockCake.java Should you do this with all of the files anyways, just a guess.

Timardo commented 5 years ago

BlockCake class is present in Kettle, but the method FoodStats.addStats() is not. If you open that link to the patch, you will see, that it's commented out. I think only the one who commented it knows why.

https://github.com/KettleFoundation/Kettle/blob/d687b738bb2da63303a2d65e721394a3f94ee016/patches/net/minecraft/block/BlockCake.java.patch#L15-L16

GMatrixGames commented 5 years ago

It's probably managed by Bukkit, not sure though.

Timardo commented 5 years ago

So, after a closer look into this problem I found these problems:

AppleCore is replacing the method player.getFoodStats().addStats(2, 0.1F); with it's own hook. There's the problem: even though the method is present in Kettle, it's altered to this:

https://github.com/KettleFoundation/Kettle/blob/d687b738bb2da63303a2d65e721394a3f94ee016/patches/net/minecraft/block/BlockCake.java.patch#L22

Looks alright, doesn't it? Well, not exactly, because AppleCore has this code:

https://github.com/squeek502/AppleCore/blob/2dbabf16b09527faae9107d9e8ab5b8150e03d8f/java/squeek/applecore/asm/module/ModuleBlockFood.java#L55-L56

The first line is the descriptor of the Integer of value 2 passed to the addStats() method and the second the Float one. Since the exact Integer value of 2 isn't present in the Kettle's code, AppleCore cannot find the method and throws a RuntimeException. Here you can implement CraftBukkit event handling directly to the addStats() method, which is ok (at least I think), but another error appears. As I found out, this is caused by another CraftBukkit modification to the EntityPlayer class:

https://github.com/KettleFoundation/Kettle/blob/d687b738bb2da63303a2d65e721394a3f94ee016/patches/net/minecraft/entity/player/EntityPlayer.java.patch#L28-L29

AppleCore cannot find the "Forge" version of this field and throws another error. When reverted to the "Forge" version server loads fine, but when a player tries to connect this happens. At this point, I really don't have enough Java knowledge to be able to continue, so it's up to @Hexeption , @aolko or another skilled java mind to fix these problems.

josephworks commented 5 years ago

Or you can download the src, make your changes, compile, test, and pr.

josephworks commented 5 years ago

Plus, there hasn't been a commit in 9 days, I wouldn't be expecting one anytime soon...

kingdevnl commented 5 years ago

Please rename this issue to: AppleCore incompatible Crash

Hexeption commented 5 years ago

Fixed in vgit-HEAD-b73f821 build