Jump to content

[1.15] performEffect does not work


Zemelua

Recommended Posts

public class ModEffect extends Effect {

	protected ModEffect(EffectType typeIn, int liquidColorIn) {
		super(typeIn, liquidColorIn);
	}

	@Override
	public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
		if (this == DepressionModRegistry.INSTANT_ANTIDEPRESSANT.get()) {
			LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
			int currentMental = 0;
			try {
				currentMental = cap.orElseThrow(IllegalAccessException::new).getMental();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
			int _currentMental = currentMental + 3;
			if (_currentMental > 20) {
				_currentMental = 20;
			}
			try {
				cap.orElseThrow(IllegalAccessException::new).setMental(_currentMental);
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
	}
}
public class DepressionModRegistry {

		//EffectRegistry
		public static final DeferredRegister<Effect> EFFECTS = DeferredRegister.create(ForgeRegistries.POTIONS, DepressionMod.MOD_ID);

		public static final RegistryObject<Effect> INSTANT_ANTIDEPRESSANT = EFFECTS.register("instant_antidepressant", () -> new InstantEffect(EffectType.BENEFICIAL, 123456));

		//PotionRegistry
		public static final DeferredRegister<Potion> POTIONS = DeferredRegister.create(ForgeRegistries.POTION_TYPES, DepressionMod.MOD_ID);

		public static final RegistryObject<Potion> BRON = POTIONS.register("bron", () -> new Potion(new EffectInstance(Effects.LEVITATION, 120), new EffectInstance(Effects.JUMP_BOOST, 3600, 2), new EffectInstance(Effects.SLOW_FALLING, 3600), new EffectInstance(INSTANT_ANTIDEPRESSANT.get(), 1)));

		//RecipeRegistry
		public static void addRecipes() {
			BrewingRecipeRegistry.addRecipe(new PotionRecipe(Lazy.concurrentOf(() -> Potions.AWKWARD), Ingredient.fromItems(Items.SUNFLOWER), Lazy.concurrentOf(() -> BRON.get())));
		}
	}

In the code above, I've succeeded in implementing potions and effects, but I can't get the effect's effect to work. Specifically, it increases the capacity value by a certain amount, similar to instant health. It has also been confirmed that the capabilities are properly implemented. It just seems to me that performEffect isn't working.

Link to comment
Share on other sites

public class ModEffect extends InstantEffect {

	protected ModEffect(EffectType typeIn, int liquidColorIn) {
		super(typeIn, liquidColorIn);
	}

	@Override
	public void affectEntity(@Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entityLivingBaseIn, int amplifier, double health) {
		if (this == DepressionModRegistry.INSTANT_ANTIDEPRESSANT.get()) {
			this.performEffect(entityLivingBaseIn, amplifier);
		}
	}
	
	@Override
	public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
		if (this == DepressionModRegistry.INSTANT_ANTIDEPRESSANT.get()) {
			LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
			int currentMental = 0;
			try {
				currentMental = cap.orElseThrow(IllegalAccessException::new).getMental();
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
			int _currentMental = currentMental + 3;
			if (_currentMental > 20) {
				_currentMental = 20;
			}
			try {
				cap.orElseThrow(IllegalAccessException::new).setMental(_currentMental);
			} catch (IllegalAccessException e) {
				e.printStackTrace();
			}
		}
	}
}

I extended InstantEffect and override affectEntity, but it's still not working.

Link to comment
Share on other sites

public class ModEffect extends InstantEffect {

	public ModEffect(EffectType typeIn, int liquidColorIn) {
		super(typeIn, liquidColorIn);
	}

	@Override
	public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
		if (entityLivingBaseIn instanceof PlayerEntity) {
			LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
			int currentMental = cap.ifPresent(f -> f.getMental());  //<-here
			int _currentMental = currentMental + 3;
		//if (_currentMental > 20) {
		//	_currentMental = 20;
		//}
			cap.ifPresent(f -> f.setMental(_currentMental));
		}
	}

	@Override
	public void affectEntity(@Nullable Entity source, @Nullable Entity indirectSource, LivingEntity entityLivingBaseIn, int amplifier, double health) {
		this.performEffect(entityLivingBaseIn, amplifier);
	}
}

I've improved the code, but I don't know how to use ifPresent with getMental ().

The code can be found at https://github.com/Zemelua/Depression-Mod . I haven't updated it yet, but I have a complete implementation of capability.

Edited by Zemelua
Link to comment
Share on other sites

1 hour ago, Zemelua said:

I've improved the code, but I don't know how to use ifPresent with getMental ().

Of course that won't work, since ifPresent() returns void. Why not put all code that needs access to your capability in the consumer in ifPresent()?

 

Basic Java stuff like this is best to know before going into modding, which is why I would strongly encourage you to take a few weeks off modding and take that time to learn the basics of Java. 

Link to comment
Share on other sites

I'm sorry. Since I am learning java in parallel with modding (such as learning java code that got stuck in modding at that time), I am aware that there is a part that is not learned enough. This time, I asked a question because I misunderstood that the cause was not in java. I'm sorry.

