Jump to content

[SOLVED] New Minecraft world won't load after using mod


Chixen

Recommended Posts

When I tried to load my new mod and create a new world, it loads correctly, but when I join the world, everything is just void, and no commands or chat messages work. This doesn't happen on worlds that have already been loaded. After I save and quit, it just gets suck on the "saving world" screen and can't close without use of the task manager or terminating the program directly. Code is below and console log below that.

package chixen.linemod.core.event;

import chixen.linemod.LineMod;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.event.TickEvent.PlayerTickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus;

@Mod.EventBusSubscriber(modid = LineMod.MOD_ID, bus = Bus.FORGE, value = Dist.CLIENT)
public class EventHandler {
	public static double rotSpeed = 0;
	public static Vector3d lastPos = new Vector3d(5779821.64151,7919321.64151,7987841.64151);
	public static double lineRotation = 0;
	@SubscribeEvent
	public static void onMove(final PlayerTickEvent event) {
		if(lastPos == new Vector3d(5779821.64151,7919321.64151,7987841.64151)) {
			lastPos = event.player.position();
		}
		if(event.player.position().z - lastPos.z != (event.player.position().x - lastPos.x) * Math.tan(lineRotation)) {
			final double cd = Math.cos(lineRotation);
			final double sd = Math.sin(lineRotation);
			final double td = (event.player.position().x - lastPos.x) * cd + (event.player.position().z - lastPos.z) * sd;
			event.player.setPos(td * cd + lastPos.x, event.player.position().y, td * sd + lastPos.z);
		}
		lastPos = event.player.position();
		lineRotation += rotSpeed * Math.PI / 20;
	}
}

Console log starting from world generation:

