Jump to content

Iron1601

Members
  • Posts

    30
  • Joined

  • Last visited

Everything posted by Iron1601

  1. Thanks. I do wonder though, why are they called Capabilities? What does that mean in this context? I would imagine it's the ability for an object to do something, which then I'm not sure how that translates to checking if it is doing it, but then there are types and also "facing" which I don't think is like in world directions.
  2. I want to have a field or some attribute to PlayerEntity that indicates whether the player is pressing a key. I've tried DataManagers but the id value overlap makes me think that is the wrong way to do it on top of causing exceptions. I've also tried Lists and such to store players that did but sidedness and thread safety make me think thats also the wrong way. My question is how do I add this boolean attribute in such a way that avoids sidedness and is the proper way? Thanks.
  3. I wanted to have something that depends on a players look direction and stuff like that so I wondered how to add that to the renderer. Shortly after I found how to do that but I couldnt find a way to delete the reply, its all good now. Thanks
  4. Would you happen to know how to pass additional data to the model's render() method?
  5. GeeksForGeeks and w3schools have pretty nice explanations. Just look up "Java Inheritance" you'll find it. In general you want to extend FallingBlock I think.
  6. I'm trying to add an attachment to a PlayerEntity without adding an entity that follows the player. I've narrowed it down to extending PlayerRenderer but the problem is that it uses AbstractClientPlayerEntity which I couldn't find the EntityType for it (if it even exists), which I think I need to register the Renderer (RenderingRegistry.registerEntityRenderingHandler). Is there a different way to register the Renderer or some other way to extend PlayerRenderer? Thanks.
  7. I've been working on a projectile type entity but I cant get it to move smoothly without extending some other class that adds logic that interferes with what I'm trying to do or straight up breaks everything. I'm trying to simply get it to stop when hitting a wall and to stick to an entity when hitting it and moving with it. Extending ThrowableEntity makes it break on impact. Extending ArrowEntity forces some methods that are unrelated and causes nullPointerExceptions referring to some data managers. Extending ItemEntity is the closet I've gotten to what I'm trying to do, however continues to slide on the floor. Working around any of these cause it to either stop before hitting the ground, go into blocks, move erratically or rubber-band. I would imagine some sort of ArrowEntity type thing will work best since it has pretty much all of what I need but extending it causes problems and extending AbstractArrowEntity adds methods and sometimes crashes. Seeing this I tried controlling either the motion or position directly but setPosition every tick makes it jitter and rubberband, setMotion doesn't affect anything directly, from what I've seen, and instead has to go through super.tick() (for ProjectileEntity) or move() (which forces it into the ground sometimes). I would appreciate any help especially regarding the correct way to do this, since seemingly every Entity class has a different way of doing it, sometimes using privated fields or methods which are no fun.
  8. I apologize for this dragging on however, it appears the winning formula is With your context clues, other AT's and patience I found this working. Thanks for the help.
  9. I meant the AT'd mod class wasn't the problem, the AT is almost certainly the problem. Excuse me if that wasn't clear. I would imagine this is a solvable problem just by someone that knows the syntax.
  10. I'm looking to make the constructor of ProjectileEntity public or at least protected and im getting which to me means that there is a syntax error. I haven't managed to locate the problem. Any help would be appreciated.
  11. I think it goes only up to 3 blocks because thats the reach of a regular PlayerEntity, might be wrong though/ I think your question is how to find entities on a line from one Vector3d to another. Now I know this isnt really your question but there is another way to trace entities. You create an AABB (AxisAlignedBoundingBox) starting at your start vector and ending at the end vector and using the world object you are raytracing in you use getEntitiesWithinAABB to get the entities that are in the cube with a vertex at the start vector and the opposite vertex at the end vector. You then iterate over the entities and use Entity#getBoundingBox#rayTrace to check if the entity is on the line. The parameters of AABB are the top corner and the opposite corner. The parameters of getEntitiesWithinAABB are a class object which determines which entities the function is checking for in the bounding box, i.e if you give it ProjectileEntity.class it will only return a list of entities that extend ProjectileEntity, and the bounding box AABB. The parameters of rayTrace are the start and end vector that define the line you are checking for. If you just want to know if a line goes through the boundingBox of an entity entity.getBoundingBox.rayTrace(start, end) should do it. You can also use something like World#getEntitiesWithinAABBExcluding to exclude the shooter. I must say aswell, looking at it now ProjectileHelper#rayTraceEntities seems to do that ^ ish and take the same parameters needed there so hope it explained that too. Hope this was helpful and answered your question
  12. So I do need a return type in the AT. I made a new project to make sure the only things that could be a problem was the AT and AT'd the Mod class to not mess with minecraft or forge's internal libraries. In general I don't think that matters a whole lot since that doesn't seem to be the problem.
  13. What's the return type of a constructor? stack overflow says void which by the forge docs means that no return type is needed? And yes I agree there is no reason to AT your code but this was just a temporary measure just to not cause any other errors. This is the :comileJava error message I'm assuming that's what you mean. I cant really find any log file in the run/logs or logs folders that seems relevant. log,txt
  14. Excuse me if i'm jumping to conclusions or if this is wrong but removing the (Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;) fixes the error but just nerfs the AT so now it just doesn't compile
  15. Im confident you can AT your own mod so long as you dont actively mess something up. My entire AT is the one line Not sure what an update error log is? updated?
  16. The log was of the examplemod of the mdk to have a control test and the same exact errors came up in both i checked Also I AT'd my own mod so it wont screw up anything else that might be used somewhere else
  17. I would imagine this means there is something wrong with the line since puttin a space between the "private com.example.examplemod" and the "<init>" fixes it. I guess this means there is some syntax problem with Same error on both to be clear I see now it says "Syntax error" so I guess there's that but what error?
  18. What I sent was the "Could not resolve net.minecraftforge:forge:1.16.4...." This is the :compileJava Error log.txt
  19. I have seen, and following that I made Which doesn't seem to work; still fails at runtime.
  20. Indeed that is the last resort though I haven't managed to get the formatting down. F.e how do I express "EntityType<? extends [class name]> or a return type of void?
×
×
  • Create New...

Important Information

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