Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

Minecraft crashes each time I load into a world already created or not.

Does anyone has an idea on how to fix this ?

 

This is my crash log :

Spoiler
---- Minecraft Crash Report ----
// Uh... Did I do that?

Time: 01/03/2022 18:54
Description: Ticking memory connection

java.lang.NullPointerException: Cannot invoke "Object.hashCode()" because "this.type" is null
	at com.mojang.brigadier.tree.ArgumentCommandNode.hashCode(ArgumentCommandNode.java:113) ~[brigadier-1.0.17.jar:?] {}
	at java.util.Objects.hashCode(Objects.java:103) ~[?:?] {}
	at java.util.HashMap$Node.hashCode(HashMap.java:298) ~[?:?] {}
	at java.util.AbstractMap.hashCode(AbstractMap.java:527) ~[?:?] {}
	at com.mojang.brigadier.tree.CommandNode.hashCode(CommandNode.java:137) ~[brigadier-1.0.17.jar:?] {re:classloading}
	at com.mojang.brigadier.tree.LiteralCommandNode.hashCode(LiteralCommandNode.java:100) ~[brigadier-1.0.17.jar:?] {re:classloading}
	at java.util.Objects.hashCode(Objects.java:103) ~[?:?] {}
	at java.util.HashMap$Node.hashCode(HashMap.java:298) ~[?:?] {}
	at java.util.AbstractMap.hashCode(AbstractMap.java:527) ~[?:?] {}
	at com.mojang.brigadier.tree.CommandNode.hashCode(CommandNode.java:137) ~[brigadier-1.0.17.jar:?] {re:classloading}
	at java.util.HashMap.hash(HashMap.java:340) ~[?:?] {}
	at java.util.HashMap.put(HashMap.java:612) ~[?:?] {}
	at net.minecraft.command.Commands.sendCommands(Commands.java:272) ~[forge:?] {re:classloading}
	at net.minecraft.server.management.PlayerList.sendPlayerPermissionLevel(PlayerList.java:598) ~[forge:?] {re:classloading}
	at net.minecraft.server.management.PlayerList.sendPlayerPermissionLevel(PlayerList.java:492) ~[forge:?] {re:classloading}
	at net.minecraft.server.management.PlayerList.placeNewPlayer(PlayerList.java:163) ~[forge:?] {re:classloading}
	at net.minecraft.network.login.ServerLoginNetHandler.handleAcceptedLogin(ServerLoginNetHandler.java:118) ~[forge:?] {re:classloading}
	at net.minecraft.network.login.ServerLoginNetHandler.tick(ServerLoginNetHandler.java:65) ~[forge:?] {re:classloading}
	at net.minecraft.network.NetworkManager.tick(NetworkManager.java:222) ~[forge:?] {re:classloading}
	at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:134) ~[forge:?] {re:classloading}
	at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:865) ~[forge:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:787) ~[forge:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.integrated.IntegratedServer.tickServer(IntegratedServer.java:78) ~[forge:?] {re:classloading,pl:runtimedistcleaner:A}
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:642) ~[forge:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:232) ~[forge:?] {re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:831) [?:?] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
	Minecraft Version: 1.16.5
	Minecraft Version ID: 1.16.5
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 16.0.2, Oracle Corporation
	Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 573577536 bytes (547 MB) / 1207959552 bytes (1152 MB) up to 12868124672 bytes (12272 MB)
	CPUs: 16
	JVM Flags: 3 total; -XX:+ShowCodeDetailsInExceptionMessages -XX:+IgnoreUnrecognizedVMOptions -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
	ModLauncher: 8.0.9+86+master.3cf110c
	ModLauncher launch target: fmluserdevclient
	ModLauncher naming: mcp
	ModLauncher services: 
		/mixin-0.8.4.jar mixin PLUGINSERVICE 
		/eventbus-4.0.0.jar eventbus PLUGINSERVICE 
		/forge-1.16.5-36.2.20_mapped_official_1.16.5-launcher.jar object_holder_definalize PLUGINSERVICE 
		/forge-1.16.5-36.2.20_mapped_official_1.16.5-launcher.jar runtime_enum_extender PLUGINSERVICE 
		/forge-1.16.5-36.2.20_mapped_official_1.16.5-launcher.jar capability_inject_definalize PLUGINSERVICE 
		/accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE 
		/forge-1.16.5-36.2.20_mapped_official_1.16.5-launcher.jar runtimedistcleaner PLUGINSERVICE 
		/mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE 
		/forge-1.16.5-36.2.20_mapped_official_1.16.5-launcher.jar fml TRANSFORMATIONSERVICE 
	FML: 36.2
	Forge: net.minecraftforge:36.2.20
	FML Language Providers: 
		javafml@36.2
		minecraft@1
	Mod List: 
		client-extra.jar                                  |Minecraft                     |minecraft                     |1.16.5              |DONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f
		forge-1.16.5-36.2.20_mapped_official_1.16.5-recomp|Forge                         |forge                         |36.2.20             |DONE      |Manifest: NOSIGNATURE
		main                                              |Custom dimension mod          |customdim                     |1.0                 |DONE      |Manifest: NOSIGNATURE
	Crash Report UUID: cdb8670d-65ee-452a-9e72-46d4c3913fe1
	Player Count: 0 / 8; []
	Data Packs: vanilla, mod:forge, mod:customdim
	Type: Integrated Server (map_client.txt)
	Is Modded: Definitely; Client brand changed to 'forge'

 

