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.

SciPunk's Achievements

Tree Puncher

Tree Puncher (2/8)



  1. I'm trying to get the motion of a Minecraft cape and replicate it to my custom elytra, where can I find the code?
  2. How can I create my own ArmPose, I want to change the ArmPose when ElytraFlying is triggered
  3. My projectile item, I want it to spin when in the air and stuck to surface, but I don't know how
  4. I have my throwable item, which I want it to spin when it is in the air and stick to the surface when it hits a block but I can´t figure out, my item uses a sprite renderer, here´s my code Item class Entity class ClientProxy class (where it renders)
  5. Thanks a lot, so for this case I should render it on the server-side? as I want other players to see the smoke
  6. Unfortunately haven't found one yet, I use Tabula currently and edit it to work in 1.15
  7. Hi, I'm trying to make a smoke bomb, here's my code but the particles doesn't seem to render My code: public class EntitySmokePellet extends ProjectileItemEntity { public static final EntityType<EntitySmokePellet> BATARANG = register(); protected EntitySmokePellet(EntityType<? extends ThrowableEntity> type, World worldIn) { super(EntitiesHolder.SMOKE_PELLET,worldIn); } @Override public IPacket<?> createSpawnPacket() { return NetworkHooks.getEntitySpawningPacket(this); } protected EntitySmokePellet(double x, double y, double z, World worldIn) { super(EntitiesHolder.SMOKE_PELLET, x, y, z, worldIn); } protected EntitySmokePellet(EntityType<? extends ThrowableEntity> type, LivingEntity livingEntityIn, World worldIn) { super(EntitiesHolder.SMOKE_PELLET, livingEntityIn, worldIn); } protected Item getDefaultItem() { return ItemHolder.SMOKE_PELLETE; } @Override protected void onImpact(RayTraceResult result) { if (!this.world.isRemote) { if (result instanceof EntityRayTraceResult) { EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) result; if(entityRayTraceResult.getEntity() instanceof MobEntity) { MobEntity entity = (MobEntity) entityRayTraceResult.getEntity(); double d0 = (double)entity.getPosX() + 0.5D; double d1 = (double)entity.getPosY(); double d2 = (double)entity.getPosZ() + 0.5D; entity.addPotionEffect(new EffectInstance(Effects.SLOWNESS,120,5)); entity.addPotionEffect(new EffectInstance(Effects.NAUSEA,120,5)); entity.addPotionEffect(new EffectInstance(Effects.BLINDNESS,120,5)); entity.world.addParticle(ParticleTypes.LARGE_SMOKE,d0,d1,d2,0,0,0); this.remove(); } } else if (result instanceof BlockRayTraceResult) { BlockRayTraceResult blockRayTraceResult = (BlockRayTraceResult) result; for (int i = 0; i <= 25; i++) { this.world.addParticle(ParticleTypes.LARGE_SMOKE,blockRayTraceResult.getPos().getX() , blockRayTraceResult.getPos().getY() , blockRayTraceResult.getPos().getZ(), 0, 0,0); } this.remove(); } } } public static EntityType register() { return EntityType.Builder.<EntitySmokePellet>create(EntitySmokePellet::new, EntityClassification.MISC).size(0.8F, 0.8F).build("smoke_pellet").setRegistryName(ComicUniverse.MODID,"smoke_pellet"); } }
  8. The one that I found that was the most useful was tabula for 1.12, some little changes in the code but not drastically like Workbench
  9. Made a custom projectile, with it's own renderer but the when I right click to throw the projectile it spawns a... pig instead of my custom texture lol Item class Entity class Entity Renderer
  10. Got it, thanks! no, it was just for testing purposes now I got to figure out the "catch" also I noticed that with this code if I get hit by 2 arrows consecutively it crashes: @SubscribeEvent public static void onProjectileHitEvent(ProjectileImpactEvent event) { if (event.getRayTraceResult() instanceof EntityRayTraceResult) { EntityRayTraceResult entityRayTraceResult = (EntityRayTraceResult) event.getRayTraceResult(); if (entityRayTraceResult.getEntity() instanceof PlayerEntity) { PlayerEntity playerEntity = (PlayerEntity) entityRayTraceResult.getEntity(); if (playerEntity.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == ItemHolder.BATMAN_CHEST) { event.setCanceled(true); } } } }
  11. Hi, thanks for the tip, tried to implement it to my code but I just can't seem to get it to work, tried to do it without the condition of the player looking at it for testing purposes and I just couldn't make it work, do you have any idea why? Here's my code: @SubscribeEvent public static void onProjectileHitEvent(ProjectileImpactEvent event) { EntityRayTraceResult entityRayTraceResult = new EntityRayTraceResult(event.getEntity(), event.getRayTraceResult().getHitVec()); Entity entity = entityRayTraceResult.getEntity(); if (entity instanceof PlayerEntity) { PlayerEntity playerEntity = (PlayerEntity) entity; if (playerEntity.getItemStackFromSlot(EquipmentSlotType.CHEST).getItem() == ItemHolder.BATMAN_CHEST) { event.setCanceled(true); } } }
  12. How could I make behavior on the player that when the player sees the projectile "catches it" e.g a skeleton shoots the player but if the player is facing the arrow the player catches the projectile so far the event I think it has to do something with it is ProjectileImpactEvent, however, I'm not entirely sure how could I write that behavior. Here's my code @SubscribeEvent public static void onProjectileCatchEvent(ProjectileImpactEvent event) { if (event.getEntity() instanceof ArrowEntity) { event.setCanceled(true); } }
  13. No worries thanks anyways, gonna check the debugger, I don't know why I didn't do that in the first place lol
  14. Bump, does anybody understand how flags work? or how can I edit the "Pose" of the flag?
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.