Jump to content

Turtledove

Members
  • Posts

    167
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Turtledove

  1. Yup that was it. God damn I can't believe I forgot about the most basic shit, staying up all night was not a good idea... thanks though ?
  2. Because ticksAlive and ticksLifetime are being set to 0 and 0, I tried printing both outside of the condition in tick(), and it prints: (0,0) (0,100) (0,0) (1,100) (0,0) (2,100) ....etc. So for some reason there are two instances being created, and it isn't letting me do anything.
  3. I'm trying to implement a magic circle that would appear below the players' feet whenever they start casting a spell. So far it all worked fine. In my game logic, whenever I create the object by calling its "non-default" constructor (the one with extra parameters in addition to World) and spawn it in world, its called first (correctly, with all of its variables properly set). But then the "default" MagicCircle(World worldIn) is called somewhere and then the variables are all reset, causing remove() to be called. I've printed all the counters and variables responsible for controlling the magic circle, and they work fine, so I'm unsure where it could be. public EntityMagicCircle(World worldIn) { super(ModEntities.Magic_Circle.getEntityType(), worldIn); } public EnergyBallEntity(World worldIn, LivingEntity caster, int ticksLifetime) { super(ModEntities.Magic_Circle.getEntityType(), worldIn); this.setPosition(caster.getPosX(), caster.getPosY(), caster.getPosZ()); this.ticksLifetime = ticksLifetime; this.ticksAlive = 0; } @Override public void tick() { if (ticksAlive < ticksLifetime) { ticksAlive++; } else { ticksAlive = 0; this.remove(); } } Instead, ticksLifetime and ticksAlive are 0 for some reason, so the magic circle never appears. I'm not doing anything funny when creating the EntityMagicCircle object either. When I comment out this.remove(), the magic circle spawns correctly, so I've no idea how to start approaching this apart from what I've already tried.
  4. Yup. I also made sure it wasn't an issue with IntelliJ since I remember I had a similar issue in version 1.10 when it built and ran using Gradle. But in this version that shouldn't be an issue...
  5. Alright, my directory is now: src |_main |_resources |_assets |_ModID (in this case necropolisofnostalgia) |_blah blah path to texture and I've done MODID + "blah blah path to texture", and still nothing. Ready to tear my hair out at this point lol
  6. edited the post to a different question on a 1.15 version of the mod.
  7. This is my intellij structure: and when I do private static final ResourceLocation CAST_TEXTURES = new ResourceLocation("assets/textures/entity/CastingCircle-texturemap.png"); it fails to load. Where should I be looking?
  8. And sometimes, there's multiple ways to solve a problem, that's just what you have to do when working in someone else's codebase that you aren't allowed to modify. When you're stuck with one solution to a problem, think of another, get creative. You can often come up with a better solution this way. It's helped me with a lot of things
  9. ^^^^^^ this. It's more work the other way anyways.
  10. Fair enough, I may fork it and update it myself one of these days, if I have a spare 2 weeks or something
  11. Is it in attempt to encourage people to mod for 1.15? Because the reason so many people and myself still develop for 1.12.2 is that several important dependencies (LLibrary, for one) is still on 1.12.2, I just think it'd be helpful to not limit it just because it's old, but rather if the version isn't really used anymore. But that's life I guess ?‍♂️
  12. It's by far still the most prevalent and popular version to mod, with plenty of people still developing for it. No hate, just want to hear the rationale.
  13. Tried tryMoveToEntityLiving(EntityPlayer,...) instead, and it works fine. So there's something up with tryMoveToXYZ() specifically for some reason. What on earth could it be?
  14. The code for minecraft entities, blocks, etc are all in forge, and that is on your computer. For external dependencies just look up their github. If you don't know Java, or just an inexperienced programmer, diving into Forge with a complex idea isn't going to work out. Anyhow, implement something trivial, for example maybe a new zombie extension, to figure out the ins and outs of what you're working with.
  15. 1.12.2 So I'm writing an entity that extends EntityCreature, and it renders and behaves just fine. However, I've written a basic AI that, whereupon detecting an EntityPlayer, it'll charge towards its last known position, and stop just a little bit past that point. Part of that, I wrote it so that it uses this.entity.getNavigator().tryMoveToXYZ(this.x, this.y, this.z, this.speed), but that method call doesn't do anything. Keep in mind that I'm testing this on SuperFlat world, so it has no reason to fail unless something else is up. Few things I've tried: Printed out x, y, z, and speed to the console, and those values are valid To make sure that the rest of my code actually moves my entity where it should be, I moved my entity manually with motionX() and motionZ() in updateTask() and with that one, my entity does indeed move to the right position, except it doesn't face where it's moving, so that's no good. I'm really out of ideas at this point, what could it be? Any ideas greatly appreciated. Entity: https://pastebin.com/fM22nyrm AI: https://pastebin.com/3uk7Uq6f (Excuse some of the unused variables, they were there for when I tested the AI with motionX())
×
×
  • Create New...

Important Information

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