Jump to content

herar123

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by herar123

  1. It occured while I was modding. It all worked perfectly, but while messing with an animated item (rocketLauncher) it suddenly stopped loading when launched. I tried removing the item from the registry and stuff, but that didnt help. I might try to create a new project and see if that launches.
  2. Hello, Whenever I try to start Minecraft (Forge 1.18.2) with runClient it begins loading like normal but stops near the end. There isnt any error in the console and the game doesnt crash. It just keeps on loading, without the bar moving. This is my console output: https://pastebin.com/76rgZGB2 This is my mods github repository: https://github.com/Crepzter/First-Mod-1.18 Thank you for any help!
  3. Hello, I have created my own projectile, with a custom model, and use geckolib to render it. However I am not able to get it to move. It has a deltaMovement, but getPos() always gives the same values and its rendered on the same spot. Ive tried using .shoot or change have its movement changed in its tick() method but nothing seems to work. Im probably missing one line of code important to get projectiles to move. Thank you public class RocketProjectile extends Projectile implements IAnimatable { private boolean hasTarget = false; private boolean followEntity; private LivingEntity targetE; private Vec3 targetV; private int delay = 20; private int particle = 0; private int test = 0; public RocketProjectile(EntityType<? extends Projectile> entity, Level level) { super(entity, level); } @Override protected void defineSynchedData() { } public void setTarget(Vec3 pos) { followEntity = false; targetV = pos; hasTarget = true; } public void setTarget(LivingEntity target) { followEntity = true; targetE = target; hasTarget = true; } @Override public void tick() { super.tick(); if(!hasTarget) { try { targetE = level.getNearestPlayer(this, 100f); if(targetE!=null) hasTarget = true; followEntity = true; } catch(Exception e) {} } else if(delay > -1){ delay--; } if(hasTarget && delay < 0) { Vec3 target; if(followEntity) { target = targetE.getEyePosition(); } else { target = targetV; } Vec3 dir = target.subtract(this.getPosition(1f)).normalize(); if(!level.isClientSide()) this.setDeltaMovement(dir.multiply(1,1,1)); } } @Override protected void onHitBlock(BlockHitResult p_37258_) { super.onHitBlock(p_37258_); } @Override protected void onHitEntity(EntityHitResult p_37259_) { super.onHitEntity(p_37259_); } @Override protected void readAdditionalSaveData(CompoundTag p_20052_) { } @Override protected void addAdditionalSaveData(CompoundTag p_20139_) { } @Override public Packet<?> getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } //geckolib private final AnimationFactory factory = new AnimationFactory(this); @Override public void registerControllers(AnimationData data) { data.addAnimationController(new AnimationController<RocketProjectile>(this, "empty", 0, this::empty)); } private <E extends IAnimatable> PlayState empty(AnimationEvent<E> event) { return PlayState.CONTINUE; } @Override public AnimationFactory getFactory() { return factory; } }
  4. Hello, I created a custom entity which shoots snowballs at the player and other mobs. Now I want it to look at the target while doing so --> rotating its head to it/at least rotate its body in the targets direction I tried to use this.lookAt(enitity) which doesnt seem to work. Spawning Particles doesnt work either public void tick() { this.attackTimer++; LivingEntity targetentity = this.snowmanCannon.getTarget(); this.snowmanCannon.setAttacking(true); Level level = this.snowmanCannon.level; this.snowmanCannon.getLookControl().setLookAt(targetentity); if(!this.snowmanCannon.hasLineOfSight(targetentity)) { } else if (this.attackTimer == 1) { this.snowmanCannon.setAttacking(true); Vec3 pos1 = this.snowmanCannon.getEyePosition().add(0,-0.5,0); Vec3 pos2 = targetentity.getEyePosition(); Vec3 dir = pos2.subtract(this.snowmanCannon.getEyePosition()); SnowmanCannonProjectile snowball = new SnowmanCannonProjectile(level, pos1.x, pos1.y, pos1.z); snowball.shoot(dir.x, dir.y, dir.z, 4.5F, 0.1F); this.snowmanCannon.playSound(SoundEvents.SNOW_GOLEM_SHOOT, 1.0F, 1.0F); level.addAlwaysVisibleParticle(ParticleTypes.EXPLOSION, pos1.x, pos1.y, pos1.z, 1d, 1d, 1d); level.addFreshEntity(snowball); } if (this.attackTimer == 3) { this.snowmanCannon.setAttacking(false); this.attackTimer = 0; } } Thank you for any help
  5. Thank you for your help. For future people reading this: I deleted the forge_gradle cache folder under Users/UserName/.gradle/caches/ and deinstalled all java version I had and installed the newest jdk 8 from: https://adoptopenjdk.net/. Then I just followed the official guide again: https://mcforge.readthedocs.io/en/latest/gettingstarted/.
  6. I repeated the setup and it seems to work. I only got one warning I dont understand, but the example mod isnt throwing any errors.
  7. Does it matter if I "import existing gradle project" before running the command "gradlew genEclipseRuns" or after?
  8. Yes it does, thank you. I would now try the setup again and see how it goes. What does the Hotspot mean?
  9. I deinstalled my current java versions, restarted, downloaded the jdk 8 file from your link and restartet my pc after installing it, but i dont see java in apps and features. In spite of that Im able to play minecraft, although it seems like my fps in 1.16.5 singe player dropped from 120 to 90fps. If this is fine, Id try to do the tutorial again.
  10. Im sry i pasted the wrong link. I used the link you mentioned. Do I have to deinstall both java versions and install the newest jdk 6, without having problems with minecraft or eclipse afterwards? When I did it, I would follow this guide again: https://mcforge.readthedocs.io/en/latest/gettingstarted/. And is it okay to run the gradle commands with cmd?
  11. Hello, I recently wanted to start modding with 1.16.5 forge. I followed several tutorials, including the Getting Started Guide: https://mcforge.readthedocs.io/en/latest/forgedev/. But even after deleting all files and another setup I keep getting the erros shown in the attached image. I have the java version installed, shown in the second image. I used different commands, but executed all with the command prompt after "cd projectFolderPath".
×
×
  • Create New...

Important Information

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