Jump to content

How to ose non cubic model as mod-item?


Drachenbauer

Recommended Posts

1 hour ago, Drachenbauer said:

but in "SharedMonsterAttributes" i cannot find the "ENTITY_GRAVITY" attribute.

6 hours ago, diesieben07 said:

You need to use ForgeMod.ENTITY_GRAVITY,

 

1 hour ago, Drachenbauer said:

If i replace "SharedMonsterAttributes" with "ForgeMod", it also cannot find "ENTITY_GRAVITY" in there...

No idea what you are doing, but it definitely exists:

https://github.com/MinecraftForge/MinecraftForge/blob/93c00b67d97b4c51dff4c807e29556bf8a9b7548/src/main/java/net/minecraftforge/common/ForgeMod.java#L97

Link to comment
Share on other sites

I try to use this:

public Multimap<String, AttributeModifier> getAttributeModifiers(EquipmentSlotType equipmentSlot)
    {
        Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(equipmentSlot);
        
        if (equipmentSlot == EquipmentSlotType.MAINHAND)
        {
            multimap.put(LivingEntity.ENTITY_GRAVITY.getName(), new AttributeModifier(LivingEntity.SLOW_FALLING_ID, "Slow falling acceleration reduction", -0.07, AttributeModifier.Operation.ADDITION).setSaved(false));
        }
        
        return multimap;
    }
  

But i still have a problem with this line:

multimap.put(LivingEntity.ENTITY_GRAVITY.getName(), new AttributeModifier(LivingEntity.SLOW_FALLING_ID, "Slow falling acceleration reduction", -0.07, AttributeModifier.Operation.ADDITION).setSaved(false));

i cannot use LivingEntity.SLOW_FALLING_ID, because it´s private

So i tryed this:

multimap.put(LivingEntity.ENTITY_GRAVITY.getName(), LivingEntity.SLOW_FALLING);

But LivingEntity.SLOW_FALLING is also private.

what is the right setup for this line?

Link to comment
Share on other sites

6 minutes ago, Drachenbauer said:

In the existing one letters where uppercase, in the one from the page, letters are lowercase.

Does this matter?

Please try to get into the habit of doing some very basic research.

The UUID instance is created using UUID.fromString in the example. Searching for "Java uuid from string case sensitive" leads to this very informative StackOverflow post: https://stackoverflow.com/a/13833488. I recommend you read and understand it before working with UUIDs.

Link to comment
Share on other sites

https://www.youtube.com/watch?v=6te-IdUIBdY

here he hoints his arm up while holding an umbrella.at the end of the video.

 

but there in no link to the mod with the umbrella...

 

I notived, i fall slower with the umbrella, bot still get a tiny little bit of damage on landing.

How to remove the fall damage compleetely, if holding that item?

 

Edit: i canceled the LivingFallEvent, if holding the umbrella.

Now i can jump from as high as i want with the umbrella without being damaged.

Edited by Drachenbauer
Link to comment
Share on other sites

  • 2 weeks later...

I noticed, that i can jump higher, if holding this umbrella.

Than i saw a video of someone, who made a tower of scaffolding, placed a cage of scaffolfing ontop and filled it with chckens.

Then he removed the bottom scaffolding and the chickens fell down slowly and took no damage at landing on the ground.

how can i attach this exact behavior to my umbrella?

 

In the ChickenEntitx-Class i find just this:

    public boolean onLivingFall(float distance, float damageMultiplier)
    {
        return false;
    }

But nothing about the falling-speed.

Edited by Drachenbauer
Link to comment
Share on other sites

now i try this solution:

https://forums.minecraftforge.net/topic/83298-solved-1152-different-item-model-when-rendered-in-the-inventory-vs-handheld/

 

It uses the deprecated variant of getQuads.

but if i try to replace it with the better one, new IBakedModel() says, that i have to use the old one, because it´s an unimplemented method.

How can i use the new one without this error?

 

Now i found IForgeBakedModel.

How can i use it instead of IBakedModel here?

Edited by Drachenbauer
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now


×
×
  • Create New...

Important Information

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