Edited by Natank25

  • Author

Because i don't know how to do git repo, i send the Command class

 

SwitchDimCommand:

package io.github.Natank25.customdim.commom.command.impl;

import com.mojang.brigadier.Command;
import com.mojang.brigadier.builder.LiteralArgumentBuilder;

import io.github.Natank25.customdim.commom.command.BaseCommand;
import io.github.Natank25.customdim.core.init.DimensionInit;
import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;
import net.minecraft.command.arguments.EntityArgument;
import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.world.World;

public class SwitchDimCommand extends BaseCommand {

	public SwitchDimCommand(String name, int permissionLevel, boolean enabled) {
		super(name, permissionLevel, enabled);
	}

	@Override
	public LiteralArgumentBuilder<CommandSource> setExecution() {
		return builder.then(Commands.argument("null", null)
				.executes(source -> execute(source.getSource(), EntityArgument.getPlayer(source, "player"))));
	}

	private int execute(CommandSource source, ServerPlayerEntity player) {
		if (source.getLevel() == source.getServer().getLevel(World.OVERWORLD)) {
			player.teleportTo(source.getServer().getLevel(DimensionInit.EMPTY_DIM),0,4,0,0,0);

		} else if (source.getLevel() == source.getServer().getLevel(DimensionInit.EMPTY_DIM)) {
			player.teleportTo(source.getServer().getLevel(World.OVERWORLD),-268,76,276,0,0);
		}
		return Command.SINGLE_SUCCESS;
	}

}

 

BaseCommand:

package io.github.Natank25.customdim.commom.command;

import com.mojang.brigadier.builder.LiteralArgumentBuilder;

import net.minecraft.command.CommandSource;
import net.minecraft.command.Commands;

public class BaseCommand {
	protected LiteralArgumentBuilder<CommandSource> builder;
	boolean enabled;
	
	public BaseCommand(String name, int permissionLevel, boolean enabled) {
		this.builder = Commands.literal(name).requires(source -> source.hasPermission(permissionLevel));
		this.enabled = enabled;
		
	}
	
	public LiteralArgumentBuilder<CommandSource> getBuilder() { 
		return builder;		
	}
	
	public boolean isEnabled() {
		return enabled;
	}
	
	public LiteralArgumentBuilder<CommandSource> setExecution() { 
		return null;		
	}
}

 

  • Author

True, i modified it from

Commands.argument("player", EntityArgument.player())

to

Commands.argument("null", null)

to remove the argument and it didn't worked (Do you have any ideas on how to do it ?).

I tried to launch minecraft again, and it work, thank you for your help

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.