Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. You could use events or registry replace the block. Events will be more compatible.
  2. https://mcforge.readthedocs.io/en/1.15.x/events/intro/
  3. You could hand write a list of biomes the tulips are normally on, or loop every biome and check if it has tulips in it.
  4. OpenGL is a rendering engine. If you want to have buttons like Minecraft's ones you should be using Minecraft's system. In your Screen, you’re going to want to have a Widget. This widget should be one of the children of your Screen. The widget can then set its position to the position of the mouse after it’s clicked and then stop setting its position when it’s clicked again.
  5. It’s a community project, anyone can contribute. Unfortunately they seem to be pretty slow in accepting PRs, same as in the main Forge repo.
  6. Update your mappings
  7. Forge's Slider has a drag & drop-ish feature, maybe look at that? You can also set Widget's positions with the forge-added setters.
  8. How does vanilla do it for Zombie Pigmen?
  9. Yes. It also allows for multiple render types though.
  10. Ah. Remove that hack and override getSpawnPacket or whatever it’s called in your entity and return NetworkHooks.getSpawnPacket(this) (I think)
  11. The very first library...
  12. AIs used to work off a task list and that task list used to be public. If they still work off a task list, you can just edit that list. Anyway, you’re not modifying the original squids AI, you’re modifying your squids AI. Correct me if I’m wrong but you can just instantiate your own subclass of FleeGoal and add it to your task list (after removing the original flee goal if necessary)
  13. You would start by looking at vanilla’s implementation in referenced/external libraries, then seeing all the things that are wrong with it, then seeing what you can improve, then making your own implementation.
  14. I was in a hurry when I wrote that and I noticed your setting/getting item refs and thought it could be an issue. I’m not sure what the issue is, can you please post your code on GitHub?
  15. You can add a priority to your @SubscribeEvent annotation to ensure you run before/after other listeners. One thing you may have forgotten is that Items are Singletons. I.E. there is only one (the one you register) in the game. Other than that I don’t see any glaring issues, you’ve debugged and noticed that neither your renderer or the vanilla arrow renderer is being called for your entity?
  16. Here’s a list of pre requisites for modding that include some good java tutorials.
  17. Everything you want to do is possible, but I’m general it causes bad things to happen and is highly discouraged. If you want to do what you’ve mentioned right and compatibly it will require quite a bit of work to do right as you will need to deal with situations where objects haven’t been registered when a client connects to a sever. How are you planning on handling this? You’re also going to need to handle all assets (models, textures) and data (recipes) in a compatible way that allows them to be overriden by resource and data packs. If you’re trying to register objects only if another mod is present, there are other, more compatible ways of adding mod-specific content. You’ve been meant to use the registry events since 1.7.10. If everybody used the registry events correctly, dynamic registration would be possible, but people don’t and therefore supporting universal dynamic registration becomes impossible. If you were a bit more clear about what you were doing and why you might find that people were more helpful. For example instead of saying “I want to do something that is discouraged because of how difficult it is to do right and incompatible with badly made mods it is” you could lay out why you want to do this, what you plan on doing in your mod and how you’re planning on handling edge cases (such as unregistered objects on connection) to ensure that everything continues to work properly.
  18. It was both Mojang and Forge that made these changes but I quite agree about hot it’s cleaner.
  19. Look under Referenced/External Libraries in your IDE. Here's what it looks like in IntelliJ:
  20. Ouch, yeah. For anyone else who thinks of downloading it, here it is i tried copypasting the squid ai to my custom squid, but it gave a lot of bugs. here is my entitylist class: <ItemList class copied from HarryTalks or similar, static initialisers for EntityTypes> my MutantSquid class: <Copy past of minecraft entity squid class (maybe with a couple tweaks?)> and the vanilla squid class, for convenience: <Copy past of minecraft entity squid class> if you were to help me, thank you. i can't figure this one out by myself. Thanks, but you've set it up a couple folders too low. Here's what a properly set up GitHub repository should look like. While we're at it, here's what a proper registration class looks like and here's what a simple entity looks like. As you can see, the better way of doing entities is extending a vanilla class and then overriding behaviour. I would do this by extending the squid and adding an AI task that swims towards a "target". I would also override the update method and periodically recalculate that target. I have no experience with AIs, so I'm not sure if that's the tight approach, but that's what I would start off with. If you keep checking my example mod, I'm planning on adding an AI that charges at players to my Wild Boar as soon as I get some spare time.
  21. That’s the way it was in 1.12.2, it changed in 1.13
  22. Sorry I can’t help more, but have you tried stepping through what’s happening in the debugger and seeing why the arms are being rendered?
  23. Please use a service like GitHub, GitHub Gist or Pastebin for sharing code. Also don’t share Mojang’s intellectual property (their copyrighted code) online. Other than that, great question and I’ll come back to answer it once I’m on a device that can open that file.
  24. You could also emphasise the progression by having unique textures that look good or your own custom models.
  25. Use World#addEntity. Make sure to use EntityType#create, not the class constructor. You can then use Entity#setPosition (or similar). In future please try looking at the vanilla code first, it’s very helpful (you are modding their game) and you could have answered this question yourself by looking at any vanilla code that spawns an entity.
×
×
  • Create New...

Important Information

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