	@Override
	public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
		if (entityLivingBaseIn instanceof PlayerEntity) {
			System.out.print("test");
			LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
			cap.ifPresent(f ->
				f.setMental(f.getMental() + 3)
			);

Well, I've fixed the code and I think this is the correct java code, but it doesn't work. Is this also a java issue?

Edited by Zemelua
Link to comment
Share on other sites

You haven't answered either of my two questions. How are you viewing the data? If you're grabbing it from the logical server, it will be present. However, the logical client would need to have the information synced across the two threads.

 

You also only attach the capability on the client player meaning that it will never be stored or found on the server. This means that nothing in your above code will work.

Link to comment
Share on other sites

I'm sorry. I forgot to answer. The data is displayed as a HUD in the client / gui / MentalOverlayHandler. (This has already been successful.) The current ultimate goal is to increase the value of capacity by drinking potions, and reflect that in the HUD. The code doesn't reflect the potion and effect code yet, but it's here. https://github.com/Zemelua/Depression-Mod

Link to comment
Share on other sites

1 hour ago, ChampionAsh5357 said:

You also only attach the capability on the client player meaning that it will never be stored or found on the server. This means that nothing in your above code will work.

Along with what I already mentioned, you need to sync the data to the logical client with a packet whenever the value changes.

Link to comment
Share on other sites

	@Override
	public void performEffect(LivingEntity entityLivingBaseIn, int amplifier) {
		if (entityLivingBaseIn instanceof PlayerEntity) {
			System.out.print("test");
			LazyOptional<PlayerMentalInterface> cap = ((PlayerEntity)entityLivingBaseIn).getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
			cap.ifPresent(f -> {
				int _currentMental = f.getMental() + 3;
				f.setMental(_currentMental);
				DepressionModPacketHandler.sendToClient(new PlayerMentalCapabilityMessage(_currentMental), (PlayerEntity) entityLivingBaseIn);
			});
		}
	}

I've improved the code, but it crashed when I drank a potion. I don't know the cause, so can you tell me? The crash report is below.

 

 

---- Minecraft Crash Report ----
// Shall we play a game?

Time: 20/10/26 3:40
Description: Ticking player

java.lang.ClassCastException: net.minecraftforge.common.util.LazyOptional cannot be cast to depression_mod.capability.mentalpoint.PlayerMentalInterface
    at depression_mod.network.PlayerMentalCapabilityMessage.<init>(PlayerMentalCapabilityMessage.java:19) ~[?:?] {re:classloading}
    at depression_mod.potion.ModEffect.lambda$0(ModEffect.java:30) ~[?:?] {re:classloading}
    at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161) ~[?:?] {re:classloading}
    at depression_mod.potion.ModEffect.performEffect(ModEffect.java:27) ~[?:?] {re:classloading}
    at depression_mod.potion.ModEffect.affectEntity(ModEffect.java:37) ~[?:?] {re:classloading}
    at net.minecraft.item.PotionItem.onItemUseFinish(PotionItem.java:47) ~[?:?] {re:classloading}
    at net.minecraft.item.ItemStack.onItemUseFinish(ItemStack.java:213) ~[?:?] {re:classloading}
    at net.minecraft.entity.LivingEntity.onItemUseFinish(LivingEntity.java:2876) ~[?:?] {re:classloading}
    at net.minecraft.entity.player.ServerPlayerEntity.onItemUseFinish(ServerPlayerEntity.java:1027) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.entity.LivingEntity.updateActiveHand(LivingEntity.java:2754) ~[?:?] {re:classloading}
    at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2185) ~[?:?] {re:classloading}
    at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity.java:237) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.entity.player.ServerPlayerEntity.playerTick(ServerPlayerEntity.java:379) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.network.play.ServerPlayNetHandler.tick(ServerPlayNetHandler.java:188) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkManager.tick(NetworkManager.java:250) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152) ~[?:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662) [?:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_261] {}


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

