Jump to content
Search In
  • More options...
Find results that contain...
Find results in...


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Feroov's Achievements

Stone Miner

Stone Miner (3/8)



  1. It is what I actually needed THANK YOU :D, had to tweak some math arithmetics and all is good now, have a great rest of your day/night cheers
  2. Could you please guide/show me the way to do it, I'd really appreciate it, still trying to grasp the logic
  3. Yes I got it to work now with this: double x = playerentity.getX(); double y = playerentity.getY(); double z = playerentity.getZ(); if (level instanceof ServerLevel _level) { _level.sendParticles(ParticleTypes.FLAME, x, y + 1.5, z + 0.5, 1, 1, 0, 0, 0); _level.sendParticles(ParticleTypes.SMOKE, x, y + 1.5, z +0.5, 1, 1, 0, 0, 0); } The only issue is the particles spawn on the specific location/area, so if I shoot from X cordinate I see the particles if I turn around and shoot well they spawn behind me then, now heres my question, how can I make it so that the particles only spawn/appear in front of the player no matter what
  4. I'll send in the full class it might be more useful https://pastebin.com/RuREdFYj
  5. Am I calling it correctly inside the releaseUsing method? serverLevel.sendParticles(ParticleTypes.FLASH, x, y, z, 2, 0.2D, 0.2D, 0.2D, 0.0D); because now the gun wont shoot pretty much
  6. This is what I have so far @Override public void releaseUsing(ItemStack stack, Level level, LivingEntity livingEntity, int timeLeft) { if (livingEntity instanceof Player) { Player playerentity = (Player) livingEntity; if (stack.getDamageValue() < (stack.getMaxDamage() - 1)) { playerentity.getCooldowns().addCooldown(this, 4); if (!level.isClientSide) { NineMMBullet nineMMBullet = createArrow(level, stack, playerentity); nineMMBullet.shootFromRotation(playerentity, playerentity.getXRot(), playerentity.getYRot(), 0.0F, 3.0F, 2.0F); nineMMBullet.isNoGravity(); nineMMBullet.isNoPhysics(); stack.hurtAndBreak(1, livingEntity, p -> p.broadcastBreakEvent(livingEntity.getUsedItemHand())); level.addFreshEntity(nineMMBullet); level.playSound((Player) null, playerentity.getX(), playerentity.getY(), playerentity.getZ(), ModSoundEvents.PISTOL.get(), SoundSource.PLAYERS, 1.0F, 1.0F); if (!level.isClientSide) { final int id = GeckoLibUtil.guaranteeIDForStack(stack, (ServerLevel) level); final PacketDistributor.PacketTarget target = PacketDistributor.TRACKING_ENTITY_AND_SELF .with(() -> playerentity); GeckoLibNetwork.syncAnimation(target, this, id, STATE); } } } } }
  7. Well no where I assume, even though I tweak the numbers still nothing is present
  8. As the title says I got a custom ranged weapon, and I would like to spawn a particle once the item is been used lets say I tried using for(int i = 0; i < 2; ++i) { level.addParticle(ParticleTypes.FLASH, 0d, 0d, 0d, 0d, 0d, 0d); } No luck, any ideas?
  9. Yes working perfectly thanks, I got confused with isPushable method but all good now
  10. What method do I call so my entity is resistant to knockback from explosion?
  11. True true was thinking the same, appreciate it man cheers
  12. Would I call setBlockAndUpdate inside the tick method from Primed entity or should it be called from the tnt block class?
  13. I apologize for explaining it badly, yes something like level.setblock so a good idea to understand would be imagine a normal hole in the overworld, say you use this custom tnt inside the hole, it will fill up the hole with dirt does that make sense? Here is a mod for reference though this is for fabric unfortunately obviously need for forge: https://www.curseforge.com/minecraft/mc-mods/dirtnt
  14. So I got a perfectly working custom TNT, any ideas how I can on explode spawn blocks around the dead "primed tnt" entity?
  15. As the title suggests how can we implement a sound event that plays once when the entity is spawned etc in a way boss music, thanks in advance
  • Create New...

Important Information

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