Add two types of Leaps -- Jump and Pounce

This commit is contained in:
Kam committed 2024-01-23 23:32:02 -05:00
1 parent ebffc0e80e
commit 509d32bfc1
4 files changed
+17 -9

No files matched your search

@@ -13,11 +13,17 @@ import java.util.Collection;
import java.util.List;
public class VersionCompatibility {
public static int ModRev = 21;
public static int ModRev = 22;
public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound compound){
if(npc.npcVersion == ModRev)
return;
if(npc.npcVersion < 22) {
if (compound.hasKey("CanLeap")) {
boolean canLeap = compound.getBoolean("CanLeap");
compound.setInteger("LeapType", !canLeap ? 0 : 1);
}
}
if(npc.npcVersion < 19) {
if (compound.hasKey("CanDrown")) {
compound.setInteger("DrowningType", (compound.getBoolean("CanDrown") ? 1 : 0));