-- Head --
Thread: Server thread
Stacktrace:
    at depression_mod.network.PlayerMentalCapabilityMessage.<init>(PlayerMentalCapabilityMessage.java:19)
    at depression_mod.potion.ModEffect.lambda$0(ModEffect.java:30)
    at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161)
    at depression_mod.potion.ModEffect.performEffect(ModEffect.java:27)
    at depression_mod.potion.ModEffect.affectEntity(ModEffect.java:37)
    at net.minecraft.item.PotionItem.onItemUseFinish(PotionItem.java:47)
    at net.minecraft.item.ItemStack.onItemUseFinish(ItemStack.java:213)
    at net.minecraft.entity.LivingEntity.onItemUseFinish(LivingEntity.java:2876)
    at net.minecraft.entity.player.ServerPlayerEntity.onItemUseFinish(ServerPlayerEntity.java:1027)
    at net.minecraft.entity.LivingEntity.updateActiveHand(LivingEntity.java:2754)
    at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2185)
    at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity.java:237)

-- Player being ticked --
Details:
    Entity Type: minecraft:player (net.minecraft.entity.player.ServerPlayerEntity)
    Entity ID: 135
    Entity Name: Dev
    Entity's Exact location: -140.31, 70.20, -6.46
    Entity's Block location: World: (-141,70,-7), Chunk: (at 3,4,9 in -9,-1; contains blocks -144,0,-16 to -129,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
    Entity's Momentum: 0.00, 0.01, 0.00
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.entity.player.ServerPlayerEntity.playerTick(ServerPlayerEntity.java:379)
    at net.minecraft.network.play.ServerPlayNetHandler.tick(ServerPlayNetHandler.java:188)
    at net.minecraft.network.NetworkManager.tick(NetworkManager.java:250)

-- Ticking connection --
Details:
    Connection: net.minecraft.network.NetworkManager@3bcb3751
Stacktrace:
    at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662)
    at java.lang.Thread.run(Thread.java:748)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_261, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 532880904 bytes (508 MB) / 1263534080 bytes (1205 MB) up to 1873805312 bytes (1787 MB)
    CPUs: 12
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 5.1.2+70+master.2845bb9
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services: 
        /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-2.1.3-shadowed.jar accesstransformer PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE 
    FML: 31.2
    Forge: net.minecraftforge:31.2.41
    FML Language Providers: 
        javafml@31.2
        minecraft@1
    Mod List: 
        client-extra.jar Minecraft {minecraft@1.15.2 DONE}
        forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {forge@31.2.41 DONE}
        main Depression Mod {depression_mod@NONE DONE}
    Player Count: 1 / 8; [ServerPlayerEntity['Dev'/135, l='New World', x=-140.31, y=70.20, z=-6.46]]
    Data Packs: vanilla, mod:forge (incompatible), mod:depression_mod
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'

Link to comment
Share on other sites

public class PlayerMentalCapabilityMessage {
	ClientPlayerEntity player = Minecraft.getInstance().player;  //getInstance().playerをplayerにぶち込む
	LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
		//playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む
	int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental();
	//int currentMental = ((PlayerMentalInterface) playerMentalInterface).getMental();  //playerMentalInterfaceからmentalの値を取得してcurrentMentalにぶち込む

