Jump to content

MairwunNx

Members
  • Posts

    89
  • Joined

  • Last visited

Posts posted by MairwunNx

  1. I don't know what causes this crash, but my mods.toml fully corresponds to documentation on official forge documentation. My mod crashes after updating forge from 28.1.X to 28.2.0. I also checked existing mods.toml in bundle. 

     

    Super short stacktrace:

    [1;31m[20:40:59] [Server thread/ERROR] [minecraft/MinecraftServer]: Encountered an unexpected exception
    net.minecraftforge.fml.LoadingFailedException: Loading errors encountered: [
            mods.toml missing metadata for modid project_essentials_cooldown,
            mods.toml missing metadata for modid project_essentials_permissions
    ]
            at net.minecraftforge.fml.ModLoader.gatherAndInitializeMods(ModLoader.java:179) ~[?:?] {re:classloading}
            at net.minecraftforge.fml.server.ServerModLoader.begin(ServerModLoader.java:45) ~[?:?] {re:classloading}

     

    and short stacktrace from client:

     

    [20Mar2020 20:33:35.073] [Client thread/FATAL] [net.minecraftforge.fml.ModLoader/CORE]: Failed to initialize mod containers
    net.minecraftforge.fml.ModLoadingException: mods.toml missing metadata for modid project_essentials_cooldown
    	at net.minecraftforge.fml.ModLoader.lambda$buildModContainerFromTOML$29(ModLoader.java:233) ~[?:?]
    	at net.minecraftforge.fml.ModLoader$$Lambda$2110/542220524.get(Unknown Source) ~[?:?]
    	at java.util.Optional.orElseThrow(Optional.java:290) ~[?:1.8.0_51]
    	at net.minecraftforge.fml.ModLoader.buildModContainerFromTOML(ModLoader.java:233) ~[?:?]

     

    mods.toml:

     

    modLoader="javafml"
    loaderVersion="[28,)"
    issueTrackerURL="https://github.com/ProjectEssentials/ProjectEssentials-Permissions/issues"
    
    [[mods]]
        modId="project_essentials_permissions"
        version="1.14.4-1.2.1"
        displayName="Project Essentials Permissions"
        updateJSONURL="https://raw.githubusercontent.com/ProjectEssentials/ProjectEssentials-Permissions/MC-1.14.X/update.json"
        displayURL="https://github.com/ProjectEssentials/ProjectEssentials-Permissions"
        credits="Thanks JetBrains for Intellij IDEA license!"
        authors="MairwunNx (Pavel Erokhin)"
        description='''
        Project Essentials Permissions - additional module for Essentials;
        Just controlling player permissions.
    
        Also it just permission API for forge.
        '''
    
    [[dependencies.project_essentials_permissions]]
        modId="project_essentials_core"
        mandatory=true
        versionRange="[1,)"
        ordering="NONE"
        side="BOTH"
    
    [[dependencies.project_essentials_permissions]]
        modId="forge"
        mandatory=true
        versionRange="[28,)"
        ordering="NONE"
        side="BOTH"
    
    [[dependencies.project_essentials_permissions]]
        modId="minecraft"
        mandatory=true
        versionRange="[1.14.4]"
        ordering="NONE"
        side="BOTH"
    

     

  2. In 1.12.2, many used `FMLPreInitializationEvent` and called the `getModLogger` method, but now this is not, and this is not in the list of changes since `1.12.2`, I did not find anything related to the logger, I want to have logging to another file, but with a similar configuration like Forge (i found log4j.xml in forge). How can I create several different log configurations now? In any case, currently writing to the general log force :( (latest.log).

     

    I tried `Configurator.initialize` and `LoggerContext#getLogger("...")`, but this does not affect the logging in any way, it still logs in `latest.log`.

  3. 20 hours ago, BoredPerson said:

    I believe if you want to modify base classes you will have to use ASM or reflection. Most of the time this is not needed depending on what you are doing. What is it that you are specifically trying to accomplish?

    In simple words, I want to make unregister that command and register your own.

    Or simply register on top, thereby replacing the minecraft vanilla command.

  4. 52 minutes ago, Codemetry said:

    Bump.

    I have updated to 1.14.4 - 28.1.0.

    I did some testing and found that:

    • EntityJoinWorldEvent is fired once when joining a server (and a world) from the multiplayer menu
    •  EntityJoinWorldEvent is fired multiple times (usually 6 - 10) when switching between worlds on a server or servers on a bungee network
    • The Worlds returned by EntityJoinWorldEvents are not the same instance
    • The EntityJoinWorldEvents are not the same instance (that means I did not register more than once)

    I have already added the following check into EntityJoinWorldEvent handler

    
    mc.thePlayer == event.entity

    Here is my handler in case:

    
    	@SubscribeEvent
    	public void onEntityJoinWorld(EntityJoinWorldEvent event) {
    		if (mc.thePlayer == event.entity) {
    			mc.thePlayer.addChatMessage(
    					new ChatComponentText("hello"));
    		}
    	}

    Does anyone know why this is happening?

    if you updated to 1.14.4: Where did you get the method `addChatMessage` and `ChatComponentText` class?

  5. 2 minutes ago, diesieben07 said:

    No, this is not the solution.

    Right. But if he does not need him the mod and he does not know why minecraft crashes, then removing it will be the right decision.

  6. 51 minutes ago, Differentiation said:

    Clone, not PlayerRespawnEvent.

    ```kotlin

    @SubscribeEvent

    fun onPlayerRespawn(event: PlayerEvent.PlayerRespawnEvent) {

    ```

     

     

    ```java

    @SubscribeEvent

    public void onPlayerRespawn(PlayerEvent.PlayerRespawnEvent event) {

    ```

     

    upd: sorry, I thought you did not find the event.

  7. 20 hours ago, superhize said:

    [Reposted cause 1.8.9 is not supported here]

     

    Hello, i would like to make a mod that merge same message in chat.

     

    Instead of this

    KIGSnFI.png

     

    i want this

     

    q2fv2i7.png

     

    As i sent the same message, first message got edited and number increment.

     

    I think i need to use the ClientChatReceivedEvent but i'm not sure.

     

    I do not know how to explain this clearly, so i hope y'all understand.

     

    (if a similar mod already exist, please link it to me)

     

    I don’t think it’s possible, because you have to delete old user messages and combine them into one, merging messages is easy. But I think it is impossible to delete messages from just one user.

    Can I edit posts? If yes, then you are lucky, if not, then you will need to somehow delete the old messages of this particular user and send an already merged message.

×
×
  • Create New...

Important Information

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