-
Recently Browsing
No registered users viewing this page.
-
Posts
-
By bloomerlol · Posted
I've tried many things like clearing my mods folder, restarting Minecraft, and reinstalling forge but it just seems to not work. -
Hi, I'm trying to change the sprinting modifier for an entity extended from a HorseEntity. I have tried overriding the setSprinting method from LivingEntity like so. private static final UUID SPEED_MODIFIER_SPRINTING_UUID = UUID.fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D"); private static final AttributeModifier SPEED_MODIFIER_SPRINTING = new AttributeModifier(SPEED_MODIFIER_SPRINTING_UUID, "Sprinting speed boost", 5.0D , AttributeModifier.Operation.MULTIPLY_TOTAL); @Override public void setSprinting(boolean p_70031_1_) { this.setSharedFlag(3, p_70031_1_); ModifiableAttributeInstance modifiableattributeinstance = this.getAttribute(Attributes.MOVEMENT_SPEED); if (modifiableattributeinstance.getModifier(SPEED_MODIFIER_SPRINTING_UUID) != null) { modifiableattributeinstance.removeModifier(SPEED_MODIFIER_SPRINTING); } if (p_70031_1_) { modifiableattributeinstance.addTransientModifier(SPEED_MODIFIER_SPRINTING); } } But the method does not seem to be run when sprinting. The only other way I can think to do this is using an access transformer to make the modifier public. Any help would be greatly appreciated.
-
I've been trying to make a block loot table that when broken with silk touch has a 1/3 chance to drop an item. I've looked for documentation on this but haven't had any luck.
-
And how can I use it in my mod? I think I need to use keytool but does that mean everyone who uses my mod will have to use keytool too?
-
-
Topics
-
Who's Online (See full list)
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.