	public PlayerMentalCapabilityMessage(int currentMental) {
		this.currentMental = currentMental;
	}

	public static void encode(PlayerMentalCapabilityMessage message, PacketBuffer buf) {
		buf.writeInt(message.currentMental);
	}

	public static PlayerMentalCapabilityMessage decode(PacketBuffer buf) {
		int currentMental = buf.readInt();
		return new PlayerMentalCapabilityMessage(currentMental);

	}

	public static void handle(PlayerMentalCapabilityMessage message, Supplier<NetworkEvent.Context> ctx) {
		ctx.get().enqueueWork(() -> {
			DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> Handle.handleClient(message.currentMental));
		});
		ctx.get().setPacketHandled(true);
	}

	//@SuppressWarnings("resource")
	public static class Handle {
		public static DistExecutor.SafeRunnable handleClient(int currentMental) {
			return new DistExecutor.SafeRunnable() {
				@Override
				public void run() {
					LazyOptional<PlayerMentalInterface> cap = Minecraft.getInstance().player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
					cap.orElseThrow(IllegalArgumentException::new).setMental(currentMental);
				}
			};
		}
	}

I fixed the code in the network message and it seems that it crashed for another reason, but I don't know ...

 

---- Minecraft Crash Report ----
// Don't do that.

Time: 20/10/26 13:32
Description: Ticking player

java.lang.ExceptionInInitializerError: null
    at depression_mod.potion.ModEffect.lambda$0(ModEffect.java:30) ~[?:?] {re:classloading}
    at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161) ~[?:?] {re:classloading}
    at depression_mod.potion.ModEffect.performEffect(ModEffect.java:27) ~[?:?] {re:classloading}
    at depression_mod.potion.ModEffect.affectEntity(ModEffect.java:37) ~[?:?] {re:classloading}
    at net.minecraft.item.PotionItem.onItemUseFinish(PotionItem.java:47) ~[?:?] {re:classloading}
    at net.minecraft.item.ItemStack.onItemUseFinish(ItemStack.java:213) ~[?:?] {re:classloading}
    at net.minecraft.entity.LivingEntity.onItemUseFinish(LivingEntity.java:2876) ~[?:?] {re:classloading}
    at net.minecraft.entity.player.ServerPlayerEntity.onItemUseFinish(ServerPlayerEntity.java:1027) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.entity.LivingEntity.updateActiveHand(LivingEntity.java:2754) ~[?:?] {re:classloading}
    at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2185) ~[?:?] {re:classloading}
    at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity.java:237) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.entity.player.ServerPlayerEntity.playerTick(ServerPlayerEntity.java:379) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.network.play.ServerPlayNetHandler.tick(ServerPlayNetHandler.java:188) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkManager.tick(NetworkManager.java:250) ~[?:?] {re:classloading}
    at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152) ~[?:?] {re:classloading}
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821) ~[?:?] {re:classloading,pl:accesstransformer:B}
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120) ~[?:?] {re:classloading,pl:runtimedistcleaner:A}
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662) [?:?] {re:classloading,pl:accesstransformer:B}
    at java.lang.Thread.run(Thread.java:748) [?:1.8.0_261] {}
Caused by: java.lang.IllegalArgumentException: Registration of network channels is locked
    at net.minecraftforge.fml.network.NetworkRegistry.createInstance(NetworkRegistry.java:130) ~[?:?] {re:classloading}
    at net.minecraftforge.fml.network.NetworkRegistry.newSimpleChannel(NetworkRegistry.java:97) ~[?:?] {re:classloading}
    at depression_mod.network.DepressionModPacketHandler.<clinit>(DepressionModPacketHandler.java:13) ~[?:?] {re:classloading}
    ... 20 more


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

