-
Posts
44 -
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 (2/8)
4
Reputation
-
I'm trying to get the motion of a Minecraft cape and replicate it to my custom elytra, where can I find the code?
-
How can I create my own ArmPose, I want to change the ArmPose when ElytraFlying is triggered
-
[1.15.2] How can I add particles in a smoke bomb way?
SciPunk replied to SciPunk's topic in Modder Support
Thanks a lot, so for this case I should render it on the server-side? as I want other players to see the smoke -
[1.15.1] Which 3D modeller program do you use to make your entities?
SciPunk replied to DragonITA's topic in Modder Support
Unfortunately haven't found one yet, I use Tabula currently and edit it to work in 1.15 -
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"); } }
-
[1.15.1] Which 3D modeller program do you use to make your entities?
SciPunk replied to DragonITA's topic in Modder Support
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 -
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
-
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); } } } }
-
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); } } }
-
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); } }
-
[1.15.1] Weird small type arms rendering when elytra flying?
SciPunk replied to SciPunk's topic in Modder Support
No worries thanks anyways, gonna check the debugger, I don't know why I didn't do that in the first place lol -
[1.15.1] Weird small type arms rendering when elytra flying?
SciPunk replied to SciPunk's topic in Modder Support
Bump, does anybody understand how flags work? or how can I edit the "Pose" of the flag?