diff --git a/src/main/java/com/reider745/InnerCoreServer.java b/src/main/java/com/reider745/InnerCoreServer.java index 594e9a24..df0ff02b 100644 --- a/src/main/java/com/reider745/InnerCoreServer.java +++ b/src/main/java/com/reider745/InnerCoreServer.java @@ -11,7 +11,6 @@ import com.reider745.commands.CommandsHelper; import com.reider745.event.EventListener; import com.reider745.event.InnerCorePlugin; import com.reider745.hooks.BiomesHooks; -import com.reider745.hooks.SnowfallEverywhere; import com.reider745.item.CustomItem; import com.reider745.item.ItemMethod; @@ -300,7 +299,7 @@ public class InnerCoreServer { Logger.info("Registering ZoteCore events..."); pluginManager.registerEvents(new EventListener(), plugin); - pluginManager.registerEvents(new SnowfallEverywhere(), plugin); + // pluginManager.registerEvents(new SnowfallEverywhere(), plugin); CustomBlock.init(); CustomItem.postInit(); @@ -319,7 +318,7 @@ public class InnerCoreServer { PluginManager pluginManager = Server.getInstance().getPluginManager(); pluginManager.getPlugins().put(plugin.getDescription().getName(), plugin); pluginManager.registerEvents(new EventListener(), plugin); - pluginManager.registerEvents(new SnowfallEverywhere(), plugin); + // pluginManager.registerEvents(new SnowfallEverywhere(), plugin); } public void start() { @@ -448,11 +447,11 @@ public class InnerCoreServer { } public static String getVersionName() { - return singleton.getPropertyString("pack-version", "2.3.1b116 test"); + return singleton.getPropertyString("pack-version", "2.3.1b115 test"); } public static int getVersionCode() { - return singleton.getPropertyInt("pack-version-code", 153); + return singleton.getPropertyInt("pack-version-code", 152); } private static void handleUnsupportedMethod(String message) { diff --git a/src/main/java/com/reider745/Main.java b/src/main/java/com/reider745/Main.java index ac128ea9..9e2635d8 100644 --- a/src/main/java/com/reider745/Main.java +++ b/src/main/java/com/reider745/Main.java @@ -75,11 +75,11 @@ public class Main { loader.registerHooksInitializationForClass(LevelHooks.class); loader.registerHooksInitializationForClass(ItemUtils.class); loader.registerHooksInitializationForClass(AndroidHooks.class); - //loader.registerHooksInitializationForClass(SnowfallEverywhere.class); - //loader.registerHooksInitializationForClass(BiomesHooks.class); + // loader.registerHooksInitializationForClass(SnowfallEverywhere.class); + // loader.registerHooksInitializationForClass(BiomesHooks.class); loader.registerHooksInitializationForClass(GlobalBanList.class); - //bug fix + // bug fix loader.registerHooksInitializationForClass(EntityItemHooks.class); loader.init(); diff --git a/src/main/java/com/reider745/entity/EntityMethod.java b/src/main/java/com/reider745/entity/EntityMethod.java index 0c2f89ac..3be538a8 100644 --- a/src/main/java/com/reider745/entity/EntityMethod.java +++ b/src/main/java/com/reider745/entity/EntityMethod.java @@ -27,6 +27,7 @@ import com.reider745.event.EventListener; import com.reider745.hooks.ItemUtils; import com.reider745.world.BlockSourceMethods; import com.zhekasmirnov.apparatus.minecraft.enums.GameEnums; +import com.zhekasmirnov.innercore.api.constants.EntityType; import java.util.Map; import java.util.function.Consumer; @@ -301,9 +302,14 @@ public class EntityMethod { return validateThen(entityUid, entity -> { int networkId = entity.getNetworkId(); if (networkId == -1) { - Identifier identifier = entity.getIdentifier(); - if (identifier != null) { - networkId = GameEnums.getInt(GameEnums.getSingleton().getEnum("entity_type", identifier.getPath())); + if (entity.isPlayer) { + networkId = EntityType.PLAYER; + } + if (networkId == -1) { + Identifier identifier = entity.getIdentifier(); + if (identifier != null) { + networkId = GameEnums.getInt(GameEnums.getSingleton().getEnum("entity_type", identifier.getPath())); + } } } return networkId; @@ -313,6 +319,9 @@ public class EntityMethod { public static String getEntityTypeName(long entityUid) { return validateThen(entityUid, entity -> { Identifier identifier = entity.getIdentifier(); + if (identifier == null && entity.isPlayer) { + identifier = Identifier.of("minecraft", "player"); + } return identifier != null ? identifier + "<>" : null; }, null); } diff --git a/src/main/resources/zotecore.yml b/src/main/resources/zotecore.yml index cf621039..6cc07873 100644 --- a/src/main/resources/zotecore.yml +++ b/src/main/resources/zotecore.yml @@ -1,8 +1,8 @@ # Change resolution of pack that client should have to log into server. # However, no deprecated or unimplemented methods will be added. pack: Inner Core Test -pack-version: 2.3.0b116 test -pack-version-code: 153 +pack-version: 2.3.0b115 test +pack-version-code: 152 # Sets the list of mods and configs to load, you can specify # name, folder name of a modpack from /modpacks or a path.