McJtyMods / RFToolsUtility

Everything from RFTools that doesn't fit in its own mod
MIT License
18 stars 17 forks source link

[1.19.2] Ender Dragon Syringe not possible #187

Open puchm opened 1 year ago

puchm commented 1 year ago

It seems like the syringe is not picking up the Ender Dragon. I am hitting it with the syringe and it doesn't seem to fill it up in any way.

This may be related to https://github.com/McJtyMods/RFTools/issues/255.

I am running: Allthemods 8 v1.0.22 RFTools Utility 1.19-5.1.7 RFTools Base 1.19-4.1.7

puchm commented 1 year ago

This is how it worked in the original implementation up until 1.12 - I'd suggest doing the exact same thing?

private static @Nullable EntityLiving getEntityLivingFromClickedEntity(Entity entity) {
    if(entity instanceof EntityLiving) {
        return (EntityLiving)entity;
    } else if(entity instanceof MultiPartEntityPart) {
        IEntityMultiPart parent = ((MultiPartEntityPart)entity).parent;
        if(parent instanceof EntityLiving) {
            return (EntityLiving)parent;
        }
    }
    return null;
}