-- Head --
Thread: Server thread
Stacktrace:
    at depression_mod.potion.ModEffect.lambda$0(ModEffect.java:30)
    at net.minecraftforge.common.util.LazyOptional.ifPresent(LazyOptional.java:161)
    at depression_mod.potion.ModEffect.performEffect(ModEffect.java:27)
    at depression_mod.potion.ModEffect.affectEntity(ModEffect.java:37)
    at net.minecraft.item.PotionItem.onItemUseFinish(PotionItem.java:47)
    at net.minecraft.item.ItemStack.onItemUseFinish(ItemStack.java:213)
    at net.minecraft.entity.LivingEntity.onItemUseFinish(LivingEntity.java:2876)
    at net.minecraft.entity.player.ServerPlayerEntity.onItemUseFinish(ServerPlayerEntity.java:1027)
    at net.minecraft.entity.LivingEntity.updateActiveHand(LivingEntity.java:2754)
    at net.minecraft.entity.LivingEntity.tick(LivingEntity.java:2185)
    at net.minecraft.entity.player.PlayerEntity.tick(PlayerEntity.java:237)

-- Player being ticked --
Details:
    Entity Type: minecraft:player (net.minecraft.entity.player.ServerPlayerEntity)
    Entity ID: 134
    Entity Name: Dev
    Entity's Exact location: -140.36, 70.20, -5.77
    Entity's Block location: World: (-141,70,-6), Chunk: (at 3,4,10 in -9,-1; contains blocks -144,0,-16 to -129,255,-1), Region: (-1,-1; contains chunks -32,-32 to -1,-1, blocks -512,0,-512 to -1,255,-1)
    Entity's Momentum: 0.00, 0.01, 0.00
    Entity's Passengers: []
    Entity's Vehicle: ~~ERROR~~ NullPointerException: null
Stacktrace:
    at net.minecraft.entity.player.ServerPlayerEntity.playerTick(ServerPlayerEntity.java:379)
    at net.minecraft.network.play.ServerPlayNetHandler.tick(ServerPlayNetHandler.java:188)
    at net.minecraft.network.NetworkManager.tick(NetworkManager.java:250)

-- Ticking connection --
Details:
    Connection: net.minecraft.network.NetworkManager@20737ec4
Stacktrace:
    at net.minecraft.network.NetworkSystem.tick(NetworkSystem.java:152)
    at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:903)
    at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:821)
    at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:120)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:662)
    at java.lang.Thread.run(Thread.java:748)

-- System Details --
Details:
    Minecraft Version: 1.15.2
    Minecraft Version ID: 1.15.2
    Operating System: Windows 10 (amd64) version 10.0
    Java Version: 1.8.0_261, Oracle Corporation
    Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 435238600 bytes (415 MB) / 1243086848 bytes (1185 MB) up to 1873805312 bytes (1787 MB)
    CPUs: 12
    JVM Flags: 1 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
    ModLauncher: 5.1.2+70+master.2845bb9
    ModLauncher launch target: fmluserdevclient
    ModLauncher naming: mcp
    ModLauncher services: 
        /eventbus-2.2.0-service.jar eventbus PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar object_holder_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar runtime_enum_extender PLUGINSERVICE 
        /accesstransformers-2.1.3-shadowed.jar accesstransformer PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar capability_inject_definalize PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar runtimedistcleaner PLUGINSERVICE 
        /forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-launcher.jar fml TRANSFORMATIONSERVICE 
    FML: 31.2
    Forge: net.minecraftforge:31.2.41
    FML Language Providers: 
        javafml@31.2
        minecraft@1
    Mod List: 
        client-extra.jar Minecraft {minecraft@1.15.2 DONE}
        forge-1.15.2-31.2.41_mapped_snapshot_20200514-1.15.1-recomp.jar Forge {forge@31.2.41 DONE}
        main Depression Mod {depression_mod@NONE DONE}
    Player Count: 1 / 8; [ServerPlayerEntity['Dev'/134, l='New World', x=-140.36, y=70.20, z=-5.77]]
    Data Packs: vanilla, mod:forge (incompatible), mod:depression_mod
    Type: Integrated Server (map_client.txt)
    Is Modded: Definitely; Client brand changed to 'forge'

Link to comment
Share on other sites

12 hours ago, Zemelua said:

ClientPlayerEntity player = Minecraft.getInstance().player; //getInstance().playerをplayerにぶち込む LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); //playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental();

