I've searched the API thoroughly, but I can't seem to find a method to get the Entity Object of the shooter of an arrow (AbstractArrowEntity).
I am on version 1.16. There is a method to set the shooter, but not to get it...
Thanks in advance!
@Override
public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) {
EndermanEntity eman = new EndermanEntity(null, world);
eman.setPosition(pos.getX(), pos.getY()+3, pos.getZ());
if (!world.isRemote) world.addEntity(eman);
return ActionResultType.SUCCESS;
}
Can someone tell me why this code crashes? Thanks!
Hi. Just wondering how to spawn mobs in Forge, now that the function spawnEntityInWorld() has been removed.
Also, is there a way we can get a list of all available mobs, such that they can be randomly indexed?
Thanks!
3 replies
Important Information
By using this site, you agree to our Terms of Use.