[23:08:34] [Server thread/INFO] [minecraft/IntegratedServer]: Starting integrated minecraft server version 1.16.5
[23:08:34] [Server thread/INFO] [minecraft/MinecraftServer]: Generating keypair
[23:08:34] [Server thread/DEBUG] [ne.mi.fm.lo.FileUtils/CORE]: Found existing serverconfig directory : .\saves\Showcase\serverconfig
[23:08:34] [Server thread/DEBUG] [ne.mi.fm.co.ConfigTracker/CONFIG]: Loading configs type SERVER
[23:08:34] [Server thread/DEBUG] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Built TOML config for .\saves\Showcase\serverconfig\forge-server.toml
[23:08:34] [Server thread/DEBUG] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Loaded TOML config file .\saves\Showcase\serverconfig\forge-server.toml
[23:08:34] [Server thread/DEBUG] [ne.mi.fm.co.ConfigFileTypeHandler/CONFIG]: Watching TOML config file .\saves\Showcase\serverconfig\forge-server.toml for changes
[23:08:34] [Server thread/DEBUG] [ne.mi.co.ForgeConfig/FORGEMOD]: Loaded forge config file forge-server.toml
[23:08:38] [Server thread/INFO] [minecraft/MinecraftServer]: Preparing start region for dimension minecraft:overworld
[23:08:38] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0%
[23:08:38] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0%
[23:08:39] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0%
[23:08:39] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 0%
[23:08:40] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 2%
[23:08:41] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 6%
[23:08:41] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 6%
[23:08:41] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 9%
[23:08:42] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 9%
[23:08:42] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 15%
[23:08:43] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 17%
[23:08:43] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 17%
[23:08:44] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 23%
[23:08:44] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 26%
[23:08:45] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 26%
[23:08:45] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 32%
[23:08:46] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 35%
[23:08:47] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 39%
[23:08:47] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 39%
[23:08:48] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 47%
[23:08:48] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 47%
[23:08:48] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 55%
[23:08:49] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 58%
[23:08:50] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 60%
[23:08:50] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 60%
[23:08:50] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 70%
[23:08:51] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 73%
[23:08:51] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 76%
[23:08:52] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 79%
[23:08:52] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 86%
[23:08:53] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 89%
[23:08:53] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Preparing spawn area: 89%
[23:08:54] [Render thread/INFO] [minecraft/LoggingChunkStatusListener]: Time elapsed: 15961 ms
[23:08:54] [Server thread/INFO] [minecraft/IntegratedServer]: Changing view distance to 11, from 10
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Starting local connection.
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.co.tr.CoreModBaseTransformer/COREMOD]: Transforming net/minecraft/network/play/client/CClientSettingsPacket
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Starting local connection.
[23:08:56] [Server thread/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Sending ticking packet info 'net.minecraftforge.fml.network.FMLHandshakeMessages$S2CModList' to 'fml:handshake' sequence 0
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Recieved login wrapper packet event for channel fml:handshake with index 0
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Logging into server with mod list [minecraft, chixenlinerotmod, forge]
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:loginwrapper' : Version test of 'FML2' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:handshake' : Version test of 'FML2' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'minecraft:unregister' : Version test of 'FML2' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:play' : Version test of 'FML2' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'minecraft:register' : Version test of 'FML2' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'forge:split' : Version test of '1.0' from server : ACCEPTED
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Accepting channel list from server
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Dispatching wrapped packet reply for channel fml:handshake with index 0
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Accepted server connection
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Recieved login wrapper packet event for channel fml:handshake with index 0
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Received client indexed reply 0 of type net.minecraftforge.fml.network.FMLHandshakeMessages$C2SModListReply
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Received client connection with modlist [minecraft, chixenlinerotmod, forge]
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:loginwrapper' : Version test of 'FML2' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:handshake' : Version test of 'FML2' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'minecraft:unregister' : Version test of 'FML2' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'fml:play' : Version test of 'FML2' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'minecraft:register' : Version test of 'FML2' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Channel 'forge:split' : Version test of '1.0' from client : ACCEPTED
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.NetworkRegistry/NETREGISTRY]: Accepting channel list from client
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Accepted client connection mod list
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/REGISTRIES]: Expecting 16 registries: [minecraft:recipe_serializer, minecraft:sound_event, minecraft:particle_type, minecraft:villager_profession, minecraft:item, minecraft:potion, minecraft:block_entity_type, minecraft:block, minecraft:data_serializers, minecraft:mob_effect, minecraft:stat_type, minecraft:menu, minecraft:enchantment, minecraft:motive, minecraft:fluid, minecraft:entity_type]
[23:08:56] [Server thread/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Sending ticking packet info 'Config forge-server.toml' to 'fml:handshake' sequence 1
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Recieved login wrapper packet event for channel fml:handshake with index 1
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Received config sync from server
[23:08:56] [Netty Local Client IO #0/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Dispatching wrapped packet reply for channel fml:handshake with index 1
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLLoginWrapper/FMLHANDSHAKE]: Recieved login wrapper packet event for channel fml:handshake with index 1
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Received client indexed reply 1 of type net.minecraftforge.fml.network.FMLHandshakeMessages$C2SAcknowledge
[23:08:56] [Netty Server IO #1/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Received acknowledgement from client
[23:08:56] [Server thread/DEBUG] [ne.mi.fm.ne.FMLHandshakeHandler/FMLHANDSHAKE]: Handshake complete!
[23:08:56] [Netty Local Client IO #0/INFO] [ne.mi.fm.ne.NetworkHooks/]: Connected to a modded server.
[23:08:56] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.advancements.PlayerAdvancements@245955ed
[23:08:56] [Server thread/INFO] [minecraft/PlayerList]: Dev[local:E:be1d02f3] logged in with entity id 121 at (217.5, 63.0, 180.5)
[23:08:56] [Server thread/INFO] [minecraft/MinecraftServer]: Dev joined the game
[23:08:58] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: Dev moved wrongly!
[23:08:58] [Server thread/WARN] [minecraft/ServerPlayNetHandler]: Dev moved wrongly!
[23:08:58] [Render thread/INFO] [minecraft/AdvancementList]: Loaded 0 advancements

EDIT: I got it to work by changing the long random numbers from the lastPos initialization to null, and it worked for some reason. I suspect it had to do with lag, but I got it to work now.

Edited by Chixen
Solved
Link to comment
Share on other sites

  • Chixen changed the title to [SOLVED] New Minecraft world won't load after using mod

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.