• 0

    posted a message on How to edit display name ?
    Try/catch is because if the player has 0 death it return null.
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    It's not full code, I have just add
    @ForgeSubscribe
    public void displayName(PlayerEvent.NameFormat event) {
    event.displayname = event.username + " (" + getDeathCount(((EntityPlayer)event.entityLiving).username) + " Deaths)";
    System.out.println(event.displayname);
    System.out.println(event.username);
    System.out.println(((EntityPlayer)event.entityLiving).username);
    System.out.println(getDeathCount(((EntityPlayer)event.entityLiving).username));
    }

    in ichun's deathcounter source. You can find his mod here: http://ichun.us/mods/death-counter/ (sources are in the mod)
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    Public int getDeathCount(String s) {
    try{
    return deathCounter.get(s);
    }
    catch(NullPointerException e) {
    return 0;
    }
    }
    @ForgeSubscribe
    public void displayName(PlayerEvent.NameFormat event) {
    event.displayname = event.username + " (" + getDeathCount(((EntityPlayer)event.entityLiving).username) + " Deaths)";
    System.out.println(event.displayname);
    System.out.println(event.username);
    System.out.println(((EntityPlayer)event.entityLiving).username);
    System.out.println(getDeathCount(((EntityPlayer)event.entityLiving).username));
    }

    In console:

    PlayerNameY (X Deaths)
    PlayerNameY
    PlayerNameY
    X

    In game:

    PlayerNameY (0 Deaths)



    I have just add the displayName function in the ichun's deathcounter.mod
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    When the player die, it always show 0 deaths.

    With LivingDeathEvent I can't edit the player name (I don't know an other way to do it).
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    Thanks, it work but it add 2 deaths for 1 death.

    And I want to know why my code for the mod don't work.
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    up

    I see in the console, PlayerName (X deaths) but in the game PlayerName (0 deaths). What's the problem ?
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    Thanks, it's work but it's not refresh, how to do it ?
    Posted in: Modification Development
  • 0

    posted a message on How to edit display name ?
    Hello,

    I want to edit the display player name in multiplayer in game (not in the chat). I want to show after the player name, his total death (looklike "PlayerX (xxx death)").

    I have successful add fake death in original source but I don't know how to do it in a mod.
    Posted in: Modification Development
  • 0

    posted a message on Galacticraft 4.0.1 [6,400,000+ Downloads!]
    This mod is not compatible with Aether mod:

    ---- Minecraft Crash Report ----
    // My bad.
    
    Time: 20/10/13 16:07
    Description: Unexpected error
    
    java.lang.ClassCastException: micdoodle8.mods.galacticraft.core.client.GCCorePlayerSP cannot be cast to net.aetherteam.playercore_api.cores.IPlayerCoreCommon
        at net.aetherteam.aether.entities.mounts.MountSystem.processDirections(MountSystem.java:36)
        at net.aetherteam.aether.client.ClientTickHandler.tickEnd(ClientTickHandler.java:52)
        at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:34)
        at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:141)
        at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:367)
        at net.minecraft.client.Minecraft.func_71407_l(Minecraft.java:1968)
        at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:908)
        at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:836)
        at net.minecraft.client.main.Main.main(SourceFile:101)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
        at net.minecraft.launchwrapper.Launch.main(Launch.java:18)
    
    
    A detailed walkthrough of the error, its code path and all known details is as follows:
    ---------------------------------------------------------------------------------------
    
    -- Head --
    Stacktrace:
        at net.aetherteam.aether.entities.mounts.MountSystem.processDirections(MountSystem.java:36)
        at net.aetherteam.aether.client.ClientTickHandler.tickEnd(ClientTickHandler.java:52)
        at cpw.mods.fml.common.SingleIntervalHandler.tickEnd(SingleIntervalHandler.java:34)
        at cpw.mods.fml.common.FMLCommonHandler.tickEnd(FMLCommonHandler.java:141)
        at cpw.mods.fml.common.FMLCommonHandler.onPostClientTick(FMLCommonHandler.java:367)

    Posted in: Minecraft Mods
  • 0

    posted a message on A removed mod thing
    Hi,Can you make a mod with this boss 4:55, we can find him in a dungeon in Nether or an other dimension. It will be very amazing ! :D
    Posted in: WIP Mods
  • 0

    posted a message on Mutant Creatures - Spider Pig, Spider Pig [v1.4.9]
    @Tocaraca2: I have the same error as roxasfan13. I have tried "AnimationAPI v1.1.0 mc1.6.2" and "AnimationAPI v1.0.0"
    Posted in: Minecraft Mods
  • To post a comment, please or register a new account.