Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Drachenbauer

Members
  • Posts

    724
  • Joined

  • Last visited

Posts posted by Drachenbauer

  1. 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?

  2. 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.

  3. Hello

     

    I noticed, if i use annotations like

    @Mod.EventBusSubscriber(Dist.CLIENT)

    or

    @OnlyIn(Dist.CLIENT)

    Eclipse cannot autocompleete the "Dist" in the brackets.

    it only tells me, that it does not know the word "Dist" and does not give me this import as a click-option:

    import net.minecraftforge.api.distmarker.Dist;

    Everytime i have to find, copy and paste this import manually.

     

    Why the autocompleete does not work here?

  4. 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.

  5. 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?

  6. i thaught, this is the way to add a modifyer...

    You told me to look in Entity living.

    And i thaught, this is the way, it is used there.

     

    in the sword i founf this:

    public Multimap<String, AttributeModifier> getAttributeModifiers(EquipmentSlotType equipmentSlot) {
          Multimap<String, AttributeModifier> multimap = super.getAttributeModifiers(equipmentSlot);
          if (equipmentSlot == EquipmentSlotType.MAINHAND) {
             multimap.put(SharedMonsterAttributes.ATTACK_DAMAGE.getName(), new AttributeModifier(ATTACK_DAMAGE_MODIFIER, "Weapon modifier", (double)this.attackDamage, AttributeModifier.Operation.ADDITION));
             multimap.put(SharedMonsterAttributes.ATTACK_SPEED.getName(), new AttributeModifier(ATTACK_SPEED_MODIFIER, "Weapon modifier", (double)this.attackSpeed, AttributeModifier.Operation.ADDITION));
          }
    
          return multimap;
       }

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

    So how els can i put this attribute there?

     

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

    The only appearens of "ENTITY_GRAVITY", that i can find, is in "LivingEntity"

  7. for slow falling, i added

        private static final UUID SLOW_FALLING_ID = UUID.fromString("A5B6CF2A-2F7C-31EF-9022-7C3E7D5E6ABA");
        private static final AttributeModifier SLOW_FALLING = new AttributeModifier(SLOW_FALLING_ID, "Slow falling acceleration reduction", -0.07, AttributeModifier.Operation.ADDITION).setSaved(false);
        public static final net.minecraft.entity.ai.attributes.IAttribute ENTITY_GRAVITY = new net.minecraft.entity.ai.attributes.RangedAttribute(null, "forge.entity_gravity", 0.08D, -8.0D, 8.0D).setShouldWatch(true);

    above the constructor in the UmbrellaItem class and

            IAttributeInstance gravity = player.getAttribute(ENTITY_GRAVITY);
            gravity.applyModifier(SLOW_FALLING);
            player.fallDistance = 0.0F;

    in "onUsingTick".

    but falling is as fast as normal and i see the collison-particles on landing.

    Must i place the lines in the seccond code-snippet into another method?

  8. Now i schanged my .mtl files to this:

    # Blender MTL File: 'Umbrella.blend'
    # Material Count: 1
    
    newmtl Material
    Ns 225.000000
    Ka 1.000000 1.000000 1.000000
    Kd 0.800000 0.800000 0.800000
    Ks 0.500000 0.500000 0.500000
    Ke 0.0 0.0 0.0
    Ni 1.450000
    d 1.000000
    illum 2
    map_Kd umbrellamod:model/black_umbrella

    It´s the same path-style as for the boomerang in the examples mod.

    But i still get sometimes this error but sometimes i can enter the game, but the umbrellas have the black and purple error-texture...

     

    Edit:

    now it works. maybe it just needed some refreshes...

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.