Jump to content

Drachenbauer

Members
  • Posts

    727
  • Joined

  • Last visited

Everything posted by Drachenbauer

  1. i´m trying to tell minecraft to use my modyfied candle block class for the existing candle-block. This post https://stackoverflow.com/questions/29523975/change-final-variable-defined-in-another-java-file told, that it should be possible to override ecisting classes from minecraft by recreating the original package-path from the minecraft referenced library into the src/java folder of the mod and put the changed class with original name in there. But now i get an error: java.lang.module.ResolutionException: Modules candlepositionsmod and minecraft export package net.minecraft.world.level.block to module forge at java.base/java.lang.module.Resolver.resolveFail(Resolver.java:901) at java.base/java.lang.module.Resolver.failTwoSuppliers(Resolver.java:815) at java.base/java.lang.module.Resolver.checkExportSuppliers(Resolver.java:736) How to fix?
  2. Hello I created a mod, where i recreated model, text-layout and other stuff for the build-in signs in an older version of minecraft forge, where it worked properly. Now i´m updating it, but i found a problem: When i open the sign edit screen, i want to instantly replace it with my own. But the class has now 3 constructor arguments. The first one is the SignTileEntity, and i tried to get it through the ObfuscationReflectionHelper, but none of the names of the matching fild in the class AbstractSignEditScreen can be found during a testrun How can i get the used SignBlockEntity to pass it into the constructor of my edited screen?
  3. On the web there are a lot of custom player totem resource-packs available. But they all require a copy of the player-skin-texture renamed as the totem-texture. This requires reinstalling the pack every time, when you change your player-skin. So i think about making a mod to reproduce how player-head-blocks get their texture. How can i do this while using a a custom json item-model, that i created in blockbench, that a player-skin fits on? I taught about having both arm sizes in the model and find a way to detect the model width (3-pix-arms or 4-pix-arms), that the given player uses to hide or shor each arms on the model. Best regards Maxi
      • 1
      • Like
  4. 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?
  5. Hello If i follow this link to Forge documentations: https://mcforge.readthedocs.io/en/1.15.x/models/advanced/introduction/ I only see text on white ground, no graphics of the page-design... Why this?
  6. Is there any way to give it a classic "item/generated"-sprite for displaying in gui or item-frame and keep the .obj-model for all other display-types (laying on ground and all equip-variants)
  7. finally i got the mod with the umbrella, that uses an arm up pose, and they use the THROW_SPEAR pose for this. So i make it this way, too.
  8. Now i used PlayerTickEvent. With this, i could check for holding the umbrella very similar to the LivingFallEvent. And after testing, it looks very much like gliding with a parachute. That´s what i want. It reminds me also abit to elythra-flying.
  9. in tick event, how can i check, if the player holds the umbrella? there are not the same methods as in EntityFallEvent.
  10. I found this: Vec3d vec3d = this.getMotion(); if (!this.onGround && vec3d.y < 0.0D) { this.setMotion(vec3d.mul(1.0D, 0.6D, 1.0D)); } But how can i apply this to the player, if holding the umbrella?
  11. 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.
  12. 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?
  13. 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.
  14. i added an itemstack-argument to the method and it´s super-call and now the warning is gone. and the slow falling works now.
  15. I cannot find a replacement for the deprecated "getAttributeModifiers". i see nothing else about attributes there.
  16. In the existing one letters where uppercase, in the one from the page, letters are lowercase. Does this matter? And i cannot find infos about what to use instead of "getAttributeModifiers", that is deprecated
  17. are there any rules for this id?
  18. How do i make my own modifyer? I want it exactly the same as the existing slow falling effect. Some posts ago you told me, copying the stuff from LivingEntity is not the right way.
  19. 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?
  20. if i open this ForgeMod Class fron the Reference Libraries in my ide it does not contain theese lines, that are highlighted in your link. Maybe its added there since 1.16... Is it anywhere else in 1.15?
  21. 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"
  22. 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?
  23. Now i added a set of closed umbrellas. how do i now make the change on rightclick?
  24. now i creadtd a model for closed umbrella, how can i make one click on the equipped umbrella opens it and another click closes it? And how can i make slow falling and soft landing while the umbrella is open
  25. third person. im first person the umbrella is already positioned correctly.
×
×
  • Create New...

Important Information

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