Jump to content

Recommended Posts

Posted

I've got a question about the construction of the the child entities that just doesn't make sense to me.

 

I build a setup similar to the enderdragon for multiple parts.  Actually for now, I'm just messing with a head.  Everything is working right and I even went so far as to outline the hitbox corners in flame just to make sure I know where it is on the client (also did on server just to make sure).  Anyhow, I degrees.  The point is its there and in the right spot.

 

Here is the problem, I can't hit it.  It never registers a hit

 

Added this to check

    @Override
    public boolean attackEntityFrom(DamageSource source, float amount) {
    	
    	System.out.println(" - hit");
    	
    	return true;
        //return this.isEntityInvulnerable(source) ? false : this.entityDragonObj.attackEntityFromPart(this, source, amount);
        
    }

 

Now for the question, it doesn't appear in other example and in the enderdragon case they ever spawn these child parts.  If it is never spawned, how does the system know to track include it in a search for a hit? 

 

This is probably obvious and I suspect what I'm messing up.  I've searched and search and don't see it happening in the enderdragon.

Long time Bukkit & Forge Programmer

Happy to try and help

Posted

I think this method: Entity#getParts() is important.

You should return the dragon parts there.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

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



×
×
  • Create New...

Important Information

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