Hbm's Nuclear Tech - Extended Edition

Hbm's Nuclear Tech - Extended Edition

398k Downloads

Server crashes when trying to load in even after downloading patch

valina354 opened this issue · 8 comments

commented

I downloaded the patch and server started fine, but when i tried to load into server the server instantly crashed with this log, even after removing all mods except hbm the same thing happened so its not an issue with conflicting mods
crash-2024-02-09_19.16.38-server.txt

commented

Same. I drop latest.log and debug.log on only hbm mod.
Server work normal without mods

latest.log
debug.log

commented

It seems that this only happens with worlds created/played in the previous version of the mod. Worlds created in 2.0.0 work fine. So they probably forgot to test the loading of existing worlds.
Edit: Downgrading to 1.9.8 works again.

commented

It seems that this only happens with worlds created/played in the previous version of the mod. Worlds created in 2.0.0 work fine. So they probably forgot to test the loading of existing worlds instead of creating new ones. Edit: Downgrading to 1.9.8 works again.

i have put lots of work in making my power plant and city so making new world isnt option, hopefylly alcater will fix this sooner

commented

It seems that this only happens with worlds created/played in the previous version of the mod. Worlds created in 2.0.0 work fine. So they probably forgot to test the loading of existing worlds. Edit: Downgrading to 1.9.8 works again.

Not for me, i create new server and new world

commented

I've managed to make a temporary fix by commenting out problematic lines in src/main/java/com/hbm/main/ModEventHandler.java

Temporary fix
@SubscribeEvent
	public void clientJoinServer(PlayerLoggedInEvent e) {
		if(e.player instanceof EntityPlayerMP){
			EntityPlayerMP playerMP = (EntityPlayerMP)e.player;
			PacketDispatcher.sendTo(new AssemblerRecipeSyncPacket(AssemblerRecipes.recipeList, AssemblerRecipes.hidden), playerMP);
			JetpackHandler.playerLoggedIn(e);
			IHBMData props = HbmCapability.getData(e.player);

			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_JETPACK, props.getEnableBackpack()), playerMP);
			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_HEAD, props.getEnableHUD()), playerMP);
			
			if (GeneralConfig.enableWelcomeMessage) {
				//e.player.sendMessage(new TextComponentTranslation(TextFormatting.DARK_AQUA + I18nUtil.resolveKey("chat.welcome")+"§r"));
			}

			if(HTTPHandler.newVersion && GeneralConfig.changelog) {
				//e.player.sendMessage(new TextComponentString(TextFormatting.GREEN + I18nUtil.resolveKey("chat.newver", HTTPHandler.versionNumber)+"§r"));
				//e.player.sendMessage(new TextComponentString(TextFormatting.YELLOW + I18nUtil.resolveKey("chat.curver", RefStrings.VERSION)+"§r"));

				if(HTTPHandler.changes != ""){
					String[] lines = HTTPHandler.changes.split("\\$");
					e.player.sendMessage(new TextComponentString("§6[New Features]§r"));//RefStrings.CHANGELOG
					for(String w: lines){
						e.player.sendMessage(new TextComponentString(w));//RefStrings.CHANGELOG
					}
				}
			}
			
			if(HTTPHandler.optifine){
				e.player.sendMessage(new TextComponentString("Optifine detected, may cause compatibility issues. Check log for details."));
			}
			if(GeneralConfig.duckButton){
				if(e.player instanceof EntityPlayerMP && !e.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked")){
	        		//PacketDispatcher.sendTo(new PlayerInformPacket(I18nUtil.resolveKey("chat.duck")), (EntityPlayerMP)e.player);
				}
	        }
		}
	}
commented

I've managed to make a temporary fix by commenting out problematic lines in src/main/java/com/hbm/main/ModEventHandler.java

Temporary fix