Reaching across logical sides. Don't ever do this.

13 hours ago, Zemelua said:

LazyOptional<PlayerMentalInterface> cap = Minecraft.getInstance().player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); cap.orElseThrow(IllegalArgumentException::new).setMental(currentMental);

We've already went over not to use this.

13 hours ago, Zemelua said:

Registration of network channels is locked

This is the actual error. You're trying to register your network too late. You probably also haven't registered the message either.

13 hours ago, Zemelua said:

public static class Handle { public static DistExecutor.SafeRunnable handleClient(int currentMental) { return new DistExecutor.SafeRunnable() { @Override public void run() { LazyOptional<PlayerMentalInterface> cap = Minecraft.getInstance().player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY); cap.orElseThrow(IllegalArgumentException::new).setMental(currentMental); } }; } }

This entire thing is a hack. Isolate the code in a different class an use the unsafe version of DistExecutor.

Link to comment
Share on other sites

I'm sorry. I'm still not familiar with network systems. I've read the documentation and some commentary over and over again to understand the rough mechanics (which allows the server / client to exchange data with each other via packets), but specifically which method does what. I'm not sure what it is (what the encode and decode are doing, which method is actually passing the data, etc.) ... if you like, I'll explain it in detail. Could you please?

Link to comment
Share on other sites

In you encode you are writing data from the instance of the packet class to the buffer that is going to be send to the client/server. In decode you are reading the data of the buffer, and pass it into the instance of the packet class which is what handle() will receive and proceed with it.

Edited by poopoodice
Link to comment
Share on other sites

public class PlayerMentalCapabilityMessage {
	ClientPlayerEntity player = Minecraft.getInstance().player;  //getInstance().playerをplayerにぶち込む
	LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
		//playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む
	int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental();
	//int currentMental = ((PlayerMentalInterface) playerMentalInterface).getMental();  //playerMentalInterfaceからmentalの値を取得してcurrentMentalにぶち込む

	public PlayerMentalCapabilityMessage(int currentMental) {
		this.currentMental = currentMental;
	}

	public static void encode(PlayerMentalCapabilityMessage message, PacketBuffer buf) {
		buf.writeInt(message.currentMental);  //currentMentalの値をバッファーにぶち込む
	}

	public static PlayerMentalCapabilityMessage decode(PacketBuffer buf) {
		int currentMental = buf.readInt();  //バッファーから値を取得する
		return new PlayerMentalCapabilityMessage(currentMental);  //バッファーから取得した値でPlayerMentalCapabilityMessage(int)をインスタンス化

	}

	public static void handle(PlayerMentalCapabilityMessage message, Supplier<NetworkEvent.Context> ctx) {
		ctx.get().enqueueWork(() -> {
			DistExecutor.safeRunWhenOn(Dist.CLIENT, () -> Handle.handleClient(message.currentMental));
		});
		ctx.get().setPacketHandled(true);
	}

	//@SuppressWarnings("resource")
	public static class Handle {
		public static DistExecutor.SafeRunnable handleClient(int currentMental) {
			return new DistExecutor.SafeRunnable() {
				@Override
				public void run() {
					LazyOptional<PlayerMentalInterface> cap = Minecraft.getInstance().player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
					cap.orElseThrow(IllegalArgumentException::new).setMental(currentMental);
				}
			};
		}
	}
}

Sorry. this is.

Link to comment
Share on other sites

I'm not sure why you still have this

	ClientPlayerEntity player = Minecraft.getInstance().player;  //getInstance().playerをplayerにぶち込む
	LazyOptional<PlayerMentalInterface> cap = player.getCapability(PlayerMentalCapabilityRegistry.PLAYER_MENTAL_CAPABILITY);
		//playerからキャパビリティを取得してplayerMentalInterfaceにぶち込む
	int currentMental = cap.orElseThrow(IllegalArgumentException::new).getMental();

You have the value that has passed in to the contructor, just store it there, and use it when needed.

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
    • I am unable to do that. Brigadier is a mojang library that parses commands.
  • Topics

×
×
  • Create New...

Important Information

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