Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. What steps did you follow? If you're using Eclipse, did you run genEclipseRuns?
  2. What aren't you understanding? To remove strafing in skeletons you need to replace the AI of each skeleton with your own one that doesn't tell the skeleton to strafe. You do this by 1) Having your own implementation of RangedBowAttackGoal that doesn't strafe 2) Replacing the AI of each skeleton with your own AI implementation The EntityJoinWorldEvent gives you access to all entities that join the world. You want to subscribe to this event. Whenever an entity is added to a world you're code will be called. You want to check if the entity is a skeleton, and if so replace it's AI. Because AbstractSkeletonEntity#aiArrowAttack is private and final, you need to use an Access Transformer to make it public and non-final so that you can replace it. Because all of the fields in RangedBowAttackGoal are private, you'll probably want to AT them to public with public net.minecraft.entity.ai.goal.RangedBowAttackGoal * # all fields. The most compatible way to remove the strafing would probably be to just set strafingTime to -2 right before calling super/delegate.tick().
  3. Java is very fast, and the JNI has a lot of overhead. You also sacrifice Java's main benefit - being able to run on any system. I would try to find a port of the libraries to Java, or porting them yourself before you commit to using the JNI.
  4. You can AT (AccessTransform) AbstractSkeletonEntity#aiArrowAttack from private final to public and then set it to your own one. For maximum compatibility, use a delegating RangedBowAttackGoal. The AT for AbstractSkeletonEntity#aiArrowAttack would be public-f net.minecraft.entity.monster.AbstractSkeletonEntity field_85037_d # aiArrowAttack (According K9)
  5. Post your full log and your code (preferably as a GitHub repo)
  6. No. You only made the method static. You also need to annotate the class with @Mod.EventBusSubscriber for it to be a static event subscriber.
  7. Make your own thread.
  8. Does your code get called? I would recommend using a static event subscriber instead. Check if event#entity is a skeleton, and if so change it's AI.
  9. Probably because no-one's needed it before. If you want it, submit a PR. There are instructions on how to do here (1.13+ instructions here).
  10. These haven't changed, you're just on old mappings
  11. Put it in a client-only event subscriber. Don’t use SideOnly/OnlyIn for this stuff. It was not designed for this and it’s a dirty hack that should almost never be used.
  12. This error is caused by a persons Java version being so old that it doesn’t support LetsEncrypt, the security provider that Forge uses. So no, reinstalling Forge won’t fix this.
  13. Please post your logs as described in my signature and the EAQ
  14. You would subscribe to the EntityJoinWorld event, check if the entity is a skeleton and if so modify its task list.
  15. I don’t think that much else changed. What problems are you having?
  16. If everything else fails, you can registry replace BlockFire.
  17. Look at how vanilla moves items around in the inventory.
  18. You should return LazyOptional.of(() -> yourCapabilityInstance).cast(); in getCapability, or even better, store LazyOptional.of(() -> yourCapabilityInstance) in a field to reduce the number of objects that you create.
  19. Probably a problem with this mod
  20. Does the code get called? Are you passing the parameters that you want into the RenderSnowball constructor? No.
  21. Since its protected, you can either extend the class, use an AccessTransformer or use Reflection.
  22. I don't see any reason for this to be true. A TESR is just your code being called at a specific time. There are very few limitations on what you can do in your code.
  23. Call RenderingRegistry.registerEntityRenderingHandler(Entity___.class, Entity___Renderer::new); in the ModelRegistry event https://gist.github.com/Cadiboo/3f5cdb785affc069af2fa5fdf2d70358#file-clienteventsubscriber-java-L69
  24. Don't use the runClient gradle task. Use your run/launch configs from inside your IDE. Post the full log (using GitHub Gist or Pastebin)
×
×
  • Create New...

Important Information

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