Development Assistance Create custom ender dragon, with no boss bar and not moving

Discussion in 'Plugin Help/Development/Requests' started by Ryzzzen, Apr 21, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Ryzzzen

    Hi, i want to create a custom ender dragon, without boss bar, and i don't want to let it move. I think we can do it with NMS, but i really don't know where to search. I hope you can help me !
    Sorry for my bad english :(

    EDIT: Is there a javadoc-like for NMS ? Maybe i'm saying anything, but it could help me
     
  2. Offline

    mine-care

    @Ryzzzen You essentially need to create a custom EntityEnderDragon class so make a class that extends EntityEnderDragon and override the methods you want there, Search on google for Custom Entities tutorial you will find a ton :- )
     
  3. Invisible

    nverdier

    No.
     
  4. Offline

    Ryzzzen

    @nverdier :( :( :( :(

    @mine-care I checked here, but almost everything are in letters, a, br, as, bv, bw etc. Is there something for "decrypt" this ?

    My code:

    Code:
    package fr.fukkit.saneros35.legends.entities;
    
    import net.minecraft.server.v1_8_R2.DamageSource;
    import net.minecraft.server.v1_8_R2.EntityEnderDragon;
    import net.minecraft.server.v1_8_R2.World;
    
    public class EntityDragon extends EntityEnderDragon {
    
        public EntityDragon(World world) {
            super(world);
            this.setCustomName("ยง5Dragon");
            this.setCustomNameVisible(true);
            this.fireProof = false;
        }
       
        @Override
        protected boolean dealDamage(DamageSource damagesource, float f) {
            return false;
        }
    
    }
    
     
  5. Offline

    Avygeil

    Yes. Setup a MCP environment for your desired version, and let it use these mappings. You can find what you want there in a much less obfuscated context, but keep in mind it has to be a server side or shared component. Once you know what to override, open your NMS environment, like mc-dev. Using method signatures, you can easily guess the obfuscated names.

    Example from EntityEnderDragon, this shady method is actually :
    Code:
    /**
    * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons
    * use this to react to sunlight and start to burn.
    */
    public void onLivingUpdate() {
      // ...
    }
    This now seems like a good starting point to prevent your dragon from moving.

    Of course you can also guess what a method does. This one isn't that hard considering all the physics in it, but why work with 90% obfuscated code when you can reduce that number.
     
    Ryzzzen likes this.
  6. Offline

    Ryzzzen

    Thanks @Avygeil for help. I'll search more if i can cancel this boss bar.
     
  7. Offline

    teej107

    I think its client side so there is no way to achieve this server side.
     
  8. Offline

    Ryzzzen

    Yep, there is nothing for do it. :'(
     
Thread Status:
Not open for further replies.

Share This Page