@SubscribeEvent
	public void clientJoinServer(PlayerLoggedInEvent e) {
		if(e.player instanceof EntityPlayerMP){
			EntityPlayerMP playerMP = (EntityPlayerMP)e.player;
			PacketDispatcher.sendTo(new AssemblerRecipeSyncPacket(AssemblerRecipes.recipeList, AssemblerRecipes.hidden), playerMP);
			JetpackHandler.playerLoggedIn(e);
			IHBMData props = HbmCapability.getData(e.player);

			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_JETPACK, props.getEnableBackpack()), playerMP);
			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_HEAD, props.getEnableHUD()), playerMP);
			
			if (GeneralConfig.enableWelcomeMessage) {
				//e.player.sendMessage(new TextComponentTranslation(TextFormatting.DARK_AQUA + I18nUtil.resolveKey("chat.welcome")+"§r"));
			}

			if(HTTPHandler.newVersion && GeneralConfig.changelog) {
				//e.player.sendMessage(new TextComponentString(TextFormatting.GREEN + I18nUtil.resolveKey("chat.newver", HTTPHandler.versionNumber)+"§r"));
				//e.player.sendMessage(new TextComponentString(TextFormatting.YELLOW + I18nUtil.resolveKey("chat.curver", RefStrings.VERSION)+"§r"));

				if(HTTPHandler.changes != ""){
					String[] lines = HTTPHandler.changes.split("\\$");
					e.player.sendMessage(new TextComponentString("§6[New Features]§r"));//RefStrings.CHANGELOG
					for(String w: lines){
						e.player.sendMessage(new TextComponentString(w));//RefStrings.CHANGELOG
					}
				}
			}
			
			if(HTTPHandler.optifine){
				e.player.sendMessage(new TextComponentString("Optifine detected, may cause compatibility issues. Check log for details."));
			}
			if(GeneralConfig.duckButton){
				if(e.player instanceof EntityPlayerMP && !e.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked")){
	        		//PacketDispatcher.sendTo(new PlayerInformPacket(I18nUtil.resolveKey("chat.duck")), (EntityPlayerMP)e.player);
				}
	        }
		}
	}

i would do it but i cant get code to compile as its issue with gradlew for me

commented

I've managed to make a temporary fix by commenting out problematic lines in src/main/java/com/hbm/main/ModEventHandler.java
Temporary fix

@SubscribeEvent
	public void clientJoinServer(PlayerLoggedInEvent e) {
		if(e.player instanceof EntityPlayerMP){
			EntityPlayerMP playerMP = (EntityPlayerMP)e.player;
			PacketDispatcher.sendTo(new AssemblerRecipeSyncPacket(AssemblerRecipes.recipeList, AssemblerRecipes.hidden), playerMP);
			JetpackHandler.playerLoggedIn(e);
			IHBMData props = HbmCapability.getData(e.player);

			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_JETPACK, props.getEnableBackpack()), playerMP);
			PacketDispatcher.sendTo(new KeybindPacket(EnumKeybind.TOGGLE_HEAD, props.getEnableHUD()), playerMP);
			
			if (GeneralConfig.enableWelcomeMessage) {
				//e.player.sendMessage(new TextComponentTranslation(TextFormatting.DARK_AQUA + I18nUtil.resolveKey("chat.welcome")+"§r"));
			}

			if(HTTPHandler.newVersion && GeneralConfig.changelog) {
				//e.player.sendMessage(new TextComponentString(TextFormatting.GREEN + I18nUtil.resolveKey("chat.newver", HTTPHandler.versionNumber)+"§r"));
				//e.player.sendMessage(new TextComponentString(TextFormatting.YELLOW + I18nUtil.resolveKey("chat.curver", RefStrings.VERSION)+"§r"));

				if(HTTPHandler.changes != ""){
					String[] lines = HTTPHandler.changes.split("\\$");
					e.player.sendMessage(new TextComponentString("§6[New Features]§r"));//RefStrings.CHANGELOG
					for(String w: lines){
						e.player.sendMessage(new TextComponentString(w));//RefStrings.CHANGELOG
					}
				}
			}
			
			if(HTTPHandler.optifine){
				e.player.sendMessage(new TextComponentString("Optifine detected, may cause compatibility issues. Check log for details."));
			}
			if(GeneralConfig.duckButton){
				if(e.player instanceof EntityPlayerMP && !e.player.getEntityData().getCompoundTag(EntityPlayer.PERSISTED_NBT_TAG).getBoolean("hasDucked")){
	        		//PacketDispatcher.sendTo(new PlayerInformPacket(I18nUtil.resolveKey("chat.duck")), (EntityPlayerMP)e.player);
				}
	        }
		}
	}

i would do it but i cant get code to compile as its issue with gradlew for me

if gradle daemon can't start set JAVA_HOME system environment variable to java 8 jdk path

commented

Fixed - will be in next update