fix: Методы получения типов, базовая версия
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user