Jump to content

Cadiboo

Members
  • Posts

    3624
  • Joined

  • Last visited

  • Days Won

    58

Everything posted by Cadiboo

  1. This is why ResourceLocation exists
  2. Can you post your final working code for people in the future please? (And mark the topic as solved - edit the original post & add “[SOLVED] “ to the title)
  3. Use a constant and initialise it with LogManager.getLogger(). (That’s what getting the logger has changed to / will change to in more recent versions) Works for me in Forge 2729 and 2768
  4. Try removing the project in eclipse & then rerunning all the commands and then adding it again. Restarting your computer might also help. Make sure that you’ve correctly changed the right build.gradle file.
  5. Don’t just delete your topics, please leave your question, mark it as solved and post your solution to help people who read this in the future
  6. Capabilities are just a way provide a good API for getting stuff from a thing. They are pretty much a better & more compatibile method than using interfaces For example: Using interfaces (example: “IHasInventory”) public class Thing implements IHasInventory { @Override public Inventory getInventory() { // return this thing’s inventory } } With the previous example, using this: if(thing instanceof IHasInventory) { // do stuff } is the same as doing this (with capabilities) if(thing.hasCapability(INVENTORY_CAP)) { // do stuff } I’ll go through & Edit this with my computer later, but the point I’m trying to make is: Capabilities and Interfaces are two different approaches to a problem, with capabilities being the newer and “better” approach. using instanceof with interfaces is the same as using hasCapability with capabilities using ((Interface)object).getThing() with interfaces is the same as using getCapability with capabilities capabilities also allow for extra data to be passed in (like facing in the case of forge’s implementation) which is one of the major advantages of capabilities over interfaces. Also interfaces were designed for something different. Also capabilities use the OOP principle “composition over inheritance” which is what code in all OOP languages globally is changing too.
  7. As I said though you can pm me for some help
  8. I have yet to see a decent YouTube tutorial
  9. Post your working code for people in the future please
  10. This is exactly WHY you should use JSON, they will add their villages with JSON. I'm arguing for JSON advancements because thats the standard (How vanilla does it). If you want to use another method just make sure that it will support data packs etc.
  11. Modding with Minecraft Forge is pretty simple, but it has quite a few conventions & pre-requisites that are unique to it and are actually pretty important and vital to having your mod work properly. You might want to take a look at https://github.com/Cadiboo/Example-Mod. It’s a bare-bones mod setup to allow you to play around and learn the basics of Forge Modding in (in the correct way, using the right conventions etc.).
  12. Are we forgetting 1.7.10 -> 1.8? The entire rendering system changed completely. The flattening itself isn't a problem, its a code choice made by Mojang now that they've (finally) expanded the block ID limit and abstracted away metadata. The real change with 1.13 is Terrain Gen. Also in 1.13 Forge has rewritten its entire mod loading system and should now support Java 9+
  13. What if they disagree, and want to change stuff? If you have it all in code they will have to create a copy of your mod, edit it, redistribute it etc. If you do it in JSON all then need to do is edit the JSON file. Very doable, and not that ugly.
  14. Use JSON whenever possible so resource packs (and data packs in 1.13) can override your stuff.
  15. Sorry we don't support 1.7.10 on this forum anymore due to its age (4+ years old). We simply don't know how to help you anymore. You can go to the Minecraft Forum where I think that they still still support older versions, or update to a modern version of Minecraft (the latest version or the one before it) to receive support on this forum. Try removing lumien
  16. Make a new thread. Don't hijack someone else's
  17. Cadiboo

    .

    I assume have a counter, increment that counter every tick, and only act if the delay has been reached (pseudocode) private static int counter = 0; //inside tick event { counter++; if((counter % interval) == 0) { //do stuff } } or to add pseudocode for @V0idWa1k3r's answer private static final int DELAY = 1 * 20; //1 second; private static int delayCounter = DELAY; //inside tick event { delayCounter--; if(delayCounter == 0) { delayCounter = DELAY; //do stuff } }
  18. Is there a better alternative? Like in preInit or Init?
  19. Post them
  20. This has been said before “these formums are not a java tutorial”. Feel free to pm me on Discord (Cadiboo#8887) if you want help with this though
  21. Ok, do you know what a method is? right now your trying to define a method inside another method. This will never* work. I see you tried to fix your issue by removing “public AxisAlignedBB”, but your still trying to define a method inside a method, you’ve just now mangled the inner method. What you need to do where your trying to define the second (where your sure the entity is a player) method is run some code adding custom bounding boxes (look at fences), and otherwise (if the entity is not a player) call super (or run other logic). *unless your instantiating an anonymous class (which you won’t learn about for a long time and may never need)
  22. JSON stands for JavaScript Object Notation, it’s just a serialised representation of an object. As voidwalker said, learnig java is a lot harder and you’ve already done it.
  23. Learn java. Just the basics, 5 minutes of learning java and you will understand how horribly wrong that is on every level
  24. Sorry, I saw that and jumped to conclusions, still that’s a bad variable name.
  25. Post your code as a GitHub repository. Your going to need some GLStatemanager.rotate s (& translates probably). Your going to want to rotate based on the entities yaw
×
×
  • Create New...

Important Information

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