Jump to content

NovaViper

Forge Modder
  • Posts

    1061
  • Joined

  • Last visited

Everything posted by NovaViper

  1. I noticed when the chunks ended up being unloaded, the dog wouldn't come to me anymore. And as for the different dimension, the item wouldn't be meant to call them from different dimensions, but rather within the same one
  2. I thought it would be easiest to scan the world for the entities. I was not aware of this other alternative method of achieving the same thing
  3. So far, I have adapted the ItemWhistle code from Sophisticated Wolves (and given them proper credit of it) to make the whistle in Doggy Talents function, however I want to take the item to a whole new level. Basically, the entire purpose of the whistle is to recall all of the dogs that you have tamed to you in case you lost them somewhere. What I intend to do is take that furthur by allowing the item to call the dogs back from any distance, basically anywhere in the dimension. While the basic code is working, I can't figure out how to make the item scan the entire world for all entities that use the class EntityDog, select them and then make them teleport to the player. Here's what I have so far: https://hastebin.com/agodoqihix.swift
  4. This is something momentous I haven't attempted before but here goes nothing. I'm developing a skill for the dogs in DoggyTalents that would basically give the dogs ranged attacks. So the things I'm trying to work out are the following: Make the normal LeapAtTarget and my custom Ranged Attacks AI switch between each other. Whenever the dog's target comes within the normal range of the Leaping AI (in the code it says the distance of the target squared (d0) is 4.0 D<= d0 <= 16.0D Not sure how far this is in blocks however), then it will switch to the leaping ai and attack; while if the target is more than this range, then it will switch to the ranged attack ai and attack Have different "types" of ranged attacks. So, there would be different 'elements' that the attacks can feature and each respective element would use a specific entity for the actual projectile, such as fire (using a fireball or something like a dragon's breathe), water (potion bottle entity?), poison (dragon's breath possibly or the poison tipped arrow), ice (snowballs), physical (regular arrows/tipped arrows or a stone block). The elements can be switched around via items at the mastery level (which is level 5) There is a cooldown between each ranged attack. I already have a good idea on what to do with this but since the cooldown is only used Each attack shoot out differently and have different behaviors. For instance, the fire element is very similar to fire breath, so it shoots out a constant stream of fire particles or small fireballs, then it has a cooldown in between each breathe; ice is the exact same way. Poison and water is more a 'spitting' type of thing so it only shoots out one projectile and it lingers, basically how the Enderdragon's new magic breathe works. Physical is the exact same as a skeleton shooting an arrow. Each attack has a different effect as well. For instance, fire obviously burns entities, also would be cool if it burns the area around it as well. Ice and water can put out fires, however ice can turn water into ice blocks; water can leave behind a puddle of water. Poison obviously causes poison damage. and physical causes normal damage Some of the parts I already have started working on but those are the core aspects I need some advice on. If it helps, here is a link to the 1.12.2 source code (as that's the current version I'm working on).
  5. I can't get the methods to work since the talent class doesn't have, the IDE keeps saying the class is undefined in IDataWatcher type. https://hastebin.com/opomumuvoq.java Nvm, I figured it out. I got it all working now. Thanks for the advice
  6. I'm working on adding in NBT but. like I said, I'm a bit rusty with this. I'm not sure if I'm doing the NBT storing and retrieving correctly. https://hastebin.com/kicahibage.java
  7. Alright.. I must be really sleepy right now or I'm just that rusty... but I still can't get that cooldown working, but at least I got it where it runs once. https://hastebin.com/coqipakusi.swift
  8. The original code came from another talent called Pest Fighter (No it's not mine basically). I've gotten a bit rusty when it comes to coding this year because of school taking away much of my free time to code in general. I did do a few more changes to the talent.
  9. I blanked out the cooldown and it worked perfectly, but kept firing constantly. I did something like this but now it doesn't seem to run at all cooldown2 = level == 5 ? 20 : 50; if (dog.getEntityWorld().isRemote) { if (this.cooldown2 > 0) { this.cooldown2--; // System.out.println(this.cooldown2); } } List<EntityMob> list = dog.world.<EntityMob>getEntitiesWithinAABB(EntityMob.class, dog.getEntityBoundingBox().grow(level * 4, 4D, level * 4).expand(0.0D, (double)dog.world.getHeight(), 0.0D)); //List list = dog.world.getEntitiesWithinAABB(EntityMob.class, dog.getEntityBoundingBox().grow(level * 3, 4D, level * 3)); //Iterator iterator = list.iterator(); if(!list.isEmpty()) { for(EntityMob mob : list) { if (cooldown2 == 0) { dog.playSound(SoundEvents.ENTITY_WOLF_GROWL, 1f, 1f); mob.spawnExplosionParticle(); int knockback = (level == 5 ? 3 : 1); mob.attackEntityFrom(DamageSource.GENERIC, damage); //mob.addPotionEffect(MobEffects.SLOWNESS); //mob.addVelocity(-MathHelper.sin(mob.rotationYaw * (float) Math.PI / 180.0F) * knockback * 0.5F, 0.1D, MathHelper.cos(mob.rotationYaw * (float) Math.PI / 180.0F) * knockback * 0.5F); } } }
  10. I'm trying to create a talent for DoggyTalents that has the dog produce a roar that has a certain AoE (Area of Effect) range and causes all entities that are extended from EntityMob to be stunned and take damage depending on how much the level of the talent itself. So far I have something like this but there are a few issues with it however: It only effects one mob at a time, instead of all of them at once The section that is uncommented now doesn't cause damage but produces the particles
  11. Then you think I should have the Project variable set for EclipseCore? Then have all of the projects that need it added in the classpath to run?
  12. I don't. the video I was going off of mentioned that you don't need to have a separate Minecraft Forge project
  13. Here, the Project selection under the main tab
  14. What about the main? What do I put for the Project variable?
  15. Which Run/Debug configuration do I change? I have one Client and one Server for each project
  16. I'm not sure how to make both projects run at the same time
  17. It doesn't seem to be the same setup as Lex has done however
  18. Hi, I just recently set up my workspace to feature multiple projects (in their respective folders) and I am wondering how I can get these two protects not only to run simultaneously, but also be able to use code from each other (i.e. I use methods from Project 1 to create a creature in Project 2 and so on.). I used this video by LexManos in order to setup everything, but I haven't been able to figure out how to make Eclipse accomplish these two tasks. Any idea what I can do?
  19. Hm.. I watched the end of @LexManos's video and he did say it is possible to have both mods running at the same time (and have them compile seperately) but he would show it in another tutorial.. which hasn't been made unfortunately. He also said that when doing so, you have to tell gradle that ModA (TerrakonCraft) depends on ModB(EclipseCore)...now how would I be able to do that is the question now.
  20. I just thought of idea that would (theoretically) work better for me. I was doing some searching and saw that it is possible to make Multiproject workspaces with Minecraft Forge and Eclipse. The reason why I thought of this way because I want to separate the Github repos for each of these projects (TerrakonCraft goes in the TerrakonCraft repo, and EclipseCore goes into the EclipseCore repo) and I go push each changes to these projects to their respective repos. With this also, it would make simply compiling these mods. I do however, have one question about this method, is it possible to pull classes from these mods? (I.e. import a registry class from EclipseCore in order to register an entity to TerrakonCraft)
  21. Oh.. I was trying to make everything as simple as possible when it comes to compiling everything
  22. Oh.. How did you manage to have Forge read the files inside when running the mods?
  23. Your Forge workspace works with these files in subfolders?
  24. To TerrakonCraft: C:\Users\novag\eclipse-workspace\Minecraft\TerrakonCraft\src\main\resources\etc\tkcraft\mcmod.info To EclipseCore: C:\Users\novag\eclipse-workspace\Minecraft\TerrakonCraft\src\main\resources\etc\lib\mcmod.info
×
×
  • Create New...

Important Information

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