Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/07/20 in all areas

  1. You don't delete the files, you uninstall Java through: Win 10: Settings -> Apps Win 7: Control Panel -> Programs -> Programs and Features
    1 point
  2. Just found this: https://github.com/MinecraftForge/MinecraftForge/pull/6467 So it looks when it gets merged, it will work automagically with the new Config API. I added a notice about that in my mod.
    1 point
  3. ServerPlayerEntity extends PlayerEntity. No idea where which one is used, but you can run an instanceof and try casting. And yes, changing the method signature would invalidate the @Override, but basic Java is normally outside the scope of this forum. You can try: if (player instanceof ServerPlayerEntity){ ServerEntityPlayer serverPlayer = (ServerEntityPlayer)player; glide(serverPlayer); }else {System.out.println("player is not a ServerPlayerEntity :(");} and feel free to look up appropriate Java tutorials for casting and polymorphism. But like I said, I'm not sure exactly when PlayerEntity is or is not an instance of ServerPlayerEntity.
    1 point
  4. Check if the player is an instanceof ServerPlayerEntity, then cast.
    1 point
  5. From AbstractArrowEntity::tick EntityRayTraceResult entityraytraceresult = this.rayTraceEntities(vec3d2, vec3d3); if (entityraytraceresult != null) { raytraceresult = entityraytraceresult; } if (raytraceresult != null && raytraceresult.getType() == RayTraceResult.Type.ENTITY) { Entity entity = ((EntityRayTraceResult)raytraceresult).getEntity(); Entity entity1 = this.getShooter(); if (entity instanceof PlayerEntity && entity1 instanceof PlayerEntity && !((PlayerEntity)entity1).canAttackPlayer((PlayerEntity)entity)) { raytraceresult = null; entityraytraceresult = null; } } if (raytraceresult != null && raytraceresult.getType() != RayTraceResult.Type.MISS && !flag && !net.minecraftforge.event.ForgeEventFactory.onProjectileImpact(this, raytraceresult)) { this.onHit(raytraceresult); this.isAirBorne = true; } The event is fired in that fourth if statement. You should be able to get the Enity the arrow hit (if any) from the EntityRayTraceResult. Then I suppose you'll want to find out if the Entity is a player and if they were facing the appropriate direction at the time.
    1 point
  6. It's recommended that you use the Gradle Wrapper that the MDK comes with. Besides that, where are you expecting Gradle to pull junit from? Nevermind, I guess that's provided by useJUnitPlatform()
    1 point
  7. 1.12 is no longer supported on this forum. Please update to a modern version of Minecraft to receive support.
    0 points
×
×
  • Create New...

Important Information

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